Workflows

Sub-workflows

A Sub-Workflow node runs another workflow as a single step. Use it to factor out reusable subgraphs, hide complexity from the parent, and version each layer on its own cadence.

What you'll learn
  • How to nest a workflow inside another
  • How input and output are wired between parent and child
  • Common composition patterns

Add a Sub-Workflow node

  1. 1

    Drop the node

    Drag the Sub-Workflow node onto the canvas like any other node.
  2. 2

    Pick the child workflow

    In the Properties panel, pick a target workflow from the dropdown. Only published workflows in the same workspace are selectable.
  3. 3

    Pin a version

    Optionally pin the child to a specific version. Pinned versions never change even when the child is republished — guard against silent regressions in production.
  4. 4

    Wire input and output

    The child's trigger payload is taken from the parent's upstream input. The child's Output node value becomes the Sub-Workflow node's output and flows downstream in the parent.

Composition patterns

Three patterns where sub-workflows pay for themselves.
  1. 1

    Shared utility

    Factor out a piece of logic used by many parents — "enrich customer record", "post a Slack digest". Edit it once, every caller benefits.
  2. 2

    Domain decomposition

    Split a sprawling workflow into named sub-workflows by domain — Sales sub, Support sub, Finance sub. Each owner edits their piece without merge conflicts on the parent.
  3. 3

    Conditional pipelines

    Branch the parent into different Sub-Workflow nodes based on a Condition. Each branch picks a specialized pipeline — refund flow, replacement flow, escalation flow.

Frequently asked questions

How deep can nesting go?
Practically, three to four levels is the limit before observability gets noisy. The platform enforces a hard cap of 8 levels to prevent runaway recursion.
Does the child workflow inherit the parent's policies and guardrails?
No. Each workflow owns its own policy and guardrail bindings. The child runs under its own configuration, which makes sub-workflows safe to share across teams.
How does observability work across the nesting?
The parent run's trace contains a link to the child run's trace. Click through to drill into the child without losing the parent context.