This guide will help you create your first workflow using WorkflowStudio.
Prerequisites
- Laravel 11.x or higher
- PHP 8.2 or higher
- Node.js 18+ (for asset compilation)
- A valid WorkflowStudio license
Distribution
WorkflowStudio is distributed as a PHP package via a private Composer registry. The package uses Composer as the updater.
Requirements
In order to install WorkflowStudio, you must have:
- A valid
composer.jsonfile in your project root - A valid WorkflowStudio license key
- The email address associated with your license
Installation
Step 1: Add Private Composer Registry
WorkflowStudio is distributed through a private Composer registry. Add the repository to your composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://workflowstudio.composer.sh"
}
]
}Step 2: Install the Package
Install WorkflowStudio using Composer:
composer require workflowstudio/workflowstudioStep 3: Authenticate
When prompted for authentication, enter your license credentials:
Loading composer repositories with package information
Authentication required (workflowstudio.composer.sh):
Username: [your-email@example.com]
Password: [your-license-key]Authentication Details:
- Username: Your email address (the one associated with your license)
- If your license is not assigned to a licensee, you can enter
unlockas the username instead
- If your license is not assigned to a licensee, you can enter
- Password: Your license key
Note: Fingerprint authentication is currently disabled. If fingerprint authentication is enabled in the future, you would append it to your license key separated by a colon (
:), like:license-key:fingerprint
Example Authentication:
Loading composer repositories with package information
Authentication required (workflowstudio.composer.sh):
Username: user@example.com
Password: 8c21df8f-6273-4932-b4ba-8bcc723ef500Step 4: Publish Configuration and Assets
Publish the configuration and assets:
php artisan vendor:publish --provider="WorkflowStudio\WorkflowStudioServiceProvider"Step 5: Run Migrations
Run the database migrations:
php artisan migrateStep 6: Configure Observed Models
Configure which models to observe in config/workflowstudio.php:
'observed_models' => [
\App\Models\User::class,
\App\Models\Post::class,
// Add more models as needed
],Step 7: Start Queue Worker
Workflows run asynchronously, so start the queue worker:
php artisan queue:workCreating Your First Workflow
Step 1: Access the Workflow Builder
Navigate to http://your-app.test/workflowstudio/workflows in your browser.
Step 2: Create a New Workflow
- Click the "Create Workflow" button
- Fill in the workflow details:
- Name: "Welcome New Users"
- Description: "Send welcome email to new users"
- Active: Toggle on
Step 3: Build Your Workflow
Add a Trigger Node
- Drag "Model Created" from the node library
- Click on the node to configure:
- Select
App\Models\Userfrom the model dropdown
- Select
Add a Condition Node (Optional)
- Drag "Equals" condition from the library
- Configure:
- Field:
trigger.model_data.name - Value:
John
- Field:
Add Action Nodes
Drag "Send Email" action from the library
Configure for TRUE branch:
- To:
{{ trigger.model_data.email }} - Subject:
Welcome {{ trigger.model_data.name }}! - Body:
Hi {{ trigger.model_data.name }}, welcome to our platform!
- To:
Add another "Send Email" for FALSE branch:
- To:
admin@example.com - Subject:
New user registered - Body:
User {{ trigger.model_data.name }} just signed up!
- To:
Step 4: Connect Nodes
- Click and drag from the trigger node's output to the condition node
- Connect the condition node to both email actions
- Right-click each edge from the condition:
- Set first edge to "True Branch"
- Set second edge to "False Branch"
Step 5: Save and Test
Click the "Save Workflow" button
Test Manually (Recommended for testing):
- Click the Execute button in the toolbar
- For model triggers, a modal will appear with test data fields
- Enter test values (e.g., name:
John, email:john@example.com) - Click "Execute Workflow"
- Watch the execution status update in real-time
- Check the execution history panel to see results
Or trigger with real data:
phpUser::create([ 'name' => 'John', 'email' => 'john@example.com', 'password' => bcrypt('password'), ]);Check your queue logs to see the workflow execution
Next Steps
- Learn about Triggers
- Explore Actions
- Understand Context Variables
- Create Custom Nodes
