Hi folks! In this blog, I would like to reflect some basics about the approvals in Microsoft Power Automate. So, when it comes to approval, we either require approval for a leave or a purchase order or many other businesses needs as per requirement. Microsoft has made it easier by providing built-in actions in Power automate for Approvals.
Approvals can be customized. Patterns followed in approval would be parallel or sequential.
Multiple Types of Approval
- Everyone must approve.
- First to respond.
- Custom Responses - Wait for all responses.
- Custom Responses - Wait for the first response.
External users can be added as approvers too.
Actions for Approval
- Create Approval.
- Start & wait for the approval.
- Wait for an approval.
Also, you will find an approval Dashboard which shows the list of approvals. Refer screenshot below: -
Now let us discuss the type of approvals and how they can be used: -
First to respond
This type of approval will complete the flow if either of the approvers has approved or rejected. For example, let's say the approver is person "A" with email id [email protected] and another approver is person "B" with email id as [email protected]. If approver "A" has approved the request but not approver "B" the flow will run, and it will complete the workflow successfully. Let’s understand this with a workflow.
- Create a manually triggered flow.
- Let the action be Start & wait for the approval.
- Select “first to respond”.
- Here the request will go to two assigned users. If either of the two approvers has approved the flow will continue to be completed successfully.
Everyone must Approve
This scenario works well if all the approvers will approve. Let’s say I have approver "A" and Approver "B". Both must approve, and the flow will be completed successfully. Suppose Approver "B" reject the approval what happens exactly? In that condition you must make a condition like Approve does not contain "Reject" this in returns string i.e. when it returns Json, it returns responses in the form of array like [Approve; Reject;].
Wait for all responses
This scenario works well if the approvers approve the request with customized options. Customized options like Approve/Reject/Deferred. This is somehow like “Everyone must Approve”, the only difference here is that you can opt for options rather than only Approve/Reject. You can add options by clicking on Add item. Refer to below screenshot for more details.
Wait for first response
This is the customized approval type which runs the flow based on one user response. For example, let’s say the approver is person "Test1" with email id [email protected] and another approver is person "Test2" with email id as [email protected]. If approver "Test1" has approved the request but not approver "Test2" the flow will run, and it will complete the workflow successfully. Here you can customize the response items like "Wait for all response type". It functions same as somehow as "First respond".
We have also seen other actions like Create Approval & Wait for Approval.
- In Create Approval, the flow is executed to its end without any wait for approval.
- In Wait for an approval, action the flow waits for another approval to execute the flow successfully. For example, suppose an approval is created and then you want to use an adaptive card, where you have to provide the approval id in the wait for the approval response to get the desired results. Refer screenshot for more results.
So, we have seen above how approvals can be used in Power Automate.