What Is a Run?
Each time you trigger a workflow, Flowmatic creates a run record that tracks:- The overall execution status (
PENDING,RUNNING,SUCCESS, orFAILED) - A per-node status breakdown showing how each node in the graph fared
- Timestamps for when the run was enqueued and when it completed
- Error details if any node failed
Enqueueing a Run
To start a run, send aPOST request to the runs endpoint for your workflow:
Enqueue a run
202 Accepted:
202 Accepted — run enqueued
202 status code is intentional — it signals that the request was accepted but execution has not yet begun. Save the runId; you’ll use it to poll for status updates.
Flowmatic never blocks on run completion. Even if a workflow has dozens of nodes and processes thousands of CSV rows, the enqueue call always returns within milliseconds.
Run Status Lifecycle
Every run moves through a defined set of statuses as it progresses from enqueue to completion.PENDING
The run has been accepted and is waiting in the queue. No nodes have started executing yet. This status persists until the workflow runner picks up the job.
RUNNING
The workflow runner has picked up the run and is actively executing nodes. The run will remain in this state until all nodes complete (or one fails fatally).
SUCCESS
All nodes executed successfully and the pipeline completed without errors. All emails have been sent (if an OUTPUT node was present).
FAILED
One or more nodes encountered an error that halted the pipeline. The per-node status breakdown will identify which node failed and provide error details.
The SKIPPED Status
In addition to the four run-level statuses above, individual nodes within a run can have aSKIPPED status. This occurs when a workflow contains conditional branch nodes and the execution path did not pass through a particular branch. Skipped nodes are not errors — they simply were not needed for this execution path.
SKIPPED only applies to per-node statuses, not to the overall run status. A run that completes with some nodes SKIPPED can still end in SUCCESS.Per-Node Status
When you fetch a run’s details, the response includes anodes array with the execution status of every node in the workflow. This granular breakdown is invaluable for debugging failures and understanding pipeline performance.
Each node status entry includes:
string
The
id of the node as defined in the workflow graph.string
The node type (
TRIGGER, DATA_SOURCE, AI, FILTER, or OUTPUT).string
One of
PENDING, RUNNING, SUCCESS, FAILED, or SKIPPED.string | null
If the node’s
status is FAILED, this field contains a human-readable error message describing what went wrong. null for all other statuses.string | null
ISO 8601 timestamp of when this node began executing.
null if the node hasn’t started yet.string | null
ISO 8601 timestamp of when this node finished executing.
null if the node hasn’t completed yet.Example Run Detail Response
GET /api/workflows/runs/run_def456 — SUCCESS
AI node:
GET /api/workflows/runs/run_ghi012 — FAILED
ai fails, all downstream nodes (f and out) are set to SKIPPED — the execution path through those nodes was never taken.
Queue Behavior
Runs for the same workflow are serialized — only one run executes at a time per workflow. If you enqueue a second run while the first is stillRUNNING, the second run enters the queue with a status of PENDING and waits until the first run reaches a terminal state (SUCCESS or FAILED).
This serialization is per-workflow. You can run multiple different workflows concurrently without any queuing constraints between them.
- Long-running AI nodes can cause queue backup if you enqueue many runs in quick succession. Monitor queue depth if latency is a concern.
- Batch testing (enqueueing many runs at once) works fine — runs will execute sequentially in the order they were enqueued.
- A
FAILEDrun does not block the queue. The nextPENDINGrun will be picked up immediately after the failure is recorded.
Polling for Run Completion
Since execution is asynchronous, you need to poll the run status endpoint until the run reaches a terminal state (SUCCESS or FAILED). The recommended approach is exponential backoff with a maximum interval.
Polling Endpoint
Bash Polling Example
Poll until completion (bash)
Polling Example with Node.js
Poll until completion (Node.js)
Batch Testing: Enqueuing Multiple Runs
You can enqueue multiple runs against the same workflow in rapid succession — for example, to test a pipeline with several different CSV uploads. Each enqueue call returns immediately with a uniquerunId. Flowmatic queues them all and processes them one by one in order.
Enqueue three runs in parallel
PENDING state initially. You can poll each runId independently to track their individual progress.
End-to-End Run Workflow
1
Upload your CSV
Send a
POST /api/uploads request with your CSV file. Save the returned uploadId — you’ll reference it in your DATA_SOURCE node.2
Create or update your workflow
Send a
POST /api/workflows (or PATCH /api/workflows/:workflowId) with your workflow graph, including the uploadId in the DATA_SOURCE node’s data object.3
Enqueue a run
Send
POST /api/workflows/:workflowId/run. Save the runId from the 202 response.4
Poll for completion
Call
GET /api/workflows/runs/:runId in a loop with exponential backoff until status is SUCCESS or FAILED.5
Inspect results
On
SUCCESS, your emails have been sent. On FAILED, check the nodes array for the failed node’s error field to understand what went wrong, then fix your workflow or data and enqueue a new run.Next Steps
Workflows
Understand how to structure workflow graphs, nodes, and edges.
Node Types
Deep-dive into node configuration and the template variable system.