How To Develop Approval Workflows On List Item Update Event Using Microsoft Flows

For the demo in this article, I will consider a business scenario where, when any product in the product list gets updated, an approval process will execute and an email will be sent to the approver for the selection of the price range for the updated product.

To start with the demo I have a product list in the SharePoint Online site as shown below-

SharePoint

Go to “Flow” Menu and Click on “Create a Flow”

SharePoint

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

SharePoint

For this demo, we will create a Flow using a blank template.

Go to Flow Site by clicking “See your flow” links.

SharePoint

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

SharePoint

On the Workflow Designer, Select the Trigger.

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

SharePoint

Select SharePoint Online as target service & select for the trigger “SharePoint -- When an existing item is modified”.

SharePoint

Provide a title to the Workflow “Product Details Modification Approval Request”.

SharePoint

Create SharePoint context by providing Site URL and List Name as shown:

SharePoint

You can optionally rename the Step by selecting “Rename” option as shown below-

SharePoint

Here, I have changed the name of the Step to “Get SharePoint Context”

SharePoint

Add another action to the workflow by clicking “Add an action” option.

SharePoint

Send an email by selecting “Office 365 Outlook” Service and “Office 365 Outlook-Send approval email” action.

SharePoint

Rename the name of the step to “Request Approval”.

SharePoint

Choose an approver’s email in “To”, here I am just selecting the email of the person who has originally created the product in the list by choosing “Created By Email” field.

Specify Subject as applicable.

Specify User Options that allow the approver to select the approval options from within the mail.

Specify the Body content as required. This content can consist of dynamic tokens provided by Workflow runtime as shown below:

SharePoint

Update List Item by selecting “SharePoint Online” Service and “SharePoint-Update item” action.

SharePoint

Rename the step to “Update item”

Specify Site URL & List Name

In Id field select “ID” token provided by workflow runtime. This token represents the List item Id of the item that triggered this workflow to execute.

It is important to note that values to all mandatory fields in the list must be provided. If you don’t want to change the values you can choose the same values again.

SharePoint

For Title field we have selected “Title” token that represents the current value present in the list for the Title field of this item.

SharePoint

In “Product Price Range” field choose “SelectedOption” token that will hold the value selected by the approver from within the mail

SharePoint

Once all the Steps are configured as required we can save the workflow by clicking “Save flow”

SharePoint

Click “Done” to return back to the workflow dashboard

SharePoint

On the workflow dashboard, we can see the details of services used in this workflow

SharePoint

Now modify and the Product in Product List and notice the “Product Price Range” field which is currently set to “Low”

SharePoint

Once the Product details have been changed, this will trigger the workflow that we have developed

SharePoint

On execution of the workflow we can see a new email hitting the inbox of the approver

SharePoint

Let’s consider the approver submitted “High” as approval option

SharePoint

This action will update the “Product Price Range” field for the list item to “High” as shown below:

SharePoint

Hope you find it helpful.

G
M
T
 
Text-to-speech function is limited to 200 characters
G
M
T
 
Text-to-speech function is limited to 200 characters


Similar Articles