Create and test an approval workflow with Power Automate
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.
Create an approval flow
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.
Tip
For detailed information about using SharePoint with Power Automate, go to the SharePoint documentation.
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.
Prerequisites
To complete this tutorial, you must have access to:
- Power Automate.
- A SharePoint Online list.
- Office 365 Outlook and Office 365 Users account.
Note
While we use SharePoint Online and Office 365 Outlook in this walk-through, you can use other services such as Zendesk, Salesforce, or Gmail. If you are using SharePoint 2010, see SharePoint 2010 workflow retirement
Before you create the flow, create a SharePoint Online list. Later, we'll use this list to request approval for vacations.
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.
Create an automated cloud flow
Sign in to Power Automate.
Select My flows in the left-side navigation pane.
On the top-left menu, select New flow > Automated cloud flow.
Add a trigger
Give your flow a name.
Under Choose your flow's trigger, select When an item is created - SharePoint, and then select Create.
On the When an item is created card, select the Site Address and the List Name for the SharePoint list that you created earlier.
The Site Address and the List Name are the items you noted earlier in this walkthrough.
Add a profile action
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.
Add an approval action
Select New step.
Type approval into the Choose an action search box.
Select the Start and wait for an approval action.
Configure the Start and wait for an approval card to suit your needs.
Note
The Approval type, Title and Assigned To fields are required. You can use Markdown to format the Details field.
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.
Add an email action for approvals
Follow these steps to send an email if the vacation request is approved.
Select Add an action on the If yes branch of the condition.
Enter send email into the search box on the Choose an action card.
Select the Send an email (V2) action.
Configure the email card to suit your needs.
Note
To, Subject, and Body are required.
This card is a template for the email that is sent when the status of the vacation request changes.
In the Body box on the Send an email (V2) card, use the Comments token from the Approvals - Start an approval action.
Add an update action for approved requests
Select Add an action in the If yes branch.
Enter SharePoint in the search box on the Choose an action card, select the SharePoint filter, and then select the Update item action.
Configure the Update item card to suit your needs.
Note
Site Address, List Name, Id, and Title are required.
Add an email action for rejections
Select Add an action on the If no branch.
Enter Send into the search box of the Choose an action card, select Office 365 Outlook to filter the actions, and then select the Send an email (V2) - Office 365 Outlook action.
Configure the email card to suit your needs.
This card represents the template for the email that's sent when the status of a vacation request changes.
Add update action for rejected requests
Select Add an action.
Enter update into the search box on the Choose an action card, and then select the Update item - SharePoint action.
Configure the card to suit your needs.
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!
Request an approval to test your flow
Create a vacation request in the SharePoint Online list you created earlier.
After you save this request, the flow triggers, and then:
- Creates a request in the approvals center.
- Sends an approval request email to the approvers.
Create long-running approvals
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.
Cancel an approval request
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.
Request approvals from guest users
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.
Related information
- 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
- Training: Build approval flows with Power Automate (module)
- Training: Automate an approval process in Power Automate (module)