Ankur Bawiskar
Tera Patron
Tera Patron

Have you ever encountered a customer requirement where you need to run a loop in a Flow for n number of times? Here’s an easy way to achieve this using the “Do the Following Until” logic + Flow Variables in Flow Designer:

  1. Create a Flow Variable

    • Type: Integer
    • Initialize it with value 0 using the “Set Flow Variables” flow logic.
  2. Add “Do the Following Until” Logic
    Inside this block:
    a) Add your required flow actions.
    b) Use “Set Flow Variables” again to increment the count by using script .

  3. Set the Condition

    • Until count = 3 (or any number you need).

This way, your flow will execute the actions 3 times. Try this approach and enhance your flows to handle looping requirements efficiently!

Here is the working approach

 

run flow 3 times based on flow variable.gif

 

Version history
Last update:
yesterday
Updated by:
Contributors