Skip to main content

Execute Workflow Node

Runs another workflow (a sub-workflow) and waits for its answer, or starts it in the background and continues at once (mode: async). Build shared steps once, such as a customer lookup, an audit entry or a notification, and call them from many workflows. Type: execute_workflow_node.

How it works​

  • workflow_id names the workflow to run: a workflow id (a standalone workflow in Automation › Workflows) or a proxy id (that proxy's workflow; existing nodes keep working). Proxy ids are looked up first in inline and dual store mode, the workflows store first in store mode; a proxy linked to a shared workflow names that workflow.
  • The called workflow starts with either trigger (a standalone workflow with several triggers is started from its Called by Workflow trigger, else its Incoming request trigger; the step's Workflow list offers such workflows by that trigger):
    • Called by Workflow (workflow_trigger, recommended for helpers): the node's input is the trigger's input, checked against its optional input_schema (a mismatch takes the error branch and the workflow does not run). Its Return node is the answer: the body becomes result; status error takes the error branch.
    • HTTP trigger: the node's input becomes the request body (POST /sub-workflow), read as {{ $json['http_trigger_1'].request.body }}. Its response node is captured, not sent to anyone: its body becomes result, with status_code and headers.
  • A standalone workflow runs its published version. A proxy's workflow runs whether or not it is enabled or published as an API: a proxy kept as a draft with its workflow switched off is a private helper that only other workflows can call.
  • It runs as its own workflow: its own collection is used by proxy_node, and AI Agent memory in it is kept separately. It has its own trace span (workflow sub_workflow) and its own run in run history (with the caller's run as parent).
  • Sub-workflows can be nested up to 5 levels. A workflow that calls itself stops with nested sub-workflows exceed the limit of 5.

Config​

  • workflow_id (required): the workflow id or proxy id to run. The step's Workflow list has two groups: Workflows (published workflows from Automation › Workflows that start with Called by Workflow or Incoming request, saved by workflow id) and Proxy workflows (by route) (proxies whose workflow starts with an HTTP trigger, saved by proxy id as before). It leaves out the workflow being edited. A saved id the list does not offer stays selected and shows as (not found). When the chosen workflow starts with Called by Workflow, the step shows the fields of its input_schema (name, type, required) under the list, so you know what to put in input.
  • timeout_ms: time limit for the sub-workflow, 1,000–600,000 (default 60,000). In async mode it bounds the background run.
  • mode: wait (default) or async; see Fire and forget. In the step's settings, Mode offers Wait for the answer (saved by leaving mode out) and Fire and forget (async), which also describes the async output.

Inputs​

  • input: an object, JSON text or expression, for example {"customer_id": "{{ $json['http_trigger_1'].request.body.id }}"}.

Outputs​

Called by Workflow target:

FieldDescription
matched_outputsuccess, or error when the input does not match input_schema, the workflow could not run, failed or timed out, or its Return node has status error
resultBody of the Return node (kept on error too)
statusThe Return node's status (success or error), when it reached one
returnedfalse when the workflow ended without a Return node; this is still success
workflow_idThe workflow that ran
errorWhy it failed; for a returned error, the body's error or message text

HTTP trigger target:

FieldDescription
matched_outputsuccess, or error when the workflow could not run, failed, timed out, or responded with status 400 or higher
resultBody of the sub-workflow's response node (kept on error too)
status_code, headersStatus and headers of that response
respondedfalse when the sub-workflow ended without a response node (for example with stop_node); this is still success
workflow_idThe workflow that ran
errorWhy it failed; for an error response, includes the body's error or message text

Fire and forget (mode async)​

With mode: async the node starts the sub-workflow in the background and continues at once, without its answer. Use it for work the caller does not wait for: notifications, audit entries, slow follow-ups.

  • The same checks run first: the workflow must exist and start with a Called by Workflow or HTTP trigger, the input must match its input_schema, and the nesting limit (5 levels) applies. A failed check takes the error branch and nothing starts.
  • The sub-workflow keeps the caller's context (its collection, call depth and run, so its run history entry names the caller's run as parent) but not its cancellation: it keeps running after the caller's request or run has ended. It is bounded by its own timeout_ms instead.
  • Each server runs at most 32 async sub-workflows at a time. When that many are running, the node takes the error branch (too many asynchronous sub-workflows are running) and nothing starts; nothing is queued. The metric zerq_workflow_async_runs_total{result="started|rejected"} counts starts.
  • The sub-workflow's answer and errors are not returned to the caller: look them up in Executions by the run_id. Inside a console test run the sub-workflow is a test run too and is not recorded.
  • An AI Agent workflow tool always waits for its answer.

Output in async mode:

FieldDescription
matched_outputsuccess when the sub-workflow started; error when it could not start
workflow_idThe workflow started
run_idIts run id (run history)
modeasync
errorWhy it could not start

Example​

Helper workflow Look up customer (workflow_trigger_1 with an input_schema requiring customer_id → return_node returning {"customer_id": ..., "tier": ...}), called from an order workflow:

{
"id": "customer",
"type": "execute_workflow_node",
"data": {
"config": { "workflow_id": "<helper workflow id>", "timeout_ms": 30000 },
"inputs": { "input": { "customer_id": "{{ $json['http_trigger_1'].request.body.customer_id }}" } }
}
}

Use {{ $json['customer'].result.tier }} downstream; route error to a fallback.

As an AI Agent tool​

An AI Agent can call a workflow as a tool: add a workflow tool, pick the workflow and describe its arguments. The model's arguments become the workflow's input (Called by Workflow) or request body (HTTP trigger), and its Return node body or response goes back to the model.