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.
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
| Setting | What it does |
|---|---|
| Label | The node's name in this workflow. |
| Create empty sub-workflow | Creates 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. |
| Workflow | Reuses 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 projects | Off by default, so the list shows the current project only. Enable it to see workflows from every project. |
| Route | The route to use, when the workflow has more than one. Each route shows its number of inputs and outputs. |
| Interface | The inputs and outputs of the chosen route. Refresh reloads them after you change the inner workflow. |
| View Workflow | Opens the inner workflow in a read-only viewer, without leaving the page. |
| Open Workflow | Opens the inner workflow for editing, like the expand icon on the node. |
| View mode | How 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
Related
Sub-Workflow Input
Sub-Workflow Output
Component
Components and sub-workflows
Group
Last updated on
JSON Process
JSON Process is a legacy node that filters and reshapes JSON. It is no longer in the node picker, but saved workflows keep running. Use Extract Field instead.
Component
Add a published component, a versioned workflow from the community or your own, as one node. Set its inputs and settings, and it runs as a black box.