Extend A Power Automate Approval Over The 30 Day Limit

Extend A Power Automate Approval Over The 30 Day Limit

Power Automate approval flows can go beyond the 30 day limit if they are designed properly. A flow that waits an approval for over 30 days will timeout due to a limitation of the service. However, we can create an approvals process with an infinite duration by creating two separate flows. The 1st flow will create the Approval and then end. Then the 2nd flow will wait for the approval to become completed, determine the outcome, and then run any subsequent action.

Table of Contents
• Introduction: The Budget Request Approval FlowSetup The SharePoint ListBuild A Power Automate Flow To Create ApprovalsCreate A Power Automate Flow To Collect Approval ResultsRun The Create An Approval Flow In Power AutomateTest The Automated Flow To Get The Approvals Response




Introduction: The Budget Request Approval Flow

Managers at a manufacturing company use the budget request approval flow to ask for funding. This funding is used to purchase or upgrade equipment. An approval can take longer than 30 days so it is important that approval flow does not timeout.




Setup The SharePoint List

Create a new SharePoint list named Budget Requests with the following columns:

  • Title
  • Amount (number)
  • Requested By (person)
  • Request Status (choices: Submitted, Approved, Rejected)
  • Approval ID (text)


The SharePoint list does not require any data to be populated initially. Over time as budget requests are added the list will begin to look like this.




Build A Power Automate Flow To Create Approvals

A long running approvals process with no 30 day time limit will require two flows. The 1st flow will create the new approval and the 2nd flow will wait for the approval to be completed and take any subsequent actions.

Open Power Automate and start an automated flow when a new item is created in the Budget Requests SharePoint list. Then create a new approval using inputs from the Budget Request item. Once the approval is sent update the budget request status to submitted and write the Approval ID to the SharePoint list. This will allow us to track which Power Automate approval is related to which Budget Request.

The final flow action updates the approval record in Dataverse to add a source named “Budget Requests.” We will use the source column to track the origin of the approval flow. And to ensure our 2nd flow only triggers on approvals requested from within the 1st flow.




Create A Power Automate Flow To Collect Approval Results

When an approval is completed the 2nd flow collects the result and takes any subsequent actions. Create a 2nd automated flow and use a Dataverse trigger to start it when a row is modified in the Approvals table. Only trigger the flow when the statuscode column is updated and check to see if the approvals source is “Budget Request” and the statuscode equals Completed (option set value: 192350004).

Then use the SharePoint – Get Items action to find the Budget Request with the matching Approval ID. If the approval result is “Approve” then update the Budget Request status to Approved. Or if the approval results it “Reject” then change the Budget Request status to Rejected.




Flow Expressions:

Dataverse When A Row Is Added Modified or Deleted – Select Columns

statuscode



Dataverse When A Row Is Added Modified or Deleted – Filter Rows

msdyn_flow_approval_source eq 'Budget Request' and statuscode eq 192350004



SharePoint Get Items – Filter

triggerOutputs()?['body/msdyn_flow_approvalid']



SharePoint Update Item Approved – Request Status

first(outputs('Get_items:_Budget_Request')?['body/value'])?['ID']



SharePoint Update Item Rejected- Request Status

first(outputs('Get_items:_Budget_Request')?['body/value'])?['ID']




Run The Create An Approval Flow In Power Automate

Our long running approval process is ready to test. Save both of the flows we have created and turn them on.



Go ahead and create a new item in the Budget Requests SharePoint list with the following values:

  • Title – Paint Booth Upgrades
  • Amount – 200,000
  • Requested By – Mary Baker (or someone in your organization)



The approval will appear in the recipient’s Approvals Center.



In the background the Power Automate flow does not await a response to the approval and continues to run. It updates the SharePoint list item with a status of Submitted and the Approval ID.



And it also updates the Approvals table record with the source Budget Request.




Test The Automated Flow To Get The Approvals Response

Trigger the second Power Automate flow by asking the approval recipient to choose Accept.



The approval now appears with a status of approved in Approvals Center.



When the approval is Accepted the status reason changes to Completed. The flow trigger conditions are now met so the flow begins to run



The SharePoint list item with the matching Approval ID is updated with the request status of Approved. If the response were Reject instead, the list item would show the status Rejected.




Questions?

If you have any questions or feedback about Extend A Power Automate Approval Over The 30 Day Limit please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Matthew Devaney

Subscribe
Notify of
guest

20 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Lonuel
Lonuel
1 month ago

Thank you very much for your post.
In the “Condition: Approval Result eq Approve”, shouldn’t it be Result is equal to Approve rather than Result?

Phil Nichols
Phil Nichols
1 month ago

With this being based on Dataverse would premium licensing be required for anyone, or with it being a built-in table for approvals is it ‘free’ for standard users?

Eugene Harley
Eugene Harley
4 days ago

First, OMG this solution is genius, and so simple.

Second, by creating the ‘Svc_Account’ to run the flows, does this not fall into the statement (trap) that anyone that benefits from the ‘premium licensing’ should also be licensed?

Eric
Eric
1 month ago

Great post Matthew. Is the Dataverse connection to the approvals table a premium feature? Is it possible to use an admin connection to Dataverse if not everyone has a premium license?

Eric
Eric
1 month ago

Thank you Matthew. I knew the approval was okay, just was not sure about the direct access to the table. Again, great info as always.

C H
C H
25 days ago

When you mean “a single licensed Power Automate admin account”, you do mean a user account with Power Automate Premium (or PA Process), right?
I have an E5 license, however I don’t have access to Premium connectors.

Last edited 25 days ago by C H
Mohammed
Mohammed
1 month ago

Very helpful Matthew, thanks for sharing. I tried the example you showed and it worked. I was wondering which table stores the approval comments? It’s not in the Approvals table output (only the result is).

Steve Farrall
Steve Farrall
26 days ago

Matthew, you are a genius! Thank you very much for this – I’m going to re-engineer a few of my flows to take advantage of this pattern and it will be a game changer 🙂

Do you have any thoughts on reassigning approvals? I’m sure I won’t be the only person who would appreciate tips on creating a process to allow super-users to reassign existing approvals that they are not named on as an approver themselves.

For example, a payroll team processes approved expenses every week. They only receive expense claims once the cost centre owner has actioned the approvals. If an approver is unexpectedly absent then the payroll team may want to reassign any pending approvals for that person.

Steve Farrall
Steve Farrall
23 days ago

I’m looking forward to it – many thanks!

Vincent
Vincent
26 days ago

Great post , but i cannot see the filter query options in your screenshot for the Get Items: Budget request.

Have you enabled experimental features?

Last edited 26 days ago by Vincent
Jeffrey
Jeffrey
26 days ago

Presumably, could we use a SharePoint list to hold the data instead of Dataverse?