I want to know how to cancel the approval request after a day,
for send the approval request to other person.
1 step, Send the approval request to a manager, and wait a day.
2 step, Send the approval request to other manager when no-response by first manager,
and cancel the approval request of 1 step.
I hope to cacel the send approval request,
so, I cannot solve the Do-Until.
If my flow send the request repleat, noisy.
Sorry, I was not suggesting you put the entire approval flow inside a Do-Until, only the response condition @body('Start_an_approval')?['response']. Then set your timeout to 1 day.
Hi @yoshihirok ,
It is not possible to cancel a pending approval from flow.
There is a similar request on Flow Ideas Forum, please vote the idea at here:
By the way, please try if the following workaround will work for you.
Set the Timeout duration of the approval action as PT1D under Settings of the first approval action. Then configure Run after as “has timed out” for another approval action to send the request to another person.
I'm currently doing exactly that with a timeout. I'm frustrated that when an approval action times out, it doesn't dissappear from the approvals part of flow. This makes zero sense. I have to go in and approve or deny all of them for them to go away.
I either need automatic reminders for approvals, or for this feature to be corrected. If an approval times out, it should disappear from the flow approvals for the user.
There is a way to cancel an approval request but it requires that the flow maker to have certain environment permissions. Approval requests are stored in the common data service in the Approvals entity. If you have write access to the entity then you can change the status of the Approval to inactive after it timesout. This will remove the request from thier queue.
Could you please write how to access CDS and cancel approval ? this would be very helpful. Or post some article/howto where this approach is documented.
thank a lot
You access the CDS by using the Common Data Service List records connector. You enter the environment name and the Approval entity into the connector. This will give you all the approval records that are in the environment. Next you filter the returned array for the specific approval you are looking for. Then by using the CDS update record connector, use the iteminternalid as the record identifier and update the Status Reason Value to expired.
Please note, you must have sufficient privileges to update the CDS record.
We are using the timeout option. But Power Automate behaves very unexpectedly. If a reminder is sent to the same person that caused the timeout, the person can't respond to the initial approval anymore (PA will state something like, "approval request has expired"), only to the "reminder" approval. This is perfectly fine for me. BUT, if the flow sends a new approval request to a DIFFERENT person, the first person can still respond to the request, but this respond is not taken into account by the flow, in our case, our SharePoint library is not updated, but the person will not know without checking the library. This is totally confusing!
A timed out approval request should always show an error message if person tries to respond to it after a timeout has occured.
I don't know how to implement this in my flow. We have set up three flows actually: a launcher that includes a trigger (When a new file is created in the library). This takes care of all one time activities. This flow ultimately calls another flow (controller flow) which contains all the logic for the different approval stages etc. But it doesn't send out the actual approval request, instead it calls a third flow (approval flow) that sends out the request and calls the controller flow at the end, providing the output of the request (approve, rejected, time out).
This is based on the following idea: https://sergeluca.wordpress.com/2018/11/26/new-flow-state-machine-pattern-with-unlimited-running-tim...
So we escalate to the next person in hierarchy. Including the previous person as well would change the logic of the flow quite a bit. To me, this is Microsoft bug and they should rectify it.
@J_K_I understand. Sending approval to next person is an escalation, not just looking for another eligible approver. This can be done by using setting "First Approver" instead of "All Approvers". (or something similar).
BTW the article you have provided - very interesting - seems to me quite complicated. I like the idea to split logic, processing to many flows, but I think this can be done a more simple way. Based on set of flows and control of process status based on information stored in SharePoint list.
Also I would like to mention that file creation/modification trigger is very error prone, so actually I have stopped using it.
I barely use the modification trigger, either. But so far I haven't encountered any issues with the creation only triggers.
Maybe you could do it with two flows if the second flow calls itself in the end. Otherwise multiple stages, logic to go back and forth depending on the response etc. also make a single flow quite complex very quickly. But as always there are probably numerous ways of achieving a task.
Thank you for your suggestions.
Based on my current experience - it is possible to set timeout for approval.
One need to use approval creation and wait for approval actions.
When approval creation action has set time out (Settings) to PT24H it expires after 24 hours. Then one can define parallel flow in case this action is time outed and you can send approval request to another person.
Unfortunately, approval request stays in approval list for the first person. but - if this person makes an action - it does not matter. Whatever he or she does will not have any further result. The parent flow simply runs further and result of approval is not passed to the flow anymore. one can address this showing an information for approver how much time they have to take action and that after the deadline any action is in fact obsolete.
I'm not able to see Approval Entity under CDS. Please can you guide me on how to add it through the security? Knowing that the user i'm logged in is Global Admin
Please note that writing or modifying approvals data in CDS is not supported. Doing so can result in the following invalid configurations or unexpected/undocumented behavior.
Please avoid using the CDS connector to update/delete approvals data, as it can break your system.
You can use the CDS connector with Approvals entity to:
- Trigger on creation or completion of approvals using the "When an entity is created, modified, or deleted" trigger.
- Monitor approvals that have not been completed (requests for which no corresponding response exists) using the "List records" action.
- Build a PowerApp that shows approvals assigned to specific users or the app user using the "List records" action.
@ancunha with all due respect to you and the rest of the Microsoft Power Automate team, simply saying not to update CDS records, when everyone is desperately trying to find a solution to a clear Microsoft bug, is not acceptable.
Everyone here is scrambling to make use of a half baked design in a practical and business friendly way. When an approval task times out, what possible use do we have for it remaining in the pending approvals list? As others have already mentioned, it's confusing because it has no impact on the workflow once it times out and nothing of importance to inform the user of its current timeout status.
Can we please get Microsoft to address this issue or at least provide a workable "supported" solution in the interim.
Thank you in advance.
As other comments this is a issue that needs attention or at least clarification. Is this a bug or feature request? Can you provide a link to the bug or feature request so we can vote it up?
Does Microsoft have a supported work around? If one exists can you provide a link or details?
I would agree that this is confusing and frustrating to users. It makes the approval center cluttered with timed out approvals. It is hard to drive internal adoption when we respond to users that "this is a Microsoft bug or feature that is not currently available".
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!