It is a Microsoft new animal targeted for end users, Microsoft Flow helps you work smarter by automating workflow across your apps and different services.
You can connect to almost all applications including Facebook, Slack, Twilio and the count goes on. As of now, Microsoft says, Flow can talk to 34 applications.
Currently it is in Preview version and expect a lot of changes when it goes public.
Is this specific to SharePoint?
No. It is not specific to SharePoint; but you can use it for SharePoint. In SharePoint it is currently enabled for few events like item added/updated. You can’t use Flow for deletion. This may appear when the product goes public.
Can it be used to replace SharePoint Designer workflows?
The answer is YES AND NO. Always depends on the Customer requirements. I have listed some of major the difference.
|SharePoint Designer workflows||Microsoft Flow|
Note: This list may change with the future release of Microsoft Flow.
How do I get it?
It is currently under Preview. Go to https://flow.microsoft.com and signup. You need to have Microsoft account to subscribe to this.
Sample workflow using Microsoft Flow
Scenario: Lets say, you have a custom Leave Request List in SharePoint. When the new items are created the Project Manager should get an approval email. The Manager should have Approve/Reject button in the email. On both Approve/Reject, the requester should get an email.
Note: As this blogs mainly talks on Microsoft Flow, I will skip SharePoint customization and validation part to you.
- Create a Custom List say “Leave Request” with the below columns.
|Description(Title)||Single line of text|
|Comments||Multiple lines of text|
|Start Date||Date and Time|
|End Date||Date and Time|
|Total Number of Days Requested||Number|
The form will look something like below.
- Creating the Flow
Microsoft has already 100’s of built in templates. You can use one of the existing one or build one from scratch using Actions and Conditions. Actions and Conditions are similar to the one that we have in SharePoint Designer workflows.
Login to https://flow.microsoft.com using Office 365 account.
Click on My Flows and the click on Create New Flow.
Type SharePoint and select “SharePoint Online – When a new item is created”
Enter the Site URL, and select the Custom List. In our case list name is Leave Requests.
Click on Add an Action. Select Action “Office 365 Outlook – Send approval email” and fill out the Details. This will give us 2 buttons Approve/Reject in the email.
Fill out the details.
Adding the Condition
- Click on + symbol at the bottom and select “Add a Condition”.
- Fill out the below details. Refer the image below.
- Object Name: Selected Option.
- Condition: is equal to
- Value: Approve
This Control also adds 2 conditions.
Under Yes, Select Send Email control and Fill out the details. Refer the image below. Repeat the same for “No” condition.
Below is the final look of our Flow.
Give a name to your Flow and Save the changes. Congratulations! Now your workflow is complete and ready to use.
- Make sure, under My Flows your new workflow is Turned on.
- Create an Item in your SharePoint “Leave Request” and after few seconds, the approver receives an email with Approve and Reject option.
- Clicking on Approve, will execute the Approve section in flow and vice versa when it is Rejected.
As mentioned earlier, there is no detailed debugging procedure available. You can check the status of each condition at run time. Once the logic executes, they will show in Green color.
Go for SharePoint Designer workflow if,
- If you have a complex logic which includes calling REST end Points, Dictionary values etc.
- CRUD operations on multiple SharePoint Lists.
- Need to track workflow activities using Task List and History List.
- Planning to reuse the same workflow across multiple site collections and multiple Lists.
Go for Microsoft Flow,
- Your IT Governance policy doesn’t allow creating custom workflow using SPD.
- Allow end User to create workflow based on their individual needs. Thereby reducing dependency on IT.
- Your workflow needs to connect multiple non SharePoint applications.
- You want to have a Lazy approval, so that user can Approve/Reject in their email.
Hope this helps!