Flow Control: Conditions, Gates, and Loops
Control how data moves through your flow with conditions, gates and loops.
Condition Node
The Condition node sends what it receives down one of two branches.
- Add a Condition node and connect a value to In.
- If the value is truthy, it leaves through True; otherwise it leaves through False. The other branch gets nothing.
- Invert swaps the two.
- Default is used when nothing is connected to In.
If a false value arrives, the node still fires the False branch (with true as the payload), so downstream triggers work reliably.
Example: check a number against a threshold with a Comparison node, then log only the True branch.
Gate Node
The Gate works like a valve.
- Connect data to In.
- Connect a boolean to Open, or set the Open field.
- When open, data leaves through Out. When closed, it leaves through Blocked instead.
Use case: pause part of a flow without disconnecting anything.
For-Each and Counter Nodes
For-Each
The For-Each node picks one item out of an array by index. It does not loop on its own; pair it with a Counter to step through the list.
- Array (in) and Index (in, or the Index field) choose the item.
- Item is the current item, Index the position, Count the array length, and Done is true on the last item.
Counter
The Counter adds Step to a running count each time it runs and outputs Count. Give each counter a unique Name, and use the Reset port to start again at zero. The count lives in memory for the session.
Iterating a list
- Feed a Counter into the Index port of a For-Each.
- Process Item with the nodes downstream.
- Use Done with a Condition to stop or to run a final step.
Tips
- Name nodes after what they check, for example "Amount over 100".
- Keep branches shallow; a Gate can replace a nested condition.
- Test logic with simple inputs before connecting real data.