Perfom a repeat action a specific number of times

A Repeat action is based on the resulting list of a Lookup. However, in some situations you want to perform a Repeat action a specific number of times, like 10 times.

You can easily create a function to repeat a specific number of times by yourself.

The source of a Repeat action is a Lookup. So you need to create a Lookup that gives you the amount of results that is equal to the number of times that you want to repeat your action.

Setup

  1. Create the Data item Loop count:
    Loop count Data item

  2. Fill it with numbers without decimals.

Tip: create an Excel sheet with a lot of rows and import that into your Data item.

  1. In the Flow part, create a data Look-up for the number of times you want to execute the repeat. In this example, the repeat will execute 15 times.
    Data look-up creation

  2. Create the repeat, based on the Lookup:
    Repeat set up

  3. There is no need to order the Repeat action.

  4. Design the actions within the Repeat action like normal.

Keep this in mind

Since the Repeat action uses the loop count as Input, you must create the Input for the repeat within the repeat action itself.

That can’t be a list, it must be a single Data item of a data Look-up.

If the repeat is not at its limit yet (step 7 of 10), but the Lookup produces no Output (does not find a Data item to work with), you must end the repeat to prevent unwanted things from happening:
Flow part overview