Create a Workflow with Microsoft Flow

In this demo I will show you, how to create a workflow with Microsoft Flow. I will use a business scenario where the employee apply for a leave in SharePoint List named “Team Calendar” and I as a project lead will get an email to approve or reject the request and based on my response list item will be updated with “Approve/Reject” option in ‘Status’ column.

So let’s get started –

  • First create a sample list “Team Calendar” with 5 columns (Employee Name (Renamed title), Start Date, End Date, Comment Box and Status).
  • Go to the list and click on ‘ Flow’ and then 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 ME (as a Project Lead) and SharePoint will perform the action of updating the “Team Calendar” list. Click ‘Continue’ to proceed.
  • 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 leave request is submitted to a list. I will set my email address under the field ‘To’.
  • Change the ‘Approval request’ text in the ‘Subject’ field to ‘A new leave request has been submitted by’ and append the ‘Title’ (to have the Employee name in the email subject field).
  • Insert “Approve, Reject” under ‘User options’, so that any of them can be selected directly in the notification email.
  • Delete the condition, as there will be no condition for the email sending.
  • 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 approval decision to the SharePoint item, select the SharePoint action ‘SharePoint – Update item’.
  • Select the site URL in the field ‘Site Url’ and the “Team Calendar” 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 ‘Status’ field, select ‘SelectedOption’ from the dynamic content box. This will be my response (as Project Lead) when I have selected the option.
  • Click on ‘Create Flow’.
  • Click on ‘Done’ to finalize the flow.

To test the flow, add an item in the ‘Team Calendar’ list and make sure an email is sent. Select an option in the email and make sure that the list item status column is updated.

Happy Learning!!

2 thoughts on “Create a Workflow with Microsoft Flow

Leave a comment