Run a Loop
Loop through actions and conditions a set amount of times.
Last updated
Loop through actions and conditions a set amount of times.
Last updated
Loops allow you to repeat connected actions and conditions a set amount of times. You can change the amount of times a loop is run by setting the loop count with a number or variable. Actions and conditions connected to the Loop X Times block will then be run that many times. Once the loop has finished actions and conditions connected to the 'After Loop' block will be run like normal. This block will open a world of possibilities for users to explore.
The settings menu will allow users to set a desired loop count to the block, the number imputed in the 'Count' section will determine the amount of times the actions that follows should repeat or 'Loop'. By default this is set to a count of 5, however, you can loop actions up to 1000 times.
Loop Timeout field: This setting let you specify the timeout between loop iterations. The minimum is 100ms and the maximum is 10minutes.
We have put some limitations on loops to discourage abuse of the system:
Loops have a minimum timeout of 1sec between each loop.
You can not run loops inside of loops
A max loop count of 1000 exists
These limitations may change as we monitor how people are using loops.
Additionally two new variables have also been released with this new action block, they are:
{loop_count} - Returns the current loop count. Starts at 1.
{loop_index} - Returns the current loop index. Starts at 0 and useful for when looping through collections.
Loops also have a unique Stop a Loop action that can be run to stop any running loop. You can use this action with conditions to conditionally stop a loop.