InitfinityTM
Initfinity / Docs / Flow Control: Conditions, Gates, and Loops

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.

  1. Add a Condition node and connect a value to In.
  2. If the value is truthy, it leaves through True; otherwise it leaves through False. The other branch gets nothing.
  3. Invert swaps the two.
  4. 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.

  1. Connect data to In.
  2. Connect a boolean to Open, or set the Open field.
  3. 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

  1. Feed a Counter into the Index port of a For-Each.
  2. Process Item with the nodes downstream.
  3. 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.