In Power Automate, loops are the engines that drive automation. They allow you to repeat a series of actions without manually duplicating steps. Loops are categorized into three distinct types, each serving a specific role in business logic.

1. The Simple Loop (Fixed Repeater)

A Simple Loop repeats actions for a specific, predetermined number of times. You define a "Start from" value, an "End to" value, and an "Increment" (how much to add each time). PA automatically creates a Loop Index variable to track the current iteration.

Business Example: Generating Weekly Batch Reports A manager needs to generate the same report for the last 5 business days. The loop starts at 1 and ends at 5, incrementing by 1 to process each day.

 

2. The Loop Condition (True Conditional)

The Loop Condition repeats actions as long as a specific logical statement remains True. It checks the condition before each iteration. If the condition is false at the very beginning, the actions inside will never run.

Business Example: Waiting for a File Download A flow needs to move a monthly statement from the "Downloads" folder to "Archive." However, the flow must wait because the website takes an unpredictable amount of time to generate the file.

Related Offerings


T3. The For Each Loop (List Processor)

The For Each loop is designed to iterate through a collection of data, such as a List, a Data Table, or a Data Row. It automatically stops once it reaches the end of the collection.

Business Example: Processing an Excel Invoice List An automation reads an Excel sheet containing 100 rows of vendor data. The For Each loop takes one row at a time, extracts the email address, and sends a payment confirmation.

4. Advanced Flow Control: Exit and Next

To make loops resilient, PA uses "Flow Control" actions. Exit Loop stops the process entirely if a critical error occurs, while Next Loop skips the current item and moves to the next one if a specific condition (like a blank cell) is met.

Business Example: Payroll Processing with Error Handling During payroll, the flow loops through employees. If an employee is missing a Tax ID, the flow should skip them (Next Loop) rather than stopping the entire payroll run for everyone else.