SharePoint Online/Office 365 - How To Develop Approval Workflows On List Item Add Event Using Microsoft Flows

Microsoft has introduced Flows that enable development of Workflows for SharePoint Online and more than 50 other services over the cloud.

In this article, we will see the demonstration of Microsoft Flow around SharePoint Online and will deal with List Item Add Event. For this demo, let’s consider we have a Product Catalog List which requires Approval to happen with each new item added.

We have a Product List, as shown below.

2

Go to “Flow” menu and click on “Create a Flow”.

3

Here, we have two choices. Either we can use any available workflow template that suits our requirement or we can create a new one from scratch.

4

For this demo, we will create a Flow using blank template. Go to Flow Site by clicking “See you flow” links.

5

Click on “Create from blank”. This will launch Workflow Designer.

6

On the Workflow Designer, select the Trigger.

We can select trigger from any of the available services, as highlighted below.

7

Provide the title of the Workflow.

Select SharePoint Trigger “SharePoint-When a new item is created” that will fire when a new item is added to SharePoint Online List.

8

Provide Site URL and List name to setup SharePoint context. Add an action to the Workflow by clicking “Add an action”.

9

Select approval action by selecting “Outlook.com – Send approval email”.

10

Select “Approver Email” in “To”, since this “Approver” is a People Field on SharePoint. Workflow designer is intelligent enough to represent each property as a separate field.

11

Add a condition to the workflow by clicking “Add a condition”.

12

In the condition, we are check if Approver Approved the Production or not.

If Approved, then send approval email to requestor; else delete the Product and send Email to the requestor.
13

Choose “Created By Email” field in “To” as it will hold the Email Id of the Requestor (Person added the Product). Choose “Approver Email” field in “CC” to send a copy of the mail to Approver also.

14

If not approved, delete the Product by choosing action “SharePoint – Delete item”.

15

In the “Delete item” action, specify SharePoint Site URL and List Name.

Select “ID” token for the field “Id”. This token will hold the ID of the List Item that trigged the Workflow.

16

After deleting the item, we send email to the Requestor by choosing “Created By Email” in “To” field.

Specify the body of email as desired.

Choose “Approver Email” field in “CC” to send a copy of the mail to Approver also.

17

Once all the actions are configured as required, save the workflow by clicking “Save flow”.

18

With this, we are all done and now it is time to test the workflow. 

To test the Workflow, add a new item in the Product List. Specify Title and Approver and Save the Product.

Save action will trigger the Workflow that we just created.

19

As a result of Workflow execution, Approver will get the Email with “Approve” and “Reject” options.

20

The beauty of this implementation is that the email contains clickable options for approver to submit the approver’s choices from within the email.

Here, Approver rejects the Product.

21

As a result of this Rejection, the workflow will delete the Product from the List and send an Email Notification to Requestor and Approver informing same.

22

Product has been deleted from the list

23

Now again add a new Product to the list that will again trigger the event to execute the workflow

24

Product has been added

25

As a result of Workflow execution Approve will get the Email with “Approve” and “Reject” options

26

This time Approver approved the Product

27

As a result of this Approval, the workflow sends an Email Notification to Requestor and Approver informing same.

28

Hope you find it helpful.

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now