Hello everyone and welcome to my blog. In today’s blog I will show how you can set expiry time for your approval flows in Power Automate.
If you have worked with Power Automate, you have most likely used Approval flows. What if there is a requirement to set a time limit or expiry period for your approval flows?
Let’s take the an example. You have a leave management approval flow that you have configured using Power Automate. If the approver does not make a decision on the leave request within 15 days, the leave request shall be automatically approved.
In this scenario, you need to set the Timeout for your approval flow. Quite unknown to many, you can indeed set the expiry of an approval flow.
Select the three dots (…) on your approval action and then click on Settings.
In the pop-up dialog that appears, you need to set the timeout of the approval flow.
You need to set the Duration of Timeout for in ISO-8601 format. Following are few examples.
- 1 Month -> P1M
- 1 Day -> P1D
- 10 Minutes -> PT10M
- 10 Seconds -> PT10S
- 1 hours 30 mins -> PT1H30M
In my example, I have set the value to PT1M – which is basically one minute.
Now when the run the flow, the approval waits for 1 minute and times out.
That’s great isn’t it? But how do I handle Approval expiry timeout?
You can configure the flow as shown in the below screenshot.
I am using a parallel branch. On the left hand side, I am sending out an email when the approval has expired. I have configured the action to run on timeout of the approval action.
The other branch is the usual way of checking the outcome of the approval. When I now run the flow and the approval times out, the email is being sent. Remember the ‘Send Email‘ step was configured to run if the Approval action timed out.
From the above screenshot, you can see the email step is executed post one minute of timeout.
Below is the flow run when the approval is completed within the specified time
Hope you liked this post. If this post has helped, you can buy me a coffee.
For similar topics on Microsoft.NET and Power Platform, subscribe to my blog using the Subscribe option on right pane.
Debajit Dutta
Business Solutions MVP
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.