This is part 3 of the blog post series ‘Take Full Control over Your Flow Approvals‘ and in this part we’re going to create our own Flow to send the custom actionable message. The idea is to hook into the data of Approvals that is stored in the CDS for Apps and is created by the standard Approval actions in your environment(s). In the previous blog post I described the way we can create our own actionable messages for Approvals. We just need a Flow to send these, so let’s start with that. But first I need an Approval action.

I’ve created a Flow for the approval of a Credit Limit for an Account. Enable notifications is set to ‘No’.

Now let’s see what data is created once the Flow is run. The following Approval record is created and updated by the system.

And the next Approval Request record is created that is assigned to the approver (as Owner).

So our own Flow can/will be triggered when a Approval Request record is created, to send the custom actionable message to the approver(s).

We get the related Approval record and the details of the Requestor and Approver. The URL of the receiving Flow is set as value of the variable Flow URL. In the Compose action we add the HTML- and JSON code for the actionable message. The last action is to Send an email to the Approver and add the output of the Compose action into the Body of the email, and set ‘Is HTML’ to Yes.

Now if we start another Credit limit approval, the custom actionable message will be send to the approver(s).

This is the result.

The post Trigger your Flow on Approval Request to send the custom actionable message appeared first on There's Something About Dynamics 365.