Skip to main content

For loops

For loops is a special type of steps that allows you to iterate over a list of items, given by an iterator expression.


Configuration options

Clicking on the For loop step on the mini-map, it will open the For loop step editor. There are 4 configuration options:

Iterator expression

The JavaScript expression that will be evaluated to get the list of items to iterate over. You can also connect with a previous result that contain several items, it will iterate over all of them.

It can be pre-filled automatically by Windmill AI from flow context:

Skip failure

If set to true, the loop will continue to the next item even if the current item failed.

Run in parallel

Iif set to true, all iterations will be run in parallel.

Parallelism

Assign a maximum number of branches run in parallel to control huge for-loops.

For loop step

Iterate on Steps

Steps within the flow can use both the iteration index and value. For example in ["Paris", "Lausanne", "Lille"], for iteration index "1", "Lausanne" is the value.

Iter value & index