Control Flow
Sub-Workflow Node Reference
Technical reference for `subWorkflow`, including nested execution limits, input mapping, and output resolution.
Updated 2 min read
Overview
subWorkflow executes another saved workflow inside the current run. It is designed for reusable pipelines and nested templates.
Configuration / Settings
| Setting | Type | Required | Details |
|---|---|---|---|
workflowId | string | Yes | Selected saved workflow to execute. |
workflowName | string | No | Stored for display only. |
inputMapping.source | previous, trigger, none | No | Controls where child input comes from. |
inputMapping.fieldMapping | object | No | Optional remapping layer before the child workflow runs. |
Inputs Expected
previous: uses the upstream node output.trigger: uses the original parent trigger/file-input payload.none: runs the child workflow without input.
Variables Exported / Outputs
Output shape: whatever the child workflow returns
Return-value priority:
workflowOutputnode output- legacy output-node data such as
downloadOutputoremailOutput - last completed node output
Common Use Cases
- Reuse the same fill-and-deliver pipeline across many parent workflows.
- Hide a complicated approval or enrichment flow behind one node.
- Keep parent workflows readable while moving heavy logic into dedicated child templates.
Edge Cases
- Circular references are blocked.
- Nesting depth is capped at 10.
- Client-side sub-workflow execution cannot run server-only nodes such as Google Sheets or Drive actions.
- Child workflows inherit parent
context.data, which allows variable resolution against earlier parent nodes.