runId and a PENDING status while the engine queues up the work. You then poll a separate endpoint to track progress and, once the run completes, inspect the output produced by every node in the graph. This guide covers the full lifecycle from triggering a run to reading its final results.
Triggering a run
To start an execution, send aPOST request to the run endpoint for your workflow. No request body is required.
<workflowId> with the id returned when you created the workflow (for example, wf_abc123).
The API responds with HTTP 202 Accepted — meaning the run has been accepted and queued, but not yet started:
runId. You will use it to poll for status updates.
Run status lifecycle
Every Flowmatic run moves through a well-defined set of statuses:Pending
Accepted and waiting in the queue. No nodes have executed yet.
Running
The engine is executing nodes in graph order. Some may already be complete.
Success
All nodes completed without errors. Per-node outputs are available in the run detail.
Failed
One or more nodes encountered an error. The run detail shows which node failed and why.
Cancelled
The run was manually cancelled before it could complete.
Polling for completion
Because runs execute asynchronously, you need to query the run detail endpoint periodically until the status transitions to a terminal state (SUCCESS, FAILED, or CANCELLED).
Example polling loop (bash)
The following script polls every three seconds and exits as soon as the run reaches a terminal status:Reading the run detail
When the run completes, the full response includes anodes map with a per-node status and output:
nodes corresponds to a node id from your workflow graph. For every node you can see:
status— Whether that specific node succeeded or failed.output— The data the node produced. For aDATA_SOURCEnode this is therowsarray; for aFILTERnode it’s theitemsarray; for anOUTPUTnode it’s a count of emails dispatched.
If a run status is
FAILED, look for the node whose status is "FAILED" in the nodes map. The output field for that node will typically include an error key with a description of what went wrong.Listing all runs for a workflow
To get a history of all executions for a particular workflow, use the workflow-scoped runs endpoint:Queue behavior and concurrent runs
Flowmatic enforces a one-active-run-at-a-time policy per workflow. If a run is already in thePENDING or RUNNING state when you trigger another one, the new run enters the queue and waits.
Sequential execution
Runs for a workflow execute one after another, in enqueue order — preventing race conditions on shared state.
Batch enqueueing
Submit multiple
POST /run requests back-to-back. Each returns its own runId and queues automatically.Batch enqueue example
runId immediately. The first run starts executing right away; the second and third remain PENDING until the run ahead of them in the queue finishes.