Loop
Repeat actions in your Fastn flow using loop components. Iterate over data, run fixed repetitions, or use while conditions for workflow automation.


Last updated
Was this helpful?
Repeat actions in your Fastn flow using loop components. Iterate over data, run fixed repetitions, or use while conditions for workflow automation.
The Loop component repeats a set of actions multiple times within your flow. Use it when you need to iterate over a list of items (such as processing each record from an API response), run a block a fixed number of times, or keep executing while a condition remains true. Fastn supports three loop types: Loop N times, Loop over data, and While loop.

You can select the Loop Type and the Data you want to loop over, mapping it from previous flow steps.
Loop N times: Run a block a fixed number of times.
Loop over data: Iterate through each item in a list.
While loop: Keep looping as long as a condition is true.
Use End Loop to mark where the loop finishes.
In the example shown, the Loop Type is set to Loop over data, and the Loop Data field is mapped from a previous step:
This means the loop will go through each block inside the message output from the sendMessage step, allowing you to process every block one by one.

Last updated
Was this helpful?
Was this helpful?
{{steps.sendMessage.output.message.blocks}}
