Loop Node

The Loop Node is a group node that allows you to execute a sequence of child nodes multiple times, either for a fixed number of repetitions or while a specific condition is met.

Loop Types

The Loop Node’s behavior is determined by its configuration type.

Repeat (REPEAT)

This type executes the child nodes a fixed number of times.

  • times: The number of times to repeat the loop. Can be a number or a dynamic expression.
  • contextKey: An optional context variable name to store the current loop index (0-based).
  • breakCondition: A JSONata expression. If it evaluates to true during any iteration, the loop will terminate early.
  • delay: A delay in milliseconds to wait between iterations.
  • concurrency: The number of iterations to run in parallel.

While (WHILE) - Future

(Note: The schema defines a WhileConfig, but it is not currently selected in the LoopNodeConfig type. This section is for future reference.)

This type executes the child nodes as long as a condition is true.

  • predicate: A JSONata expression that is evaluated before each iteration. The loop continues as long as it returns true.
  • maxTimes: A safeguard to prevent infinite loops.
  • delay: A delay in milliseconds between iterations.