Flow logic
Loops and sub-workflows
Reuse workflows with Execute Workflow and process items in batches with Loop Over Items.
Execute Workflow
Execute Workflow runs another workflow and returns its output, like calling a function. The workflow you call must start with a Sub-workflow Trigger, which receives the items you send.
Use sub-workflows to:
- reuse the same steps in several workflows (send a formatted Slack alert, look up a customer);
- keep large workflows readable;
- give an AI agent a tool, with the Call Workflow Tool.
Convert nodes into a sub-workflow
Select nodes on the canvas and press Alt X (or right-click → Convert node to sub-workflow). Triggerflow moves them into a new workflow with a Sub-workflow Trigger and puts an Execute Workflow node in their place.
Loop Over Items
Most nodes already run once per item, so you rarely need a loop. When you do need to process items in batches (for example 50 rows at a time for an API with a rate limit), use Loop Over Items: it runs a sub-workflow once per batch and collects all the results.
Limits
Sub-workflows can call other sub-workflows, up to a maximum depth set by the server (5 by default), which prevents endless loops.