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

SettingTypeRequiredDetails
workflowIdstringYesSelected saved workflow to execute.
workflowNamestringNoStored for display only.
inputMapping.sourceprevious, trigger, noneNoControls where child input comes from.
inputMapping.fieldMappingobjectNoOptional 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:

  1. workflowOutput node output
  2. legacy output-node data such as downloadOutput or emailOutput
  3. 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.