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-
Go to “Flow” Menu and Click on “Create a Flow”
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.
For this demo, we will create a Flow using a blank template.
Go to Flow Site by clicking “See your flow” links.
Click on “Create from blank;” this will launch Workflow Designer.
On the Workflow Designer, Select the Trigger.
We can select trigger from any of the available services as highlighted below:
Select SharePoint Online as target service & select for the trigger “SharePoint -- When an existing item is modified”.
Provide a title to the Workflow “Product Details Modification Approval Request”.
Create SharePoint context by providing Site URL and List Name as shown:
You can optionally rename the Step by selecting “Rename” option as shown below-
Here, I have changed the name of the Step to “Get SharePoint Context”
Add another action to the workflow by clicking “Add an action” option.
Send an email by selecting “Office 365 Outlook” Service and “Office 365 Outlook-Send approval email” action.
Rename the name of the step to “Request Approval”.
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:
Update List Item by selecting “SharePoint Online” Service and “SharePoint-Update item” action.
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.
For Title field we have selected “Title” token that represents the current value present in the list for the Title field of this item.
In “Product Price Range” field choose “SelectedOption” token that will hold the value selected by the approver from within the mail
Once all the Steps are configured as required we can save the workflow by clicking “Save flow”
Click “Done” to return back to the workflow dashboard
On the workflow dashboard, we can see the details of services used in this workflow
Now modify and the Product in Product List and notice the “Product Price Range” field which is currently set to “Low”
Once the Product details have been changed, this will trigger the workflow that we have developed
On execution of the workflow we can see a new email hitting the inbox of the approver
Let’s consider the approver submitted “High” as approval option
This action will update the “Product Price Range” field for the list item to “High” as shown below:
Hope you find it helpful.
| | | | | | | | | |
Text-to-speech function is limited to 200 characters
| | | | | | | | | |
Text-to-speech function is limited to 200 characters
| | | | | | | | | |
Text-to-speech function is limited to 200 characters