Power Apps - Trigger Power Automate Flow On Approval Reassign

 Do you ever get this requirement where your client asks to perform some operation when approval gets reassigned?

Today, I'm going to demonstrate how we can trigger the power automate flow when somebody reassigns the approver.

To start with, you need to make a Power Automate Flow.

Step 1 : 


msdyn_flow_approvalrequestidx_reassignedfromid ne '<none>'
Incase of reasssign, reassignedfromid contains guid.

Step 2 : 


triggerOutputs()?['body/msdyn_flow_approvalrequestid']
Pass the Approval Request Id from the trigger outputs.


Step 3 : 


triggerOutputs()?['body/msdyn_flow_approvalrequestidx_approvalid']
Pass the Approval Id from trigger outputs.


Step 4 : 


triggerOutputs()?['body/msdyn_flow_approvalrequestidx_approvalid']

I've used this action to get data from item link/ Item link description.
This is very helpful when you want to make changes to a specific record, you can put the GUID of that record in the approval Flow's item link description and can get those details in your approval reassign trigger flow.


Step 5 : 



outputs('Get_a_row_by_ID')?['body/msdyn_flow_flowapproval_flowname']

Finally, In this condition.
I'm checking if the reassignment occurred from my desired flow or not.

To get the flow id, you can reassign the approver, and in outputs of Get a row by ID, you can get the id of the flow.

You can get more information from these connectors.
For e.g : reassigned from, reassigned to, details you've added in the approval flow.

Comments

Popular posts from this blog

How to Use Pre-Image in Power Automate

Power Pages - Multi Select Field Show Hide and Set Business Required Using Javascript