Share via


SharePoint Online: Approve Request via email and update response in List

In this article, we are going to discuss the process of creating an approval workflow. We will work on functionality so that the Approver or Manager can approve and reject the request via email instead to navigate webforms.

Scenario

  1. Employee raises a leave request.
  2. The request goes to the employee manager or whoever is assigned as AD or synced with the O365 account.
  3. Manager can approve or reject the request with comments via email.
  4. The employee will get notified based on the manager comments. 

Prerequisites

  1. Microsoft Flow.
  2. A SharePoint Online list.
  3. Office 365 Outlook and Office 365 Users account.

Let's get started

  The overall Microsoft Flow structure will look like this.

1. Leave request

To create a leave request, I am using a List at SharePoint Online. Employee submits a request and the associated MS Flow gets triggered on item creation.

2. String variable

Create a string variable as a name Manager (This step can be optional too).

3. Get user manager

Get user manager from O365 profile using "created by"; i.e., who has created the request. User Manager should be assigned at O365 User Profile.

Set Manager email id to the created variable to send the request.

4. Add action

 

Add an action “Start and Wait for an approval”.

Select the approval type: Approve/Reject – First to respond and assign the request to Manager with title and details.

The advantage of this action is that the workflow will not proceed until the manager approves or rejects the workflow via email body button.

5. Check conditions

 

Check for condition and accordingly, update the manager comments provided in an email to SharePoint Online List.

5.1 Request status approved

 

If Request status is approved, then update the action. The "Send email" section will look like this.

5.2 Request status rejected

If the Request status is rejected, then update the action. The "Send email" section will look like this.

Now, we will talk about the flow process.

 

The user creates a request via form (Created a list at SharePoint Online with a required column for demo purpose). Here, I have created the first request.

The designated Microsoft Flow gets triggered and waits until the request is not responding.

Switch to "manage email" box and check for email. Manager will get an approval email.

Approval of request assigned manager can act over a request with approving or rejecting a request with comments.

As approver responded to an email with comment and approved status. The Leave request item will get updated with a response,

The employee gets a final notification along with the approve/reject status.

I hope you have learned something new in this article. Stay tuned for related articles to get more insights and learning.