Sub-Workflow

Embed another workflow as a single node. Edit the inner workflow inline with breadcrumb navigation.

Overview

The Sub-Workflow node embeds another workflow inside the current one. From the outside it looks like any node – it has input/output ports and a status indicator. Click the Expand icon to edit the inner workflow inline; a breadcrumb appears at the top of the editor showing the nesting path ([Parent] -> [Child] -> ...). Execution is recursive with a maximum nesting depth of 5 levels, and cycle detection prevents infinite loops.

A workflow becomes callable as a sub-workflow when it contains at least one matched pair of Sub-Workflow Input + Sub-Workflow Output nodes sharing the same routeId. Each pair defines a “route” through the workflow; a single workflow can expose multiple routes.

How to add a sub-workflow

Two paths:

Configuration

Field Type Default Description
Label string "Sub-Workflow" Display name for this node instance.
Create empty sub-workflow button n/a Creates and opens a fresh child workflow seeded with one input + one output node. Disabled until the parent has been saved.
Workflow selector none Dropdown to pick an existing standalone workflow to reference. Hides child workflows of other containers.
All Projects toggle off When enabled, shows workflows from all projects (not just the current one).
Route selector none Select which input/output route to use if the referenced workflow exposes multiple routes.
Interface Preview read-only n/a Displays the input and output port definitions of the selected route.
Refresh button n/a Reloads the referenced workflow’s interface definition.
View mode selector Ports How the node renders on the canvas. v1 ships the Ports view (input/output handles + status + preview). Storyboard / Video / Script views land in a later release as plug-ins.
Edit (expand icon on node) button n/a Opens the referenced workflow for editing inline. A breadcrumb appears at the top of the editor showing the nesting path; click any crumb to jump to that level.
View Workflow button n/a Opens the referenced workflow in a read-only viewer modal (does not navigate away).
Open Workflow button n/a Same as the Edit (expand) button – opens the referenced workflow inline with breadcrumb nav.

Inputs & Outputs

Inputs: Dynamic handles based on the selected route’s input port definitions.

Outputs: Dynamic handles based on the selected route’s output port definitions.

When you open a referenced workflow via Expand (or “Open Workflow”), a breadcrumb appears at the top of the editor: [Original Workflow] -> [Sub-workflow A] -> [Sub-workflow B]. Click any crumb to jump to that level. The breadcrumb auto-clears when you navigate back to the original workflow.

If you have unsaved changes when you click Expand, the editor prompts you to save or discard before navigating.

Validation

Workflows that contain sub-workflow-input or sub-workflow-output boundary nodes are validated at save time:

Violations are rejected with 400 invalid_sub_workflow and a structured details array listing each error.

Best Practices

Common Use Cases

Tips