Capture the Power Automate Approval result into Dataverse

Shows an animated gif where the result and the comment of the Approval is saved to the Case record

If you send out an Approval from within a model-driven App, you probably want to see the Approval Result in Dataverse. In this post we continue where we left off in our Approval from inside a Business Process Flow. Let me give you some background on the various Approval Flows and how they work. Including a tip on how to keep your Cloud Flows clean.

This blog is part of a series about guiding users and teams through their work. This post is about Approval Flows inside Business Process Flows. Click here for an overview of all related post regarding Approvals inside your Business Process Flow. I also added a sample solution you can import in your own development environment so you can see the entire concept in action!

Keeping people in their flow of work by utilizing Asynchronous work or asynchronous processes is one of the key benefits for Business Process Flows. I have written down my thoughts on this subject here. Find out what asynchronous work is, how Business Process Flow can help and more advanced scenario’s.

Expanding the Case BPF

We are currently still working the Case of a broken screen. We are dealing with a loyal customer, so we asked Approval of our manager to immediately replace the screen. He either gives Approval to do so, or he does not. We want to capture his answer within our system so we can continue working the Case.

Shows our case form highlighting the Approval result field and the Approver comment field we want to update
Form with the fields we want to update

We prepared our data model already for this as seen in my first post about Approvals. I want to fill in the fields Approval result with the result of the Approval. And as our manager might type a comment in his response, I want to capture this in the Approver comment field.

Shows the Approval inside the Approval app. Highlighting the comment field we want to eventually capture in our record.
Comment of the approval

Types of approval

There are several types of Approvals you can send. The “Approve / Reject” options will send out the standard Approval with only these 2 options. If you go for the “Custom Responses” you can choose your own set of options which an Approver can choose from. Depending on the second part of the available options the cloud flow continues on a different time. If you select in the category “Everyone must approve / Wait for all responses” the cloud flow will continue after everyone in the “Assigned to” list has responded. If you select “First to respond / Wait for one response” the flow will continue immediately after 1 response.

Shows the 4 different Approval types. Approve / Reject - Everyone must approve, Approve / Reject - First to respond, Custom Responses - Wait for all responses, Custom Responses - Wait for one response.
Types of Approval

In our scenario we use the “Approve / Reject – First to respond” option. Remember to tweak your capture based on your own requirements. So after our manager responds to the Approval the cloud flow continues and we get the feedback from the manager. We want to save that feedback to the Case record we are working on. We add a condition based on the response as you can see in the overview below.

Shows an overview of the steps after waiting for approval. After a response have been given the flow splits in 2 paths based. 1 for approved, 1 for rejected. Both paths will update the result of the approval with the corresponding result.
Approval Response Overview

The condition however requires some expression to make your flow cleaner. As the Approval mechanism can contain multiple responses we will take the first of those responses. This will make sure we do not get an unwanted ‘For each’ inside our Cloud Flow. That helps a lot in readability of our Flow.


Now let’s get our Approval result in Dataverse

Inside the two branches of the condition we choose the “Update record” action in Dataverse. Select the Table Cases and the Row ID is the ID we get from the parameters of our trigger “When a flow step is executed”, the “BPF Flow Stage Id”. We set the “Approval step done?” to “Yes” and the “Approval result” to “Approved”. Of course if we are in the other branch we set the “Approval result” to “Rejected”.

Shows the Dataverse action "Update Record". Where the table is the Case we are working on. The column Approval Result gets updated to Approved and the Approver comment is filled with the response of the approval.
Update the Case Status and Approval Comment

In the field “Approver comment” we can add the comment our manager added “Responses Comment”. Again we need to specify that we want the first of the Approval responses to avoid a “For each”. Sadly if we do that we can no longer select the “Responses comment” from the Dynamic Content menu to help with our expression. We must type out the following code:


Tip: What I like to do is create a dummy “Compose” action. In this action I can select the attribute I want and use the “Peek Code” option to find out what the technical name is. This name I can then use in the expression I am actually working on.

That’s it, we are done! We have now saved the result and comment of the Approval to our record. See the gif below to see this in action.

Shows an animated gif where the result and the comment of the Approval is saved to the Case record
Approval response saved to the Case record

If you think I am done with explaining my tips for Approvals inside a BPF now, you are mistaken! Yes we have created an Approval, added the record link to it and now captured the result, but I want to do one more thing! Automatically update the Business Process Flow Stage depending on the outcome of the Approval. But that is for a next post.


  1. I can’t seem to figure out how to get information on who responded to the approval. In my case i have a group of people and the first one to respond i would like to log who that is.

    But it dosn’t look like that information is in any of the dataverse approval tables?

    1. I do not know much about internal storage of the Approval data inside Dataverse. That is interesting to dig into sometime.
      However, I think you can get information about “The First to Respond” inside the Cloud Flow. From there you can log the Approver in a field of your choice.

Leave a Reply

Your email address will not be published. Required fields are marked *