Showing results for 
Search instead for 
Did you mean: 
New Member

Creating a flow that notifies an assigned owner of a Planner Task when the task is within 1 week of due date

Hi all,


As the title says, I am trying to notified the Assigned person, via email, when their planner task is within 7 days of the due date. (Due date being the date listed in the due date field of the planner task.) I started by using this template "Send reminder email for incomplete Planner tasks in a plan" but cannot figure out how to have the system check if a due date is within 7 days.


I think the rest of the template would apply after that to sending the email, but the template is looking at % complete and not due date.

Any help appreciated! Thanks.

Dual Super User
Dual Super User

Hi @RRamsay,


You could add another criteria in the condition action to check for the due date. You can use the dueDateTime field for that from Get Task action.


With an expression you can retrieve the date of the dueDateTime field and remove the time part of it. You can also use the utcNow and addDays functions to calculate which day is 7 days from now.


Below is an example of that approach.

In this example I am also checking if the dueDateTime is empty. If it is empty I am setting it to custom date (1600-01-01). The e-mail will only be sent if the due date is exactly 7 days from today.


if(empty(body('Get_a_task')?['dueDateTime']), '1600-01-01', formatdatetime(body('Get_a_task')?['dueDateTime'], 'yyyy-MM-dd'))

is equal to

formatdatetime(addDays(utcNow(),7), 'yyyy-MM-dd')




New Member

thank you! I will give this a go!

Hi @Expiscornovus ,


What would your function be if you wanted to run the email if the date is within 7 days and not exactly 7 days out?

Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,278)