Skip to main content
Use for_loop_node to repeat actions for each value in a list—processing search results, downloading multiple files, or clicking through items.

Structure

Properties

PropertyTypeDescription
variable_namestrParameter to iterate over
nodeslist[action_node | if_else_node]Actions for each iteration
reset_nodeslist[action_node | if_else_node]Actions to run after each iteration
on_error_in_loop"continue" | "break" | "raise"Error handling behavior

The index Variable

Inside a loop, {variable[index]} references the current iteration’s value:

Using Multiple Variables in a Loop

You can iterate over multiple parameters in parallel by passing a comma-separated list to variable_name. Important: The first in variable_name is the main loop variable that controls:
  • How many iterations run (loop length)
  • Which index is used for each step
All additional names in the list are synced to the same index. In other words:
  • variable_name: "primary_var,secondary_var" → loop length comes from primary_var
  • {primary_var[index]} and {secondary_var[index]} both use the same index on each iteration
For each iteration, {variable[index]} is expanded for every name in the list:
If your parameters are:
  • primary_var = ["Value A1", "Value A2"]
  • secondary_var = ["Value B1", "Value B2"]
Then:
  • Iteration 1 uses {primary_var[index]}"Value A1" and {secondary_var[index]}"Value B1"
  • Iteration 2 uses {primary_var[index]}"Value A2" and {secondary_var[index]}"Value B2"

Data Sources

Loop variables can come from:
SourceWhen to Use
input_parametersKnown values before execution
generated_parametersValues extracted during automation
secure_parametersSensitive values from secure storage
For dynamic iteration, extract values first:

Reset Nodes

Actions that run after each iteration to return the browser to a known state. Essential for loops that navigate away from the starting page.

Reset Strategy Recommendations

ActionReliabilityUse When
close_tabs_untilHighActions open new tabs
go_to_urlHighNavigate to known URL
click_element (navbar)MediumPersistent navigation exists
go_backLowAvoid—fails on errors
Avoid go_back for reset nodes. If an error occurs mid-loop, the browser may be on an unexpected page.

Error Handling

BehaviorDescription
"raise"Stop automation on error (default)
"continue"Skip failed iteration, continue to next
"break"Stop loop, continue with next node outside loop
Use "continue" when some items may fail but you want to process as many as possible (e.g., downloading files where some may be missing).

Common Patterns

Download Multiple Files

Process Items and Return

Limitations

  • Nested loops are not supported
  • Variable must be populated before loop execution
  • Only action_node and if_else_node allowed inside loops