Skip to main content
A run is a single execution of a workflow. When you enqueue a run, Flowmatic acknowledges the request immediately and queues the work to be processed asynchronously — your API call returns in milliseconds regardless of how long the actual pipeline takes to execute. You then poll a status endpoint to track progress, inspect per-node results, and detect any failures. This page explains everything you need to know about run lifecycle, queuing behavior, and monitoring patterns.

What Is a Run?

Each time you trigger a workflow, Flowmatic creates a run record that tracks:
  • The overall execution status (PENDING, RUNNING, SUCCESS, or FAILED)
  • 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
A single workflow can have any number of runs over its lifetime. Runs are independent of each other — re-running a workflow creates a brand new run record and does not affect previous run history.

Enqueueing a Run

To start a run, send a POST request to the runs endpoint for your workflow:
Enqueue a run
Flowmatic responds immediately with 202 Accepted:
202 Accepted — run enqueued
The 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 a SKIPPED 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 a nodes 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
And a run that encountered a failure at the AI node:
GET /api/workflows/runs/run_ghi012 — FAILED
Notice that when 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 still RUNNING, 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.
This behavior has some important implications:
  • 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 FAILED run does not block the queue. The next PENDING run 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)
Start polling 1–2 seconds after enqueueing rather than immediately. A brand new run will always be PENDING for at least a brief moment, so the first request is rarely useful if made instantly.

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 unique runId. Flowmatic queues them all and processes them one by one in order.
Enqueue three runs in parallel
All three runs will be in PENDING state initially. You can poll each runId independently to track their individual progress.
Be mindful of rate limits when enqueuing many runs. If you’re batch-testing, introduce a small delay (e.g., 100ms) between enqueue calls to avoid hitting the API rate limit for the enqueue endpoint.

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.