Skip to main content

Manual Runs and Run History

A standalone workflow (one that lives in the workflows list, not inside a proxy) can be run on demand, and Zerq keeps a history of workflow runs so you can see what ran, when, how long it took and where it failed, including runs nobody was watching: schedules, Kafka messages, emails, sub-workflows and guardrails.

In the console, standalone workflows are created and published in Automation › Workflows (Standalone Workflows), and run history is on the Automation › Executions page (Executions).

Run a workflow now​

In the console, open the workflow and click Run now in the editor header. It works for every trigger type; with several triggers, choose the one to start from under Start from, and the input box describes what the JSON becomes for that trigger (a schedule takes none). See Run now. Through the API:

POST /api/v1/workflows/{id}/run runs the workflow's published version immediately. It needs the modifier role and is recorded in the audit log (action workflow / run, without the response body).

Entry triggerWhat the request body becomes
Manual TriggerThe trigger's input field: {{ $json['m1'].input.order_id }}
HTTP TriggerThe body of a POST request (path /manual-run, Content-Type: application/json), as if a client had called the route
Called by WorkflowThe trigger's input ({{ $json['workflow_trigger_1'].input }}), checked against its input_schema first (a mismatch answers 400); the answer has return: {status, body} from its Return node
Cron TriggerNot used. The trigger gets what the schedule would give it, with the slot set to now: {schedule, timezone, run_id, slot}
Kafka ConsumerA test message {key, value, headers, topic} (all optional). The trigger gets it like a consumed message: value arrives as message, topic defaults to the configured topic, partition is 0 and offset is -1
IMAP TriggerA test email {subject, from, to, body_text} (all optional strings). The trigger gets it like a received email, with date set to now, the configured mailbox, an empty body_html and uid 0

Running a cron, Kafka or IMAP workflow by hand runs it once, outside its schedule: it does not move the schedule, take a schedule slot, read or commit Kafka offsets, or touch the mailbox. It is recorded with mode manual.

The body is optional and must be JSON. The run stops after the workflow's settings.timeout_ms (60 seconds when not set, at most 10 minutes).

curl -X POST "$ZERQ/api/v1/workflows/$WORKFLOW_ID/run" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"order_id": "A-1001"}'
{
"run_id": "4f0c…",
"workflow_id": "6650…",
"version": 3,
"draft": false,
"status": "succeeded",
"recorded": true,
"duration_ms": 41,
"outputs": { "m1": { "trigger": "manual", "triggered_at": "…", "input": { "order_id": "A-1001" } } },
"response": { "status_code": 200, "headers": {}, "body": { "ok": true } }
}
  • response is there when the run reached a Response node.
  • A run that fails still answers 200, with "status": "failed" and error. 404 means the workflow does not exist, 409 that it was never published, 400 that the body is not JSON, the workflow has no trigger, has several and trigger_node is missing or not one of them, or a field of a Kafka or IMAP test message has the wrong type.
  • A standalone workflow with several triggers needs ?trigger_node=<node id>: the run starts from that trigger (a schedule runs through its schedule's entry point with a test slot). With one trigger, trigger_node is optional and must name it.
  • Add ?draft=true to run the draft instead. A draft run is a test run, like Test workflow in the editor: it is not kept in run history ("recorded": false).
  • A standalone workflow has no route, so a Proxy node (Forward to upstream) takes its error branch with response.error = Forward to upstream needs a route's collection: it works in workflows that a proxy runs; in standalone workflows use HTTP request. Publishing such a workflow warns about it (warnings). Use an HTTP Request node to call a URL.

From an AI assistant, the Management MCP tool run_workflow does the same (id, optional input object, optional draft, optional trigger_node).

Run history​

What is recorded​

RunRecorded
Schedules (cron), Kafka messages, emails (IMAP)Always
Manual runs (/run, run_workflow)Always (draft runs never)
Sub-workflows (Execute Workflow node, AI Agent workflow tools)Always, linked to the calling run (trigger.parent_run_id)
AI Gateway guardrail workflowsAlways (mode: guardrail)
Error workflowsAlways (mode: error_handler), linked to the failed run (trigger.parent_run_id)
Async sub-workflows (Execute Workflow mode: async)Always, linked to the calling run (trigger.parent_run_id)
API requests through a proxy's workflowOnly when the run fails, or when the workflow saves run data (below)
Test runs from the workflow builderNever

A run that is still going after 5 seconds shows as running until it ends. Recording never slows down or fails a run: runs are written in the background, and if the database cannot keep up a record is dropped (counted in zerq_workflow_run_records_total{result="dropped"}).

Each run has its workflow, the published version that ran (0 when the definition has no version, see below), the mode (gateway, background, manual, sub, guardrail, error_handler), the trigger (node type and id, the proxy for proxy runs, the calling run for sub-workflows, the failed run for error workflows), the status (running, succeeded, failed), start and end time, duration, the error, handled_errors, and every executed node with its status, duration and error.

Version​

version is the published version that ran: for manual runs and a standalone workflow's schedules the workflow's published version, for sub-workflows (Execute Workflow node, also mode: async, and AI Agent workflow tools) the called workflow's published version, and for requests through a proxy and guardrail runs the published version of the workflow that ran (a proxy runs the published version of its own workflow, or of the shared workflow it uses). It is 0 (shown as —) when the definition that ran has no published version, for example a proxy whose workflow the startup migration has not moved into the workflows store yet.

Returned value​

A run that ended at a Return node keeps what it returned, and so does a manual run or a sub-workflow that ended at a Response node:

"return": { "node_id": "return_1", "node_type": "return_node", "status": "success", "body": { "order_id": "A-1001", "total": 42.5 } }
"return": { "node_id": "response_1", "node_type": "response_node", "status": "error", "status_code": 404, "body": { "error": "not found" } }
  • status is the Return node's success or error; for a Response node it is success below HTTP 400 and error from 400, with the HTTP status in status_code. Response headers are not kept.
  • It is kept whether or not the workflow saves run data. The run (GET /api/v1/workflows/runs/{run_id}, viewer role) and the run list show return without the body; the body is read with the run's data (GET /api/v1/workflows/runs/{run_id}/data, modifier role, audited).
  • The body is masked when it is saved, with the same rules as saved run data (values under names that look like secrets become [REDACTED], also inside JSON text), and capped at 16 KB: a larger body is left out, return keeps its status and the run says return_truncated: true.
  • The answer a proxy's workflow sends to an API client is never kept here, and neither is a Response node in a schedule, Kafka or email run.

Viewers see how a run ended (which step answered and with what status), like the run's error message. The returned body is a step's output and can hold business data, so it is treated like saved run data: modifiers read it, and each read is audited.

Handled errors​

Many steps have an error (or invalid) branch, so a workflow can catch a failure and carry on. Such a run succeeds, but the step that took its error branch is recorded with the status handled_error and its error text, and the run counts them in handled_errors. A step counts as a handled error when it took its error or invalid output, or when its output has an error field. The run's own status does not change: a run whose failures were all handled is succeeded.

The error text is the step output's error; for HTTP Request and Proxy steps, the response's error (for example a connection error) or, when the upstream answered with an error status, HTTP <status> (for example HTTP 503); otherwise took the error branch (or invalid). The response body is never part of it.

Filter with status=handled_error to find runs with at least one handled error, whatever their own status.

Reading run history​

Both endpoints need the viewer role (or the MCP tools list_workflow_runs and get_workflow_run):

# Failed runs of one workflow since 1 November, newest first
curl "$ZERQ/api/v1/workflows/runs?workflow_id=$WORKFLOW_ID&status=failed&from=2026-11-01T00:00:00Z" \
-H "Authorization: Bearer $TOKEN"

# One run with its nodes and what it returned
curl "$ZERQ/api/v1/workflows/runs/$RUN_ID" -H "Authorization: Bearer $TOKEN"

Filters: workflow_id, status (running, succeeded, failed, or handled_error), trigger (entry node type, for example cron_trigger), mode, from and to (RFC 3339 times on the start time), page and page_size (50 by default, at most 200). The answer is {items, total, page, page_size}.

The workflows list (GET /api/v1/workflows) filters on the server before paging: kind, trigger, q, published=true|false (whether the workflow has a published version) and exclude_proxy_owned=true (leaves out proxies' own workflows; workflows that proxies share stay). For example published=true&exclude_proxy_owned=true&trigger=workflow_trigger lists the workflows another workflow can call by id. The Management MCP tool list_workflows takes the same filters.

The workflows list and a single workflow (GET /api/v1/workflows/{id}) also show each workflow's latest run as last_run: {run_id, status, started_at, duration_ms}; it is absent for a workflow that has not run.

Live updates​

The management event stream (GET /api/v1/events/stream, viewer role; see Live updates (SSE)) sends an event with resource_kind: "workflow_run", workflow_id, run_id and status when a recorded run shows as running (after 5 seconds) and when it ends (succeeded or failed). Fetch the run for its details. Runs that are not recorded send nothing. The console uses these events to update Executions, an open run, the editor's Executions tab and header, and the Last run column of the Workflows list.

Saving run data​

By default a run keeps no data, only the status, timing and errors of its nodes. Turn on the workflow setting save_run_data to also keep each node's output (it applies to new runs right after you save the setting or publish), for example to see what an upstream answered when a schedule failed. With it on, successful proxy requests through the workflow are recorded too.

Saved data is protected like other sensitive data in Zerq:

  • Masked when it is saved. Values under names that look like secrets (password, token, api_key, authorization, cookie, client_secret, … also inside JSON text) are replaced by [REDACTED], with the same rules as request and audit logs.
  • Capped at 256 KB per run; outputs that do not fit are left out and the run says data_truncated: true.
  • Modifier only. Run history shows has_data; the data itself is read with GET /api/v1/workflows/runs/{run_id}/data, which needs the modifier role and is recorded in the audit log (workflow / read_run_data, without the response body). There is no MCP tool for it.

Only turn save_run_data on for workflows whose data you are allowed to keep for the retention period.

Retention​

Runs are deleted 14 days after they started. Set WORKFLOW_RUN_RETENTION_DAYS on the server to change it (0 keeps everything). Deletions count in zerq_logs_retention_deleted_total{log="workflow_run"}.