Microsoft Flow SharePoint Send Email By Due Date

Scope: Get Calendar Due Date and Send Email if due dates within 5, 30 or 90 days from current date.

Initially I used SPD and created 3 workflows. Here’s a screenshot of the 5 Day SPD workflow using pause actions. Didn’t work like I wanted it. Problem is that if the “due date” changed at any time, the workflow will keep the original Due Date.

 

Solution: Microsoft Flow

So Here’s the Microsoft Flow Version that I can schedule a recurrence and check the list every day and get the correct due date. This is only a rough draft of the Flow.

Set Recurrence. I set it to daily.

 

I check to see if DueDate is Null to reduce any Flow errors. You could make it required too. First I check 5 Day condition then 30 and 90.

All conditions are similar, I just use adddays function to change the logic. Final version of Flow will have a different email messages about the notice.

Only limitation is that Flow will only loop thru 500 items. Dynamic OData filters for SharePoint Connectors are not enabled yet. I could add filters after the Get Items too. but initial Get items is limited to 500. Flow is still new and getting new features added. Will continue testing and trying out advanced conditions.

Custom Actions for SharePoint designer workflows

I found a great set of custom actions called iLoveSharePoint. One of the actions is an Execute SQL action. Very handy for sending data from a list to SQL. I’ve started sending data to SQL so i can use Reporting Services to create dashboards to report item history. You can download the solution from codeplex: http://ilovesharepoint.codeplex.com/