Manage sequential approvals with Microsoft Flow

Some workflows require pre-approval before the final approver is required to sign off. For example, a company may have a sequential approval policy that requires pre-approval for invoices over $1000.00 before they're approved by the Finance department.

In this walkthrough, we create a sequential approval flow that manages employee vacation requests.

Detailed steps in the flow

The flow:

  1. Starts when an employee creates vacation request in a SharePoint Online list.

  2. Adds the vacation request to the approval center and then emails the request to the pre-approver.

  3. Emails the pre-approval decision to the employee.

  4. Updates the SharePoint Online list with the pre-approver's decision and comments.

    Note: If the request is pre-approved, the flow continues with these steps:

  5. Sends the request to the final approver.

  6. Emails the final decision to the employee.

  7. Updates the SharePoint list with the final decision.

This image summarizes the preceding steps:

visio diagram of the flow

Prerequisites

  • Microsoft Flow.
  • 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.

Before you create the flow, create a SharePoint Online list; later, we'll use this list to request approval for vacations.

The SharePoint Online list that you create must include the following columns:

SharePoint list columns

Make note of the name and URL of the SharePoint Online list. We use these items later when you configure the SharePoint - When a new item is created trigger.

Create your flow from the blank template

  1. Sign in to Microsoft Flow.

    sign in

  2. Select the My flows tab.

    select my flows

  3. Select Create from blank.

    create from blank

  4. Select the Create from blank button.

Add a trigger

  1. Enter SharePoint into the search box.

    search for sharepoint triggers

  2. Find, and then select the SharePoint - When an item is created trigger.

    select sharepoint trigger

  3. Select the Site Address and the List Name for the SharePoint list that your flow monitors for new items.

sharepoint info

Get the manager for the person who created the vacation request

  1. Select New step, and then select Add an action.

    new step

  2. Enter get manager into the Choose an action search box.

  3. Find, and then select the Office 365 Users - Get manager (V2) action.

    select office users

  4. Insert the Created By Email token into the User (UPN) box on the Get manager card.

    This action gets the manager for the person who created the vacation request in SharePoint.

    get manager config

  1. Provide a name for your flow, and then select Create flow to save the work we've done so far.

    save flow

    Note

    Select Update flow from the top of the screen periodically to save the changes to your flow.

    select update action

After each save operation, select Edit flow from the top of the screen, and then continue making changes.

Add an approval action for pre-approvals

  1. Select New step, and then select Add an action.

    new step

  2. Enter approval into the Choose an action search box.

    search for approval

  3. Select the Approvals - Start an approval action.

    select the approvals action

  4. Configure the Start an approval card to suit your needs.

    Note

    The Title and Assigned To fields are required. You can use Markdown to format the Details field.

    configure the approval

Note: This action sends the pre-approval request to the email address in the Assigned To box.

Add a condition

  1. Select New step, and then select Add a condition.

    add condition

  2. Select the Object Name box, and then enter response into the search box on the Add dynamic content from the apps and services used in this flow card.

  3. Select the Response token.

    select response token

  4. Select the Value box, and then enter Approve into the box.

    Note

    The valid responses to the Approvals - Start an approval action are "Approve" and "Reject". These responses are case-sensitive.

  5. Your Condition card should now resemble this image:

Note

This condition checks the response from the Start an approval action.

Add an email action for pre-approvals

  1. Select Add an action on the IF YES branch of the condition.

    add new step

  2. Enter send email into the search box on the Choose an action card.

    search for email actions

  3. Select the Office 365 Outlook - Send an email action.

    select send an email action

  4. 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.

    Note: In the Body box on the Send an email card, use the Comments token from the Approvals - Start an approval action.

configure pre-approved email template

Add an update action for pre-approved requests

  1. Select Add an action from the IF YES branch.

  2. Enter update into the search box on the Choose an action card.

    search for update action

  3. Select the SharePoint - Update item action.

    select update item

  4. Configure the Update item card to suit your needs.

update item configuration

Get the pre-approver's manager

  1. Use the Get the manager for the person who created the vacation request steps we did earlier to add, and then configure another Get manager action. This time we get the pre-approver's manager.

  2. The Get manager 2 card should resemble this image when you're finished. Be sure to use the Email token from the Get manager category on the Add dynamic content from the apps and services used in this flow card.

    get pre-approver's manager

Add the final approval action

  1. Use the add an approval action for pre-approvals steps we did earlier to add, and then configure another Start an approval action. This action sends an email request for final approval.

  2. When you're done, the card should resemble this image:

    configure the approval

Add the final approval condition

  1. Repeat the steps from add a condition to add, and then configure a Condition that checks the final approver's decision.

Send email with final approval

  1. Use the steps from Add an email action for pre-approvals to add, and then configure an action that sends an email when vacation requests are approved.

  2. When you're finished, your card should resemble this image:

    final approval email template

Update SharePoint with approval

  1. Use the steps from Add an update action for pre-approved requests to add, and then configure an action that updates SharePoint when the vacation request is approved.

  2. When you're finished, the card should resemble this image:

    update item configuration

Send email with pre-approval rejection

  1. Select Add an action on the IF NO, DO NOTHING branch.

  2. Enter Send email into the search box of the Choose an action card.

    search for email action

  3. Select the Office 365 Outlook - Send an email action.

    select the send email action

  4. Configure the email card to suit your needs.

    This card represents the template for the email that's sent when the status of vacation requests change.

configuration for rejected requests

Note: This action must be added to the IF NO, DO NOTHING branch below the Condition card.

Update SharePoint with pre-approval rejection

  1. Select Add an action.

    add action

  2. Enter update item into the search box on the Choose an action card.

    search for update action

  3. Select the SharePoint - Update item action.

    select update item

  4. Configure the card to suit your needs.

update sharepoint for rejected requests

Send email with final rejection

  1. Use the steps from Send email with pre-approval rejection to add, and then configure an action that sends an email when the vacation request is rejected by the final approver.

    Note: This action must be added to the IF NO, DO NOTHING branch below the Condition 2 card.

  2. When you're finished, the card should resemble this image:

    configuration for rejected requests

Update SharePoint with final rejection

  1. Use the steps from Update SharePoint with pre-approval rejection to add, and then configure an action that updates SharePoint if the final approver rejects the vacation request.

  2. When you're finished, the card should resemble this image:

    update item card

  3. Select Update flow to save the work we've done.

    select update action

If you've followed along, your flow should resemble this image:

overview of flow

Now that we've created the flow, let's see it in action.

Request an approval

Create a vacation request in the SharePoint Online list you created earlier.

After you save this request, the flow triggers, and then:

  1. Creates a request in the approvals center.
  2. Sends an approval request email to the approvers.

Your request should resemble this image:

vacation request

View pending approval requests

View all pending approval requests by following these steps:

  1. Sign in to Microsoft Flow.

    sign in

  2. Select the Approvals tab.

    approvals tab

  3. Find all pending approval requests under Received requests.

    pending requests

Pre-approve a request

If you're an approver in an approval flow, you receive an email whenever someone creates a request. The approval request is also sent to the approvals center. You can then approve or reject requests from the email, the approvals center, or the Microsoft Flow app.

To approve a request:

From email

  1. Select Approve from the email you receive when an item is added to the SharePoint Online list.

    Note: If you're using a mobile device with the Microsoft Flow app installed, the Microsoft Flow app launches, otherwise, the approvals center opens in your browser.

    request email

  2. Enter a comment, and then select the Confirm button.

    enter comment

From the approvals center

  1. Sign in to Microsoft Flow.

    sign in

  2. Select the Approvals tab.

    create from blank

  3. Select Approve on the request you want to approve.

    create from blank

  4. Add a note, and then select the Confirm button.

    add note then confirm

From the Microsoft Flow app

  1. On your mobile phone with the Microsoft Flow app installed, select Approve from the request approval email.

  2. Select Confirm in the upper right corner of the screen.

    select confirm

  3. The success page shows, indicating that your approval has been recorded.

    success page

Note: The screens on Android, iOS and Windows Phone may differ slightly, however, the functionality is the same on all devices.

Approve the request

The steps to approve a request are identical to the steps to pre-approve a request

Note: The final approver gets the vacation request only after the request has been pre-approved.

Reject a request

You can reject a request via email, the approvals center, or the Microsoft Flow app. To reject a request, follow the steps for approving a request, but select Reject, instead of Approve.

After you confirm your decision (rejection of the request), the flow runs the following steps:

  1. Sends an email to the person who requested vacation.
  2. Updates the SharePoint Online list with the decision, and the comments from the approver.

More information

Single approver modern approvals walkthrough