Photo by airfocus on Unsplash

How to automatically complete approval tasks in Power Automate and Microsoft Teams

Table of contents:

When writing my previous post on working with Tasks in Power Automate I realized existence of a column name Flow Notification URI inside of Flow Approval table, which I so far really underestimated. Let me show you how powerful it is!

Until today I was nearly sure it is impossible to automatically complete a task in Power Automate/ Microsoft Teams and as well to resume a process that is waiting for approval. It turns out I was really wrong.

Some basicis

Each time a workflow that contains an action which assigns a task and waits for completion is executed, it not only creates entries in Approval and Approval Request tables, but also in Flow Approval. Furthermore, each entry in that last table contains a value in column called Flow Notification URI, that when called with POST request simply completes waiting and resumes flow:

Flow Notification URI column

The URL there is built from the following pieces (most of them is coming from other columns of the Flow Approval table):
https://[instance][Flow Id]/runs/[Flow Run Sequence Id]/actions/[Action name that waits for approval]/run?api-version=2016-06-01&sp=%2Fruns%2F[Flow Run Sequence Id]%2Factions%2F[Action name that waits for approval]%2Frun%2C%2Fruns%2F[Flow Run Sequence Id]%2Factions%2F[Action name that waits for approval]%2Fread&sv=1.0&sig=[some signature key]

What’s next?

Knowing that making POST request to that URL completes waiting and resumes flow, opens a totally new range of scenarios that can be build around basic approvals, for example using custom Power Apps. Just imagine some of them:

  1. Approving on behalf
  2. Waiting for majority of responses
  3. Allowing requester to finish approval at any time
  4. and more!

The goal is, that first you need to write and update data in all other tables that Approvals are using (mentioned in my post here), get all the information needed to be sent as a response and after that make a POST to the Notification URI.

Also, when doing such a POST, be sure it is following the expected JSON format and that you put “Content-Type: application/json” as header:

            "id":"GUID from Users Table",
            "displayName":"Responder name",
            "email":"Responder mail",
            "tenantId":"Tenant ID",
            "userPrincipalName":"Responder principal name"
   "responseSummary":"Combined response comments and approvers together with dates",
   "outcome":"General outcome",
   "name":"Approval ID from Approval table",
   "title":"Approval name",
   "details":"Approval description",

Once you send such a POST, action will complete waiting and will display all the data as dynamic outcomes, as if it was completed through the task UI:

Completed task in Power Automate

I hope this post makes you as excited as it made me when I discovered this simple information. Let me know in comments what scenarios you are able now to accomplish!

Tomasz Poszytek

Hi, I am Tomasz. I am expert in the field of process automation and business solutions' building using Power Platform. I am Microsoft MVP and Nintex vTE.

  • Lewis Harris-Manley

    Hi Tomasz – thanks for the article, looks great! We tried the standard “Request sign-off” approval flow from SharePoint but because it doesn’t wait until all those listed as approvers has approved and instead as soon as one of them approves it marks the document as such, it doesn’t work.

    Any ideas of how we can utilise this Flow URI to make the status update in SharePoint wait until all those marked as approvers have actually approved?

    December 15, 2021 at 6:47 pm Reply
    • Tomasz Poszytek

      Hi, indeed the oob sing-off waits for first only. For such purpose you’d need to develop your own approval workflow, where a trigger is “for a selected item”, so that it appears under context menu of a specific item (or you can use list formatting to add a button?). Back to the topic – in that custom approval workflow you can define whichever conditions you need to complete approval – either first or all. You can then extend the basic functionalities with custom flow that is triggered whenever a new record in Approval Responses is added that eg. checks if majority of approvers have already responded and then completes approval 🙂

      December 16, 2021 at 12:55 am Reply
  • Mohd Sharif

    Hi Tomasz,

    I am working on a functionality where I need to complete the approval task on a PowerApp button click. Till now I redirect the user to PowerAutomate action screen for completing the task. Can you help me with scenario.

    February 24, 2022 at 7:26 pm Reply
  • Denny OY

    Hi Tomasz ,
    I’m working on a approval flow where I need to update the approval action outside the approval flow (using Powerapps ). After watching your videos on YouTube, I can honestly say that you created a work of art.
    I’m new to this field, so could you be able to share me a full account of each step made in that flow.

    November 21, 2022 at 7:19 am Reply
  • Denis H

    Hi Tomasz, can we add a record to Approval Response table, and how?

    February 12, 2023 at 1:30 pm Reply
    • Tomasz Poszytek

      Sure you can. Simply create a new record using Dataverse action in a cloud flow. Just be sure account you use for the connection has sufficient role to write to Approval Response table.

      March 9, 2023 at 2:24 pm Reply

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.