How to build a scheduled Custom Flow that sends reminders

What if you can make your boss happy by automating his / her reminders so he / she doesn’t have to spend his valuable time on old-fashioned (and boring) manual / visual follow-up and reminders?

deadline-2636259_1920

Dare and Win

Haven’t you dared to test Microsoft Flow yet? Then you simply have to do it! There is an old Swedish saying that says “Scared boys are never allowed to kiss the beautiful girls” (and of course vice versa 🙂 ). This also applies in this context. If you do not dare to test, you will never get to use the fun technologies.

just-do-it-1432951_1920

With Microsoft Flow, you do’nt need to be a rocket scientist to automate simple tasks. You can start “in the small” and then expand the scope.

The Case

One of my clients had a task list where they entered tasks and assigned them to those responsible and each task was also assigned an audit date. After that, a SharePoint Workflow was started which assigned the task to the person in charge.

The functionality that was missing was that if the revision date had passed and the responsible person had not yet filled in the body field with a suggested solution, a friendly reminder would be sent.

Since we no longer want to use SharePoint Designer but instead want to replace all old, self-developed, classic workflows, I checked if I could build this functionality using Microsoft Flow (and I could).

The Solution

Since there are probably many more of you who need such a simple reminder function, I thought I would share the solution here:

This flow runs once a day on a SharePoint list, “loops” through all list items and does the following:

  • Check if the Responsible field is filled out
  • Check if the revision date has passed
  • Check if the Body field is empty

If the revision date has passed the current date and and the Body field is empty, an email should be sent to the Responsible.

The SharePoint List

02 the list
A Custom List. This is the one we will look through in order to find items where today > the Due Date (Frist) AND the field Body does not contain anything.

 

A SharePoint list item (that meets the condition)

01 TheListElement
A list element where due date has passed AND the body field is empty

 

Creating the Flow

 

Open Microsoft Flow

A GoTo Flow

Create a new Flow. Select “Scheduled-from blank”

1 Create New Flow

Give it a name and choose when (and how often) it should run. Then Press “Create”.

2 Name it and set frequency

Now we can begin to customize it. Click on the “Next step” button that appears under “Recurrence”.

3 New step

Add the Action “Get items”.

Enter the Site Adress of your SharePoint Site

Select the List

Choose “Order by” ID

4 Get Items

Now we have the steps “Recurrence” and “Get items”.

Click on the “Next step” button that appears under “Get items”.

5 Insert New Step Apply to Each

Add the Action “Apply to each”. Then select “Value” from Dynamic Content.

6 select Value from Dynamic Content

 

Now, in the “Apply to each”, Add a new step and select “Condition”.

Here you add the fields and conditions to be validated

7 Insert a Condition into the apply to each

Frist (Which is the Due Date in Norwegian…) is compared to todays date. See expression below for “setting today”.

8 Frist Formula

Ansvarlig (Which is Responsible in Norwegian) shall not be equal to null

9 Responsible Formula

The field Body shall be empty (not equal to null)

10 Body Formula

Now we are done with the Condition. Now we have to take care of what shall happen if its True or False. If it is false we will not do anything with the current item but if it is True we want to send an email to the person in the field Ansvarlig (Responsible).

11 Insert new step Send an email into Yes Condition

In the “If Yes” Section, Add an action and select “Send an email”.

From “Dynamic content” You can add the email address to the To-field

Enter a subject of the email

Customize the body text of the email. Also here you can add Dynamic content such as “Link to item” etc. It is worth knowing that the “Link to item” is the address to the item but it will not be formatted as an clickable url. Therefore i have created a link (url) to the List and also the “Link to Item”.

12 Configure the Email

Now we are done building the flow. Press “Save” and then use the “Flow Checker” to verify that everything looks OK.

13 Save Your Flow

If You get no errors or warnings then You have done an excellent job and you are probably good to go. 🙂

14 Run Flow Checker

But just to be sure, click on “Test”.

15 Test Your Flow

Select “I’ll perform the trigger action and then press the Test button.

16 Test Flow Test Button

Now press the button called “Run flow” (and hope for the best).

17 Run Flow

If You see this picture then go to the “Flow Runs Page” in order to se how it went.

18 Successfully Started

As always Red is bad and green is good….

19 Log

If the Flow ran successfully there should be an email in someones mailbox. (probably Yours since You are only testing now). Check the mail and open the item and see if the validation has worked the way it is intended.

20 The Email

Thats it! It is not more difficult than this. Now that you have succeeded in making this work, you are soon ready to take your automation skills to the next level. Now, continue experimenting with building small simple Flows to automate and simplify your (and your colleagues’) working days.

“May the flow be with you!”

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.