3 Must Have Work Ows in Microsoft Flow
3 Must Have Work Ows in Microsoft Flow
Microsoft Flow
3 Must Have Work ows in Microsoft Flow
Table Of Contents
As this was from the Flow virtual summit and the basics of Flow were covered in other sessions
from the Summit, we will skip Flow Basics and jump straight into the three work ows.
So, let’s start by looking at what we need in SharePoint for this work ow.
SharePoint setup
Holiday Request List
We need a custom list in SharePoint which will store all the holiday approval requests that
consists of the following columns.
Holiday Calendar
We also need an event list called holiday calendar to show all the leave requests in a calendar
view. We also need to apply an overlay on it so that the approved request will appear in Green
and all the pending ones will appear in purple. This will allow the Manager to view all the
requests and ensure that there are enough people on board to do the work.
That’s all you need in the SharePoint environment, now let’s go to MS Flow and start building
our work ow.
Tip: Always rename your actions and triggers based on what they do (something meaningful)
to avoid confusion in future.
Note: You will not see Holiday Calendar in the drop-down options. So, add it as custom value
“Holiday Calendar”, and then the properties will be auto-populated.
3 Must Have Work ows in Microsoft Flow
We don’t want the title to be the same as what the user entered in the request to keep it
consistent and meaningful. So, let’s set the title value to be user display name and the type of
request and the rest of the settings according to the values below.
Advance Settings
Requester: [Created by Email] “from initial request”
Note: If we don’t set the requester, then all the approvals will appear as if they are coming from
the person who created Flow. So it is essential to set the requester to the person who created
the request.
itle: Hawaii
T
Start Date: 7/8/2019
End Date: 7/12/2019
Type of Absence: PTO
Now, let’s create another subsequent request this time make it a Sick Leave so that we can see
them in the Calendar.
itle: Hawaii
T
Start Date: 7/15/2019
End Date: 7/19/2019
Type of Absence: Sick Leave
3 Must Have Work ows in Microsoft Flow
Give it a few seconds, and then let’s go to Holiday Calendar and see if the leaves appear in it. If
all goes well, then you should see two new calendar entries for the selected dates.
Now if you Log in as Manager and open email, you should see two emails for leave request
approval. Similarly, if you go to MS Flow, logged in as Manager and go to Approvals, then you
will see two approvals assigned to you.
So far so good; unfortunately, you can’t fool the Manager this time, and so the Manager will
approve the rst leave request but reject the second leave request.
3 Must Have Work ows in Microsoft Flow
Go back to the Holiday Calendar in SharePoint and refresh the page. One of the leave should
turn Green, whereas the other one will disappear.
If you go back to MS Flow and open the Holiday Approval Flow, you will see both previous runs
were successful.
3 Must Have Work ows in Microsoft Flow
ame: Collab365Approved
N
Type: Boolean
Value: 0
3 Must Have Work ows in Microsoft Flow
The Approval action will be in the left branch by default, and in the right branch, we will add a
do until action. Your Flow should look like this,
After the approval is done, we will set the variable Collab365Approved to “true”.
“So far, we started an approval process, and now we wait until the approval is completed by
checking the value of this variable. Inside the body of do-until, we will de ne the actions to run
while the approval is pending.”
ount: 1
C
Unit: Minute
Note: For the production work ow, it should be at least 1 day.
Condition
If Yes
So, if the approval action is still not complete, then we will send an email to the Manager for a
reminder.
Condition
If Yes, then we will send an email to le creator that le has been approved.
o: Created by Email
T
Subject: Your document has been approved.
Body: Good Job
If No, then we will send an email to le creator that le has been rejected.
o: Created by Email
T
Subject: Your document got denied.
Body: Come see me in my o ce.
That’s all, and this is what the completed Flow should look like.
3 Must Have Work ows in Microsoft Flow
The work ow should be running and waiting for the approval. Let’s wait for a few minutes and
then go to the Manager mailbox and see if we have got any reminder emails. You should see a
few reminder emails in the inbox.
Let’s go to the Approvals in Flow and approve the task. Once the approval task is complete, the
initiator will receive an email that the document is approved.
3 Must Have Work ows in Microsoft Flow
Wait for a few minutes, then refresh the Flow again and the entire Flow should be completed.
This is a great example to show how we can send reminders to users for their pending tasks.
Note: Once you add that, you will see Flow will automatically put this action inside Apply to
each. That’s because Flow predicts that there might be more than one attachment since
multiple attachments are allowed.
We are going to keep it very simple. However, you can use di erent settings and even set
metadata for the le, but for this demo, this is all that we are going to con gure.
Now, let’s go back to our Flow, and it usually takes a few minutes for the Flow to run depending
on how soon the Mail gets delivered and which Flow plan you have subscribed. Once the Flow
runs successfully, you can see by expending the Apply to each that it created two les since we
have two attachment in the SharePoint Library.
Note: You can also use a personal mailbox as well instead of a shared mailbox.
3 Must Have Work ows in Microsoft Flow
Vlad is also a Microsoft Most Valuable Professional (MVP) in SharePoint since 2013 and has his
own blog at www.absolute-sharepoint.com and he often shares his knowledge by speaking at
local conferences and community events. Vlad also blogs at CMSWire as well as
Computerworld and is often featured in other Microsoft sites such as Redmond Channel
Partner.