In this article, we are going to create a Microsoft flow to approve a document added to the SharePoint document library. We will see how we can use Approval action and use it in different strategies.
Requirement:
- Create an approval workflow that triggers when a document is added or modified in the SharePoint document library.
- The Document/list item should be approved by the approvers in the list.
- The document /list item can be rejected by anyone of the approvers.
Note:
This article is based on the SharePoint document library, but you can also perform the same steps for the SharePoint list as well. The only difference is that from SharePoint List, you don’t get a direct link to create a flow.
Create a document approval flow – Only one approver
- Once you are in Power Automate, Go to My flows
- Click on New >> Instant – from blank.
- Skip the next screen, you can give a name to your Flow later.
- Choose the trigger. Here based on your requirement you can select when should the flow trigger.
- I have selected When an item is created or modified.
- Add Site Address, List name, and View (optional and recommended) as shown in the screenshot.
- Now add an action. Start and wait for an approval
- Select Approval type: check the link for the detailed description on each of the approval types
- Here, we are going to select the second option – Approve/reject – First to respond.
- Enter the details as mentioned in the screenshot below.
- In the Assigned To field, you can put multiple approvers but as we have selected our approval type, if only one approver approves, then the flow should be good to proceed.
- Apart from that, you can add a link and description of the item.
- You can Enable notification and Enable reassignment.
- You can also attach multiple attachments with the approval.
- Click on save.
- Now, we will perform an action when the document is approved or rejected. Let’s send an email to the Manager of the project.
- Add a condition in the Next Step.
- In the condition, we will compare the outcome of the approval with the value – Approve, and based on that we will send an email.
- Action, based on the Outcome of the approval. You can customize this according to your requirement.
- Let’s run the flow.
- First Step: Got the email for approval.
- Let’s approve the document.
- While approving, you can see there’s another option called – Reassign (this is because of Enable reassignment settings).
- After approving, the manager will get an email.
Create a document approval flow – Everyone must approve
- If you want all your approvers to approve the document, then you can choose - Approve/reject – Everyone must approve in Approval Type.
- After selecting this, your flow will be completed only when all the approvers Approve or at least one Rejects the document.
- This kind of flow is required when approvals are needed from multiple designated resources, like a manager, Senior Managers, and department head for single document approval.
Note:
Even if only one approver rejects the document, the entire approval stands Rejected for all the approvers.
Create a sequential approval flow
- If you want to process approvals like…
- Person 1 approves then Person 2 approves …., then in the same flow mentioned above, you can add condition and in success run, you can add another approval action.
- So, your flow would be something like this.