Nodaro Docs
DocumentationNode ReferenceModelsAI Agents (MCP)DevelopersSelf-hostingResearch
Automate

Sub-Workflow

Put a whole workflow inside another as one node with typed inputs and outputs. Create a new one in place or reuse an existing workflow, up to 5 levels deep.

The Sub-Workflow node puts a whole workflow inside another one as a single node. From the outside it looks like any other node, with inputs, outputs and a status. Click its expand icon to edit the inner workflow in place, and a breadcrumb at the top of the editor shows where you are. Use it to reuse one pipeline in many workflows, or to keep a large workflow easy to read.

When to use it

  • You use the same video composition pipeline in several content workflows.
  • You want a processing chain, such as Remove Background followed by Upscale Image, as one reusable node.
  • Your workflow has grown large, and you want to split it into modules.
  • You want each scene of a film, with its image, animation, speech and lip sync, packed into one node.

Quick start

Add the node

Press Tab on the canvas and choose Automate › Workflows › Sub-Workflow.

Create or choose the inner workflow

To start fresh, save your workflow, then click Create empty sub-workflow in the settings panel. Nodaro creates a child workflow with one Sub-Workflow Input and one Sub-Workflow Output, and opens it for editing. To reuse a workflow you already have, choose it under Workflow instead, then choose a Route.

Build or check the inner workflow

Inside the child workflow, connect the nodes between the Sub-Workflow Input and the Sub-Workflow Output, and set their ports. Click the parent's name in the breadcrumb to return.

Connect it and run

The ports of the route appear as inputs and outputs on the Sub-Workflow node. Connect them like any other node's, for example an Upload Image into an input and an output into Generate Video. Click Run.

Product photoClean shotUpload ImageProduct photoSub-WorkflowClean product shotGenerate VideoStart frame
In the parent workflow, one Sub-Workflow node represents a whole cleanup pipeline between the upload and the video.
Sub-Workflow InputPort: Product photoRemove BackgroundUpscale ImageSub-Workflow OutputPort: Clean shot
Inside the Sub-Workflow, the input port feeds Remove Background and Upscale Image, and the output port returns the clean shot.

Inputs and outputs

The node's inputs and outputs come from the chosen route. Each port of the route's Sub-Workflow Input becomes an input, and each port of its Sub-Workflow Output becomes an output. Every port is colored by its type: text, image, video, audio or any.

A route is one Sub-Workflow Input paired with one Sub-Workflow Output through the same route ID. A workflow can have several routes, and each route is a separate path through it.

Settings

SettingWhat it does
LabelThe node's name in this workflow.
Create empty sub-workflowCreates a new child workflow with one input node and one output node, under this workflow, and opens it for editing. It is disabled until the parent workflow has been saved.
WorkflowReuses an existing workflow. The list shows every workflow that has at least one route, with its number of routes. Child workflows that belong to other nodes are hidden.
All projectsOff by default, so the list shows the current project only. Enable it to see workflows from every project.
RouteThe route to use, when the workflow has more than one. Each route shows its number of inputs and outputs.
InterfaceThe inputs and outputs of the chosen route. Refresh reloads them after you change the inner workflow.
View WorkflowOpens the inner workflow in a read-only viewer, without leaving the page.
Open WorkflowOpens the inner workflow for editing, like the expand icon on the node.
View modeHow the node looks on the canvas. Ports shows the inputs, the outputs, the status and a preview of the result.

Edit the inner workflow in place

Click the expand icon on the node, labeled Edit referenced workflow, or click Open Workflow in the settings panel. The editor opens the inner workflow, and a breadcrumb at the top shows the path, for example Launch video › Clean product shot. Click any part of the breadcrumb to jump to that level. The breadcrumb disappears when you return to the first workflow.

If the current workflow has unsaved changes, the editor asks whether to save or discard them before it opens the inner workflow.

Rules for callable workflows

When you save a workflow that contains Sub-Workflow Input or Sub-Workflow Output nodes, Nodaro checks three rules:

  • Every Sub-Workflow Input has a Sub-Workflow Output with the same route ID.
  • Every Sub-Workflow Output has at least one port.
  • No two Sub-Workflow Input nodes, and no two Sub-Workflow Output nodes, share a route ID.

A save that breaks a rule is refused, and each problem is listed.

How it runs

  • Only the route runs. The nodes connected downstream of the route's Sub-Workflow Input run. Other nodes in the inner workflow do not.
  • Up to 5 levels deep. A sub-workflow can contain sub-workflows, down to 5 levels.
  • No loops. A workflow cannot call itself through the same route, directly or through other workflows. The same workflow can still be called through a different route.

Credits

The Sub-Workflow node is free. Every node that runs inside it is charged at its usual price.

Tips

  • Keep nesting shallow. The limit is 5 levels, and deeply nested workflows are harder to debug.
  • Create empty for one-off modules. A child made with Create empty sub-workflow stays private to its parent and does not clutter the project's workflow list.
  • Choose an existing workflow for shared building blocks. A normal workflow stays in the list, and any parent can reuse it.
  • Refresh after changes. When you add, remove or retype ports in the inner workflow, click Refresh in the parent.
  • Name each node for its job. A label such as "Clean product shot" explains the node's role in the parent.
  • Publish instead of share. To offer a pipeline to other people as a versioned node, publish it as a Component.

Frequently asked questions

Last updated on

On this page