Sub-workflows
Compose workflows from reusable pieces. workflow.chain calls another workflow and can wait for its result; workflow.trigger receives the call, filters callers and passes the data on. Both runs share a correlation id.
When the same process shows up in several workflows (validate a document, notify a team, archive a case), build it once as its own workflow and call it from the others. Each piece stays testable and versioned on its own.
The two nodes
| Node | Where | What it does |
|---|---|---|
workflow.chain | In the caller | Calls the target workflow, in sync mode (waits for the result) or async mode (continues at once). |
workflow.trigger | First node of the target | Receives the call, checks the caller and outputs the data it sent. |
Configure the call
In workflow.chain:
- Target Workflow (
target_flow_definition_id): the workflow to call, chosen from a list. - Payload (
payload): the object to send. Use expressions to build it. Leave it empty to forward the node’s input ($json). - Execution Mode (
execution.mode):sync(default) orasync. - Timeout (ms) (
execution.timeout_ms): insyncmode, how long the call may go without any sign of progress from the target run, 30000 by default.
{
"target_flow_definition_id": "<flow-definition-id>",
"payload": {
"customer_id": "{{ $('Webhook Receiver').item.json.body.data.customer_id }}",
"requested_at": "{{ $now.toISO() }}"
},
"execution": { "mode": "sync", "timeout_ms": 60000 }
}Receive the call
The target workflow starts with workflow.trigger. Its output is the payload the caller sent plus a chain_context:
{
"customer_id": "cus_xyz789",
"requested_at": "2026-11-26T10:15:00.000-05:00",
"chain_context": {
"caller_flow_definition_id": "…",
"caller_flow_instance_id": "…",
"caller_flow_slug": "order-intake",
"caller_node_id": "…",
"correlation_id": "chain-…"
}
}The next node reads {{ $json.customer_id }}. Accepted Callers (accepted_caller_ids) limits which workflows may
call this one; leave it empty to accept any caller. A caller that is not on the list makes the trigger leave through
error.
What the caller gets back
workflow.chain leaves through out with:
| Field | Content |
|---|---|
instance_id | The run of the target workflow. |
status | The final status of the target run in sync mode, or running in async mode. |
result | In sync mode, the target’s result: status, outcome_category, duration_ms, error_summary, metrics and final_output_envelope. null in async mode. |
correlation_id | The id shared by both runs. |
The target’s last output is at result.final_output_envelope.payload:
{{ $json.result.final_output_envelope.payload.approved }}Which version runs
The target runs in the same mode as the caller:
- When the caller is a test run (studio,
testwebhook), the target runs its draft. - When the caller runs a published version, the target runs its default published version. If the target was
never published, the call fails with
No published version found for the target workflow.
Publish the target before you publish a caller that depends on it.
Traceability
Each call generates a correlation_id that both runs keep. The id of the first run of the chain also travels down
every level, so $execution.id points to the root run in every sub-workflow. In the Runs tab, a run that chained
into others lists them so you can open each one.