In this tutorial, I will describe how to use the Do Until action in Power Automate and how to configure its key parameters, such as Count and Timeout.
While working on a Leave Management App approval process, I needed to wait until multiple conditions were met, such as the leave request being marked as approved and a manager’s comment being provided.
To handle this, I used the “Do Until” action in Power Automate, which helped me repeat specific actions until both conditions were met.
Along with the main concept, I have also covered What is Do Until loop in Power Automate, Power Automate Do Until limits, Power Automate delay until a specific time, How to delay until a particular time inside a Do Until loop, and how to Add Multiple Conditions in Power Automate Do Until Action.
What is Do Until in Power Automate?
The Do Until action in Power Automate is a type of loop that continues to run a group of actions until a specific condition is met.
Unlike the Apply to Each loop, which runs a fixed number of times (based on an array), the Do Until loop keeps repeating until your condition is met, no matter how long it takes, or how many times it needs to check.
Configure Do Until in Power Automate
When you add the Do Until action in Power Automate, you can control the loop’s duration and repetition count by configuring the advanced settings.
To view these settings, click “Show all” to display the advanced parameters, where you can change the limits.
- Count: The Count property defines the maximum number of times the loop can run. If the condition is not satisfied, the loop will repeat until it hits the defined count. If the condition is satisfied before the loop reaches the count, it will stop automatically.
- Timeout: The Timeout property specifies the duration for which the loop should continue running. If the condition is never satisfied, the loop will stop automatically after the timeout period. The timeout value must be provided in ISO 8601 format.
Examples:
- P1D – 1 day, and D is the day unit
- PT1H – 1 hour, T represents time units and H for Hour
- PT4M – equals to 4 minutes
- P4DT4H4m – is 4 days, 4 hours, 4 minutes
The Do Until loop stops if the condition is satisfied to true, the count number is reached, or the time-out duration is reached.

Read Convert Time Zone in Power Automate
Do Until Limits in Power Automate
By default, it will take the count value as 60, which means the loop will repeat 60 times.
Note:
Power Automate Do until Count Limit: The maximum limit of count value, we can set is 5000.

Time Out Limit: By default, it will show the time out value as PT1H, which means 1 Hour.
Note:
The maximum limit of timeout value is P30D or P1M, that represents 30 days or 1 month the Do until loop will repeat.

This is all about the Do Until loop and how to configure and limit it in a Power Automate flow.
Do Until Loop in Power Automate Example
To check on how to work with the Do until loop in Power Automate, follow the example below:
Example: Let me show you a simple example of how Do Until will work in Power Automate by building an Instant cloud flow.
Suppose I will take the integer value in a variable as ‘10‘. My requirement is to increase this variable value to 100.
Follow the steps below:
- On the Power Automate Home page, go to +Create –> Instant cloud flow to trigger a flow manually.
- Now, add an action to initialize a variable. Then click on +New step > Initialize a variable. Set the parameters below to initialize the variable:
- Name– Give a variable name
- Type– Select the type from the drop-down i.e., Integer
- Value– Set an initial value for the variable, i.e., 10

- Next, add the do until control action to check until the condition matches the specified value [100]. Set the values such as:
- Choose a value(1st)– Number
- Operator– Is equal to
- Choose a value(2nd)– 100

According to the condition, the flow will run until the variable equals 100.
- Add a Compose action inside the ‘do until‘ action to show the variable value. Take the initialized variable value.

- After that, I will add an action to increase the variable with a specified value. Select the Increment variable. Set the variable name and the value that will increment.

- Let’s save the flow and test it manually. Then click on Test > Run the flow. The flow will run successfully, and the loop will stop when the provided condition is met, i.e., until the variable value equals 100.
Refer to the image below:

This is how to use the do-until loop in Power Automate.
Read Copy List Items To Another List In SharePoint Using Power Automate
Power Automate Do Until Count
Here, let’s check an example of how to work with the do until count for the loop condition in Power Automate.
Example:
I have taken a SharePoint list named ‘Project Tracker‘ with a few columns that look like in the image below:

My requirement is: By default, Is Approved? The column will be set to ‘No’; the flow will repeat until the manager sets ‘Is Approved’ to ‘Yes’ and emails the assigned person about project approval.
If the Is Approved column is not approved, the loop will continue to run.
Check the steps below:
- In the Power Automate Home page, create an Automated cloud flow with a ‘When an item is created’ trigger. Set the site address and list name.
- Next, add an Initialize Variable to set the boolean value. Provide name, type as a boolean, and value as false.

- After that, add a Do Until action, and in the Loop Until parameter, choose the value like below:
- Count: Here, I am taking the count value as 10; you can take it according to your requirements.
The loop will repeat when the given condition is met, or the count value is reached.
| Choose Value | Operator | Choose Value |
| Project Completed (Initialize variable) | is equal to | true |

- Under the Do Until loop, add an action to delay and continue the flow repeat for 5 seconds.
- Count: Take count according to your need.
- Unit: Select the time unit from the drop-down options.

- After that, add the Condition control action to set the condition as below:
Condition Expression: Is Approved is equal to true

- Then, take the Set variable under True condition and set the parameters like below:
- Name: Choose a name from the drop-down.
- Value: Enter value as true.

- Then, add the Send an email(V2) flow action and fill in the details like To as assigned person email, subject, and Body.

- Now, save and test the flow. Create an item in the SharePoint list like below:

- The flow will trigger and start running when the item is created in the SharePoint list. The Do until loop will continue to repeat in the image.
Note:
The Do until loop will repeat until the condition is met or count we provided is reached.

- Now, chnage Is Approved? If the column value is Yes, the condition will be met and stop the loop repetition.

- The image below represents the number of times the loop has repeated before the condition is satisfied.

This is how to use Do Until loop count in Power Automate.
Power Automate Do Until Timeout PT1H
To work with Power Automate, do until loop timeout for 1 hour. Check out the requirements below.
Example:
I have created a SharePoint list named ‘Products Ordered Details’ with several columns.
Refer to the image below:

In the above SharePoint list, when a user adds an item to the list:
- An approval request should be sent to the Review By. If the outcome of the approval request is ‘Approved’, update the Discount Approved field.
- If the condition is not met, the loop will continue for 1 hour and then stop.
Go through the steps below:
- In the Automate cloud flow, choose the ‘When an item is created‘ trigger. Set the parameters such as Site Address and List Name.

- After that, add a Do Until loop to repeat the loop until the Approval request is approved.
| Choose Value | Operator | Choose Value |
| Outcome of approval request | is equal to | Approve |

- After that, Start and wait for an approval flow action, set the required properties:
- Approval type– Approve/Reject – First to Respond.
- Title– Select Title from dynamic content.
- Assigned to– Approver name, email from dynamic content.
- Details– Set the details of the approval request.

- After that, I will take a Condition control flow action to provide a condition to check whether the outcome is Approved or rejected.
| Choose Value | Operator | Choose Value |
| Outcome | is equal to | Approve |

- Under the True condition, add the Update item flow action to update the item with an approved discount. Configure the parameters, such as the site address and list name.
- Id: Take the Id column from the dynamic content.
- Title: Choose the Title column from the dynamic content.
- Discount Approved?: Select Yes from the drop-down.

- Under the False condition, take the Update item flow action to update the approved discount value. Set the parameters, such as site address, List name, ID, and Title, from the dynamic content.
- Discount Approved?: Select No from the drop-down options.

- Now that the flow is ready, save and run it manually once. To trigger the flow, add an item to the SharePoint list, as you can see from the image below:

- Now, you can see that the do-until loop will continue to execute repeatedly until it meets the condition or the timeout we provided.

- If the approval outcome is approved, the do-until loop will terminate, and the flow will execute successfully.
Otherwise, the loop will repeat until the provided timeout, i.e., one hour, and then stop.

This is how to provide a time-out in the Do until loop using Power Automate.
Add Multiple Conditions in Power Automate Do Until Action
Sometimes, in real-world automation scenarios, you need your Do Until loop to run until multiple conditions are satisfied, not just one. Power Automate enables you to add multiple conditions using advanced mode or logical operators, such as AND and OR.
Let’s say you have a SharePoint Document Library named “Project Documents”, and each document has metadata columns:
| Column Name | Type |
|---|---|
| ReviewStatus | Choice (Not Started, In Progress, Completed) |
| ReviewerComments | Multiple lines of text |

When a file is added to a SharePoint document library, the manager needs to: Change the file’s status to Completed and add reviewer comments. If the manager does not complete the task within 10 hours, they should receive a reminder email every 10 hours.
Once the manager updates both the status and comments, the person who uploaded the file will receive a notification email confirming the review is completed.
Now follow the steps below:
- Go to Power Automate, click Create, and then select Automated Cloud Flow. Give a Flow name: Wait for Review with Manager Reminders. Choose trigger: When a file is created (properties only). Click Create. Then add the following parameters:
- Site Address: Your SharePoint site
- Library Name: Project Documents

- Then, add ‘Get File Properties’ and use the same Site Address and Library Name. Next, select ID from the trigger.

- Add ‘Do Until’ Control with Multiple Conditions. Click Edit in advanced mode and paste this expression:
@and(equals(outputs('Get_file_properties')?['body/ReviewStatus/Value'], 'Completed'), not(equals(outputs('Get_file_properties')?['ReviewerComments'], '')))

- Then drag ‘Get file properties’ inside the do until. After that, add a Send an email action to notify the manager:
- To: Manager’s email.
- Subject: Reminder: Please review the document @{triggerBody()?[‘{Name}’]}
- Body:
Hi Manager,
Please complete the review for the document: @{triggerBody()?['{Name}']}}.
Update the Review Status to "Completed" and add your Reviewer Comments.
Thanks.

- Still inside the Do Until loop, Add Delay action set below the parameters:
- Count: 10
- Unit: Hours

Once the loop ends (i.e., the review is complete), send an email to the person who created the document.
- After the Do Until, add a Send an email action and provide the below parameters:
- To: Author Email (from Get file properties: Created By Email)
- Subject: Your document has been reviewed
- Body:
Hi @{outputs('Get_file_properties')?['body/Author/DisplayName']},
Your document "@{outputs('Get_file_properties')?['body/{Name}']}" has been reviewed.
You can now check the comments and proceed.
Thanks,
Power Automate System

Now save the flow and test it once. For testing purposes, I changed the delay action count to 2 minutes.
Go to the SharePoint library and add a file; then, leave it for 5 minutes.

Every two minutes, the manager will receive an email.

Then, the manager modified the status to ‘complete’ and added a comment.

Next, the person who uploads the file will receive an email like the one below:

To learn about Power Automate’s delay until a specific time, refer to the tutorial below.
Conclusion
In this Power Automate tutorial, we explored how to use the Do Until loop effectively and how to control its execution with count, timeout, and custom conditions.
I hope you now clearly understand how to configure and use the Do Until loop in Power Automate.
You may like the following tutorials:
- What is Microsoft Power Pages
- Create a File in Power Automate
- Power Automate Copy Folder Structure
- Power Automate Email Body Formatting

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.