Loop N times

Use the Loop N times action A tool for building the processes, logic, and direction within workflows. to run a part of a workflow repeatedly. Any action you place in the loop is run multiple times until the specified number of repetitions is completed.

For example, if you have a process that requires adding an item to a SharePoint list three times, add a Loop N times action to your workflow and place a SharePoint Online Create an item action inside it. Then, set the Repeat Count field for the Loop N times action to 3. In this configuration, the workflow creates an item three times, resulting in three items added to the specified list.

Configure the Loop N times action

See the Loop N times action fields, buttons, and settings table for all the configuration fields.

In the Designer page:

  1. Add the action to the workflow and open the configuration panel.

    1. Find the action in the Logic and flow action group in the action toolbox.
    2. or

      Type the action name in the Search field at the top of the action toolbox.

    1. Drag the Loop N times action to the designer canvas.
    2. Click the action to open the configuration panel.
  2. In the Repeat Count field, enter the number of times you want the loop to run.
  3. Add child actions to the point inside the Loop N times action, as necessary.

Loop N times action fields, buttons, and settings

Field

Description

Variable types

Repeat Count

The number of repetitions for the loop to iterate through.

The maximum number of repetitions is 1,000.

Boolean, Integer