Skip to content

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

StatusDescription
draftWorkflow is being built; triggers are inactive
activeWorkflow is live; schedule/event/webhook triggers are armed
pausedTriggers are suspended; manual execution is still possible
archivedSoft-disabled; no execution possible

Workflow Model Fields

FieldTypeDescription
idintegerAuto-increment primary key
namestringHuman-readable workflow name
descriptiontextOptional description
statusenumdraft, active, paused, archived
metadatajsonArbitrary metadata (tags, owner, etc.)
user_idintegerFK to the user who created the workflow
created_atdatetime
updated_atdatetime

Creating a Workflow

Via Filament UI

  1. Navigate to Voodflow → Workflows
  2. Click New Workflow
  3. Enter a name and optional description
  4. 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 | null

Versioning

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.

Proprietary software — source-available. All rights reserved.