Do-While Loop Node
Repeats a set of tasks while a condition is true.
Input Fields
Task Name: Descriptive name for this loop.
Loop Condition: JavaScript expression evaluated after each iteration. Loop continues while this is true. Example: ${workflow.variables.counter} < 10
Loop Tasks: Tasks to execute in each iteration. These run before the condition is checked.
Max Iterations: Safety limit to prevent infinite loops. Loop stops after this many iterations regardless of condition.
Loop Counter Variable: Name of variable to track iteration count (automatically incremented).
How It Works
- Executes loop tasks at least once
- Checks condition after each iteration
- Continues if condition is true, stops if false
- Stops if max iterations reached
- Loop counter is available as a workflow variable
Tips:
- Always set a reasonable maximum iteration limit
- Ensure loop condition will eventually become false
- Use loop counter in workflow variables for tracking
- Test with small iteration counts first
Need help? Have feedback?