Loop N times
Use the Loop N times action A tool for building the processes, logic, and direction within workflows. Actions are the steps the workflow performs to complete a process. 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:
-
Add the action to the workflow and open the configuration panel.
- Find the action in the Logic and flow action group in the action toolbox.
or
Type the action name in the Search field at the top of the action toolbox.
- Drag the Loop N times action to the designer canvas.
- Click the action to open the configuration panel.
- In the Repeat Count field, enter the number of times you want the loop to run.
- 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 |