Do you know what the meaning of Power Automate Do until and what its uses of it are? In this Power Automate tutorial, we will discuss what Power Automate do until, what are the conditions available in Power Automate do until.
Also, by taking some various scenarios, we will see all the limitations, Counts, Timeout settings, etc. in Power Automate. Also, follow the below topics:
- Power Automate do until example
- Power Automate do until timeout Pt1h
- Power Automate do until delay
- Power Automate do until advanced mode
- Power Automate do until max count
- Power Automate do until 1 minute
- Power Automate do until Set variable
- Power Automate do until notification and delay
- Power Automate do until increment
- Power Automate do until boolean
- Power Automate do until status change
- Power Automate do until empty
- Power Automate do until date
In Power Automate, we can find various actions under the control group that is used to custom controls in business flow such as conditions, scope, apply to each, do until, switch, etc.
In this topic, we will discuss the ‘do until‘ condition action. We can find this action under the Control in Power Automate(Before creating a flow make sure to log in the Power Automate with your Microsoft365 office tenant Id).

What is Do until in Power Automate
- In Power Automate, sometimes we need to repeat certain steps to repeat until a specified condition matches the true value. In such a case, we need to use the do until condition action.
- Click on that action where it will ask to choose the values and the operator. Also, we can see the options to Edit in advance mode and change the limits. (Later we will see how to implement these values)

Also, read: Power Automate create a task in Microsoft Planner
Power Automate do until example
Here, we will see an example of using the ‘do until’ action in Power Automate. Let’s create an instant flow that will check and repeat the action until the condition meets true.
On Power Automate, go to +Create(Right Navigation) > Instant cloud flow to create a button flow.

Here we will give a name to the flow and select ‘Trigger the flow manually‘. Press create to start the flow.

Now we will add an action to initialize a variable. Then click on +New step > Initialize a variable.

Set the below parameters to initialize the variable:
- Name– Give a variable name i.e. VarNumber
- Type– Select the type from the drop down i.e. Integer
- Value– Set an initial value to the variable i.e. 0

Next, we will add the do until control action and add the value that will check until the condition will match the specified value. Click on +New step > Do until action. Set the values such as:
- Choose a value(1st)– VarNumber
- Operator– Is equal to
- Choose a value(2nd)– 20

As per our condition, it will run until the variable is equal to 20. Next, we will add a compose action inside the ‘do until‘ action that will show the variable value. Click on +Add an action > Compose.

Next, we will add an action that will increase the variable with a specified value. Click on +Add an action > 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. Then flow will look like the below:

It will run the flow until the variable value equals 20 by incrementing 5. This is how to use the do until in the Power Automate.
Check out this post: Power Automate Copy Folders + 10 Examples
Power Automate limits do until
In do until action, there is a certain limitation, i.e., it allows you to iterate the loop condition to 5000. And the default value is 60. There is an option for ‘change limits’ that contains 2 sub-options that will help change the limit.
- Count– It indicates how many times the loop will execute and it will be stopped once it reaches the count value.
- For example, we set the count value as 120, if the condition is met at 75 then the condition will come out of the loop in 75 counts.
- By default, the count value is 60 and we can increase the value to 5000.
- Timeout- It carries a value that is used to stop the loop if the condition is not met. By default, the timeout value is PT1H, where
- P stands for Period
- T stands for Time unit
- H stands for Hour
So the PT1H means 1 hour in ISO8601 format. But the maximum duration or timeout for the loop is 30 days. Similarly, we can use the below value as timeout:
- P4D– Indicates 4 Days
- PT5H-equals to 5 hours
- P2DT3H5m– stands for 2 days 3 hours 5 minutes
- PT2M– equals 2 minutes.
Note– Make sure not to use P1M for 1 Minute. It is used to indicate 1 Month. For 1 Minute, it should be PT1M.

If we remove both limits, then we will get an error message such as:
The 'limit' property for action of type 'until' needs to have either count or timeout set.

If we set one of the limits i.e. Count or Timeout then the flow ran successfully. That means the flow will run when the counts or timeout meet the condition. If both are missing then it will show the error message.
This is how to change limits in the Power Automate do until action.
Power automate do until the count
In this example, we will see how to use the count in the Power Automate Do until action. Let’s create a button flow in Power Automate (similar to the flow that we have created previously).
Next, we will add an action to initialize a variable. Click on +New step > Initialize variable. Provide the Variable name, Type, and Value.

Next, we will add the do until action and set the parameters such as:
- Value(1)- VarNumber
- Operator- is equal to
- Value(2)- 20

Expand the Change limits to set the Count it indicates the number of counts for the loop execution and stops after the count value. Here we will set the count value as 6 i.e. it will run 6 times.
Note- If the condition is satisfied before the count value then the flow will also stop.

Now, we will add another action to increment the variable by 2.

Now our flow is ready to run. Let’s Save the flow and select to test it manually. Click on the Run flow. We can see the flow will stop after the 6th count.

This is how to use do until power automates count.
Read: Power Automate Copy Files + 21 Examples
Power Automate do until timeout
Here we will see how to use the timeout in Power Automate by formatting it. As we have already mentioned when we will configure a timeout the flow will stop if the condition is met or the count number or timeout duration is reached.
To implement this, we are going to use the flow that we have created previously(for the count). Let’s modify the change limits > Timeout. Set the Timeout as PT45S(for testing).

Let’s save the flow and test it. Then click on Run flow. We can see the flow will stop after the timeout i.e. 45 seconds.

This is how to set the timeout in Power Automate Do until.
Power Automate do until timeout Pt1h
As we discussed, by default it is showing the timeout as PT1H in the do until condition control. That indicates the flow will stop after 1 hour or until the condition is met or the count number is reached.

Also, read: Power Automate Create PDF + 11 Examples
Power Automate do until delay
In Power Automate, there is a delay action that is used to delay the flow for a specific time period. For example, if we add a delay of 1 day, then it will execute loop 1 and delay for 1 day before resuming the loop.
- If we set a Delay action to longer than the TimeOut then the flow will finish when the Delay time runs out.
- To implement this, let’s add a delay action within the do until loop. For testing purposes, we are using a delay of 30 seconds.

Now we will save the flow and test it manually. Then click on the Run flow. We can see it will pause the execution until then:

Also, we can see the flow will stop after the 5th run with the 10 seconds delay for each loop.

This is how to use delay action in Power Automate Do until.
Refer to this link: Power Automate dynamic content [Complete tutorial]
Power Automate do until advanced mode
In Power Automate do until action, we can see an option ‘Edit in advanced mode‘ that allows us to edit the conditional expression in advanced mode.

Click on that option and we can see the expression came in the advanced mode.

Here, we can edit the expression according to our conditions manually. By clicking on Edit in Basic Mode, we can return to the basic mode where we can use the conditions from the dynamic content. This is how to show the advanced mode in Power Automate do-until action.
Check out: Start and wait for approval Power Automate [Complete tutorial]
Power Automate do until max count
Currently, there is a limitation in count i.e. 5000 i.e the do until loop allows a maximum of 5000 counts.
If we insert the count of more than 5000 then the flow will be failed. Let’s take an example to implement this. Here we will set the count at 6000.

When we will run this flow, it will show an error message such as:
The provided 'until' limit count value '6000' is not valid. The count must be a positive integer no larger than '5000'.

This is how to handle the max count in Power Automate.
Also read: Power Automate flow with Microsoft teams
Power Automate do until 1 minute
Here we will see how to work with doing until 1 minute. Here we will set the timeout as 1 minute i.e. PT1M.

Also, we have set the count as 600. Now we can see the flow will stop exactly in 1 minute as per timeout.

This is how to do Power Automate do until 1 minute.
Power Automate do until the Set variable
In this example, we will see how to set a variable within the do-until loop. Let’s create a simple flow to implement this.
Let’s create a button flow and initialize an integer variable and provide its name, and value.

Next, we will add a Do until condition control that will check until the variable equals a specified value i.e. 20.

Next, we will add a compose action that will show the value of the variable within the do until control. Click on +Add an action > Compose.

Inside this loop, we will add another action that will set the initiated variable value with a specified value. Click on +Add an action > Set variable. For example, we will set a value like 65.

Let’s save the flow and test it manually. We can see the flow will go through all of its 60 runs as it is the default count of the runs.

It shows the first run with the initialized value before considering the condition. But from the 2nd run until the 60th run it will show the set variable value.

This is how to work with Power Automate until the Set variable.
Read: Power Automate shared mailbox
Power Automate do until notification and delay
Here we will see how to send a notification using delay action in Power Automate do until condition control.
For example, we will create a flow that will send an approval notification on Outlook, if there is no response after a specific time, then it will remind the user via the Microsoft team on regular basis using Power Automate. To create the flow the following steps are:
Step 1: Create a SharePoint list
Here we have created a SharePoint list based on Leave requests having columns such as Title, Reasons, Start Date, End Date, and Approval status(Pending, Approved, Rejected).

Step-2: Create an automated flow
Move to Power Automate. Here, we will create an automated flow that will trigger when an item is created or modified in teh SharePoint list.
Click on +Create > Automated cloud flow > when an item is created or modified. Provide the SharePoint Site address and list name.

Step 3: Start and wait for an approval
Next, we will add an action that will start an approval and waits for the responses from the approver. Click on +New step > Start and wait for approval. Provide the Approval type (Approve/Reject – First to respond), Title, and Assigned To.

Next, we will add a Condition control action, that will check whether the Outcomes are equal to Approval.

If the condition is satisfied, then it will update the item in the SharePoint list as Approved. Otherwise, it will update the status as Rejected in the SharePoint list.
- In the If yes section, click on +Add an action > Update item. Select the site address, List name, Id, Title, Reasons, and Dates, and in the Approval, status set as Approved.
- In the If no section, click on +Add an action > Update item. Select the site address, List name, Id, Title, Reasons, Dates and in the Approval status set it as Rejected.

Step-4: Add parallel branch and Delay
Now we will add a parallel branch just after the trigger. Under the trigger > Click on + symbol > Select add a parallel branch.

Now we will add a delay action that will delay the action for 1 minute(for testing). Here you can set delay of 1 day or 10 days as per your requirement.

Step-5: Add do until action
Next, click on the + symbol under the delay action. Add a do until action. Keep it blank for now.

Step-6: Send reminder via Teams
Now, we will add an action within the do-until to post a message or remind the approver to respond to the request via Microsoft teams.
Click on +Add an action > Post message in a chat or channel. Provide the Post as, Post in, Recipient, Message.

Step-7: Add delay
Next, we will add another delay action to delay the flow for 1 day. That means it will send notifications on a regular basis. But for testing purposes, we are going to use 15 seconds of delay.
Click on +Add an action > Delay. Set the count as 15 and Unit as Second.

Step-8: To retrieve the item using Get Item
In this final step, we will add an action that will get the item from the list. This is the most important step that will check the status of item every day(but in our case 15 seconds) and keep the iteration until the condition is met i.e. Approval status does not contain Pending.
Click on + Add an action > Get item. Set the Site address, List name, Id.

Let’s move to Do until control. Select the value from the dynamic content of the get item ‘Approval status’ does not contain.

Now our flow is ready and our entire flow will look like below:

Let’s Save the flow and test it manually. Now we will insert a data in the specified list:

We can first it will send an approval request via outlook or team like below:

Then it will delay for 1 minute and then send a reminder via team:

Once the request responds, it will update the item and stop notifying. And the flow ran successfully.

This is how to send notifications and reminders using Delay and do until action in Power Automate.
Read: Power Automate or Microsoft Flow delete all files in a folder
Power Automate do until increment
In this example, we will see how to do increment a variable until a time limit or count limits. If we don’t set any limits then it will run until the condition met the given value.
Let’s create a sample flow to implement this.
- First, we will create a button flow. Then assign a float variable and set a float value i.e. 5.25.
- Next, we will add a do until control action using a condition that will run until the variable is greater than or equal to 100.
- Then we will add an action that will increment the initiated variable by 3.5 in each loop.
Now we can see our entire flow will look like below:

Let’s save the flow and test it manually. We can see the loop will run until the variable matches the condition i.e. if the variable is greater than or equal to 100.

This is how to increment the variable in Power Automate using do until.
Power Automate do until boolean
In this example, we will see how to use boolean within the Do until Power Automate. To implement this, we have created a simple button flow. Then initialize a boolean variable having the below expression as value.
true

Next, we all add a do until action using a condition that will finish the iteration just after 3 runs(count) or 1 hour(timeouts) or if the variable equals to true.

Next, we will add an action to set the variable within the do until control. Here we will set the value as false(using expression).

Let’s save the flow and test it manually. We can see the execution result that shows us that as the condition was not met so it finished the loop when it reached the count limit.

This is an example of how to use Boolean within Power Automate Do until.
Read: Power Automate vs Nintex
Power Automate do until status change
Here we will see how to change status in SharePoint list using Power Automate do until control. For example, we are going to create an automated flow that will check the status of an item in the SharePoint list until the condition is met. Till then it will keep sending email reminders every minute.
Here we have created a simple SharePoint list based on food order having columns such as Title, ID, Order Status(Delivered, Not Delivered).

- Now we will create a flow to execute our scenario. Let’s create an automated flow that will trigger when an item is created in the SharePoint list i.e. FoodOrder.
- On Power Automate, Click on + Create > Automated cloud flow > When an item is created. Configure the trigger with the Site address and the list name to fetch the data from the SharePoint list.

Next, we will add an action to initialize a boolean variable and set the value as False. Click on +New step > Initialize a variable.

Next, we will add a Do until control action that will run the loop until the VarOrder is equal to true. Click on + New step > Do until control. Set the value as ‘VarOrder is equal to True’.

Now, we will add a delay action within the Do until control to delay the loop for 1 day. But we are going to use delay for 1 minute(testing purpose). Click on +Add ana action > Delay.

After Delay the loop, we will add action to get the item from the SharePoint list. Click on + Add an action > Get item. Provide the SharePoint site Address, list name, and the ID from the trigger.

After it gets the item, we will add a condition control. It will check whether the Order status is equal to Delivered or not. Make sure to use the Order status from the Get-Item; Otherwise, it will create an infinite loop.

If the condition is met, then it will set the variable as True and stop the flow(in the If yes section); Otherwise, it will send a notification via outlook(in the If no section) to change the status every 1 minute(as per our delay set).

Have a look on our entire flow which is look like below:

Let’s save the flow. Test it Manually > Test. Then insert data in the Sharepoint list.

We can see it will send a reminder via Outlook to change the flow every 1 minute.

Once we change the status from Not Delivered to Delivered:

It will stop sending emails. And the flow will stop that time.

This is how to do Power Automate do until status change or a Field change in the SharePoint list.
Also read: Power Automate add days to date
Power Automate do until empty
Here we will see how to use do until the field is empty. For example, we have created a simple SharePoint list having columns such as Title, and status(choice field).

- Now we will create an automated flow that will trigger when an item is created and wait until the status field is nonblank or has some value.
- Let’s create an automated flow in the Power Automate that will trigger the flow when an item is created. Configure the trigger with the SharePoint site address and the list name to bring data.

Next, we will initialize a variable to store the status init. Click on +New step > Initialize a variable. Set the Status value as value.

Next, we will add a do until loop that will check if the status is blank or not. Click on +New step > Do until. Set the variable(VarStatus) is not equal to. Keep the second value as Blank or empty.

Now, we will add a Delay action in order to pause the things for a specified time. Click on +Add an action > Delay. Set the count and unit as 10 seconds(for testing proposal).

After delaying the process, we will add an action to get the item from the list by referring to its ID. Click on +Add an action > Get item and provide the Site address, list name, Id.

Then we will add an action to set the status value that retrieves from the get item. Click on +Add an action > Set variable. Give the initiated variable name and the value as Statu value from Get item.

Now, we will add another action to notify the user about the updated status via Outlook. Click on +New step > send an email(v2). Make sure to add this action outside the loop.

Let’s Save the flow and test it manually. Create an item in the SharePoint list:

We can see it will delay the flow as the status column is blank:

Once we update the status in the list, it will complete the flow successfully. For example, we have updated the status to Approved.

We can see it iterate the flow till 14th runs as the status field is blank. When we updated the status field it stop the flow in the 15th run and show the result. We can see it will notify the user about the status via outlook.

This is how to work with empty fields in Power Automate do until.
Check out this post: Power Automate Increment Variable + 11 Examples
Power Automate do until date
Now, we will see how to work with date using do until in Power Automate. For example, here we will take two dates i.e. Date1, Date2 and we will create a flow that will add days automatically with the date1 until it meets the Date2.
Let’s create an instant flow. Then we will add 3 ‘initialize variable’ actions.
- Initialize variable-1 to strore the Date1
- Name-VarDate1
- Type-String
- Value-3/4/2022(any random date)
- Initialize variable-2 to store the Date2
- Name-VarDate2
- Type-String
- Value-3/8/2022
- Initialize varibale-3 using for temporary storage
- Name-VarDate3
- Type-String

Next, we will add a condition action that will check whether the Date1 is less than Date2. If yes then we will proceed with the flow. Here we will format both Dates using the below expressions:
For Date1:
formatDateTime(variables('VarDate1'),'MM/dd/yyyy')
For Date2:
formatDateTime(variables('VarDate2'),'MM/dd/yyyy')

If the condition satisfies then it will move to the If yes part. So in the If yes part, we will add a set variable action that will set the value of VarDate1 in VarDate3.
Click on +Add an action > set variable. Provide the name as VarDate3 and value as VarDate1.

next, we will add a Do until action where it will run flow until VarDate3 is equal to VarDate2.

Now we will add a create item action within the Do until control that will create items in the SharePoint list until the Date1 matches the Date2.
Click on +Add an action > Create item. Here we will set the site address, SharePoint list, and in the Title, fix the below expression.
formatDateTime(variables('VarDate3'),'MMM/dd/yyyy')

Next, we will add a compose action that will add days to perform the requirement.
addDays(formatDateTime(variables('VarDate3'),'MM/dd/yyyy'),1)

Then again we will add a set variable to set the output of the compose in VarDate3.

Let’s save the flow. Test it manually. We can see it will create the dates as new items in the title of the specified list i.e. Demo list. As we insert the dates 3/4/2022 & 3/8/2022 so it will create the dates between the mentioned dates.

This is how to work with Power Automate do until date.
Also, you may like the below Power Automate tutorials:
- Power Automate IF Expression [With 51 Examples]
- Power Automate copy list item to another list with attachments
- Power Automate save email attachment to SharePoint
- Power Automate get items examples
- Power Automate conversion of string
- Power Automate Number Format
- Power Automate convert time zone
- Power Automate Concatenate String
Conclusion
From this Microsoft Power Automate Tutorial, we learned all about Do until control on Power Automate. Also, we discussed the below topics:
- What is Power Automate do until?
- Give an example of Power Automate do until?
- What are the limits Power Automate do until?
- What is count in Power automate do until?
- How to use timeout in Power Automate do until?
- What is timeout Pt1h inPower Automate do until?
- How to use delay Power Automate do until?
- What is advanced mode in Power Automate do until?
- What is max count in Power Automate do until?
- How to set 1 minute in Power Automate do until?
- How to use Set variable Power Automate do until?
- How to use delay to send notification in Power Automate do until?
- How to increment a variable in Power Automate do until?
- How to use Power Automate do until boolean?
- How to change status using Power Automate do until?
- How to handel empty value in Power Automate do until?
- How to use date in Power Automate do until?
I am Bijay a Microsoft MVP (8 times –Â My MVP Profile) in SharePoint and have more than 15 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com