Loop / Iteration over List
The Loop action lets you go through a list of items (for example, a JSON array) inside a flow and automatically repeat a set of actions for each item, without having to duplicate them.
How it works
- In the Flow Builder, add an action block and choose Loop.
- Enter the list/array to be gone through (it can come from a variable, from an External Request or from another data source).
- Inside the Loop block, add the actions that must repeat for each item (e.g.: send a message, set a variable, call an API).
- Use the current loop item variable (e.g.:
{{item_do_loop.nome}}) to reference the data of each element of the list inside the actions.
Use cases
- Send the user the list of nearby stores, one message per store.
- Follow up on each item of an order individually.
- Build dynamic catalogs from an API response.
Cautions
- Very large lists can increase the flow's execution time — consider limiting the number of items whenever possible.
If you need more help, send a ticket to support.