Workflows
Overview
A Workflow is the top-level container that holds all the nodes, edges, and metadata for an automation. It is stored in the voodflow_workflows table.
Workflow States
| Status | Description |
|---|---|
draft | Workflow is being built; triggers are inactive |
active | Workflow is live; schedule/event/webhook triggers are armed |
paused | Triggers are suspended; manual execution is still possible |
archived | Soft-disabled; no execution possible |
Workflow Model Fields
| Field | Type | Description |
|---|---|---|
id | integer | Auto-increment primary key |
name | string | Human-readable workflow name |
description | text | Optional description |
status | enum | draft, active, paused, archived |
metadata | json | Arbitrary metadata (tags, owner, etc.) |
user_id | integer | FK to the user who created the workflow |
created_at | datetime | — |
updated_at | datetime | — |
Creating a Workflow
Via Filament UI
- Navigate to Voodflow → Workflows
- Click New Workflow
- Enter a name and optional description
- Click Save to open the visual editor
Via Artisan / Programmatically
php
use Voodflow\Voodflow\Models\Workflow;
$workflow = Workflow::create([
'name' => 'My Automated Workflow',
'description' => 'Runs every night',
'status' => 'draft',
'user_id' => auth()->id(),
]);Activating a Workflow
Activating a workflow arms its trigger node:
- Schedule nodes register with the Laravel scheduler
- Event trigger nodes begin listening to Laravel events
- Receive Webhook nodes expose their HTTP endpoint
Toggle the status switch in the workflow list, or update the status field:
php
$workflow->update(['status' => 'active']);Relationships
php
$workflow->nodes; // HasMany → Node
$workflow->edges; // HasMany → Edge
$workflow->executions; // HasMany → Execution
$workflow->user; // BelongsTo → User
$workflow->getTriggerNode(); // Returns the trigger Node | nullVersioning
When a workflow is executed, Voodflow snapshots the workflow version into the Execution.workflow_version field. This means you can safely edit a running workflow without affecting in-flight executions.
Multi-Trigger Workflows
A workflow can have only one trigger node. If you need multiple triggers (e.g. both a schedule and a webhook), create two separate workflows.