Microsoft
Flow can be used with many different cloud services, but
Peter Kalmström, CEO and Systems Designer
of kalmstrom.com Business Solutions, has chosen to use SharePoint
for this first Flow tutorial.
In the demo below Peter shows how to create a decision workflow
with Microsoft Flow. Peter uses a business scenario where
the example company has three product ranges: Red, Blue
and Green. Antonio Moreno is the product manager who decides
which range each new product should go into.
Product decision flow
When a new product is added to the Products SharePoint list,
Antonio will get an email where he can choose range for
the new product. When that is done, the list item will be
updated with the chosen range.
SharePoint list
The company has a SharePoint Products list, where new products
are entered as new items. The list has a 'Product Range'
column, and the Title column is renamed into 'Product name'.
(In the flow it will still be referred to as 'Title' )
Flow creation
In
the "Products" list, click on ' Flow' and select 'Create
a Flow' .
Select the template 'Send approval email when a
new item is added'. Here Outlook will perform the action
of sending an e-mail to the product manager and SharePoint
will perform the action of updating the Project list.
Click 'Continue' to proceed.
Define trigger parameters for the flow. As this
flow was created from SharePoint, the 'Site url' and
'list name' are filled out automatically.
Set the information of the user who will get a message
when a product is added to a list. Peter sets Antonio'
s email address under the field 'To' .
Delete the condition, as there will be no condition
for the email sending.
Change the 'Approval request' text in the 'Subject'
field to 'Product range decision for :' and append the
product title 'Title' (to have the product name in the
email subject field).
Insert "Red, Blue, Green" under 'User options' ,
so that any of them can be selected directly in the
notification email.
Rename 'Send approval email' to 'Send decision email'
to be more descriptive.
Select 'New step' and then 'New action' to select
the action which will update the SharePoint item.
Since
we are going to write back the product range decision
to the SharePoint item, select the SharePoint action
'Update item' .
Select the website URL in the field 'Site Url' and
the Products list under the field 'List name'
Select the field 'ID' from the dynamic content pop-up
box as 'Id' . This will be the ID from the initial trigger.
Select the field 'Title' from the dynamic content
pop-up box 'Title' .
In the 'Product range' field, select 'SelectedOption'
from the dynamic content box. This will be Antonio'
s response when he has selected the range.
Click on 'Create Flow' .
Click on 'Edit flow' to edit the flow name 'Send
approval email when a new item is added' into 'Send
decision email to Antonio' .
Click on 'Done' to finalize the flow.
To test the flow, add a product item in the Projects
list and make sure an email is sent. Select a range
in the email and make sure that the list is updated.