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