title | description | services | suite | documentationcenter | author | contributors | ms.author | ms.reviewer | editor | tags | ms.subservice | ms.topic | ms.tgt_pltfrm | ms.workload | ms.date | search.audienceType | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Create and test an approval workflow with Power Automate |
Learn how to automate approval workflows that integrate with SharePoint, Dynamics CRM, Salesforce, OneDrive for Business, Zendesk, or WordPress. |
flow |
na |
natalie-pienkowska |
|
kisubedi |
angieandrews |
cloud-flow |
conceptual |
na |
na |
01/12/2023 |
|
With Power Automate, you can manage the approval of documents or processes across several services, including SharePoint, Dynamics 365, Salesforce, OneDrive for Business, Zendesk, or WordPress.
To create an approval workflow, add the Approvals - Start and wait for an approval action to any flow. After you add this action, your flow can manage the approval of documents or processes. For example, you can create document approval flows that approve invoices, work orders, or sales quotations. You can also create process approval flows that approve vacation requests, overtime work, or travel plans.
Approvers can respond to requests from their email inbox, the approvals center in Power Automate, or the Power Automate app.
Here's an overview of the flow we'll create and test:
The flow performs the following steps:
-
Starts when someone creates a vacation request in a SharePoint Online list.
-
Adds the vacation request to the approval center, and then emails it to the approver.
-
Sends an email with the approver's decision to the person who requested vacation.
-
Updates the SharePoint Online list with the approver's decision comments.
[!INCLUDE sharepoint-detailed-docs]
Important
Always follow the best practices for SharePoint security and your organization's best practices to ensure your environment is secure. Security is outside the scope of this article.
To complete this tutorial, you must have access to:
[!INCLUDE prerequisites-for-modern-approvals]
Create these columns in your SharePoint Online list:
Column | Type |
---|---|
Title | Single line of text |
Start Date | Date and Time |
End Date | Date and Time |
Comments | Single line of text |
Approved | Yes/No |
Manager Comments | Single line of text |
Make note of the name and URL of the SharePoint Online list. You'll need these items later when you configure the SharePoint - When an item is created trigger.
[!INCLUDE sign-in-and-create-flow-from-blank-template]
[!INCLUDE add-trigger-when-sharepoint-item-created]
The Site Address and the List Name are the items you noted earlier in this walkthrough.
-
Select New step, and then type profile into the Choose an action search box.
-
Select Office 365 Users.
-
Find, and then select the Get my profile (V2) action.
-
Select the fields from your profile that you want to include in your flow, and then select Create to save the work you've done so far.
[!INCLUDE add-an-approval-action]
Note
This action sends the approval request to the email address in the Assigned To box.
If your scenario requires it, you can attach files to your approval requests that use Microsoft Dataverse.
Follow these steps to send an email if the vacation request is approved.
[!INCLUDE add-action-to-send-email-when-vacation-approved]
[!INCLUDE add-action-to-update-sharepoint-with-approval]
Note
Site Address, List Name, Id, and Title are required.
[!INCLUDE add-action-to-send-email-when-vacation-rejected]
[!INCLUDE add-action-to-update-sharepoint-with-rejection]
Note
Site Address, List Name, Id, and Title are required.
- Select Save to save the work we've done.
If you've followed along, your flow should resemble this screenshot:
Now that we've created the flow, it's time to test it!
[!INCLUDE request-vacation-approval]
If it's likely that your flow will run for more than 30 days, consider storing your approvals in Microsoft Dataverse. This makes it possible for you to create flows that act on responses to approval requests, even after the original flow run times out.
To do this, use two flows, one to send an approval request, and the other to run business logic on the responses to the approval request, based on the Create an approval (v2) action. Learn more about long running approvals.
Tip
If you use modern email clients, you don't have to wonder if a request is still required because Power Automate automatically updates the email to indicate that the approval request is completed.
Sometimes you might want to cancel an approval request that you've sent. Possibly you made a mistake in the request, or it’s no longer relevant. In either case, the person who sent the request can cancel it by following these steps:
- Select the approval
- Select Cancel approval in the side pane.
Tip
You can always select the History tab to view the approval requests that you've canceled.
Note
The cancel feature is supported on the Create an approval (v2) action.
You can send approvals requests to persons outside your organization. To do this, use Microsoft Entra guest users by inviting users from other tenants as guests.
When you assign a role to a guest, this gives the guest the permission required to participate in the approval process.
Now that you've created and tested your flow, be sure to let others know how to use it.
- View and manage pending approval requests
- Create sequential approval flows.
- Create parallel approval flows.
- Install the Power Automate mobile app for Android, iOS, or Windows Phone.
[!INCLUDEfooter-include]