web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Email when Planner Tas...
Power Automate
Answered

Email when Planner Task is coming 3 days from Due

(0) ShareShare
ReportReport
Posted on by 58

Hello everybody,

 

My organization turned off the ability to receive emails when a task is come within 7 days due, or past due.  I am looking to create a flow to do this for my managers.  I would like it to send an email to all assignees of each task coming due within 3 days.  I am having many issues, and what seemed to be easy, is obviously not easy for me! I attached what I have currently tried thus far.  all help appreciated, thank you for your time. 

 

Some issues:

Condition 1: Not all my tasks had the category of dueDateTime in the "Body", so I had to try and take out the ones that were null. 

Condition 2: Tried to reformat the date to what it is in the planner and get rid of the time so that it would always match on just the date.  Does not separate them like I wanted them to.  

 

Respectfully,

Jesse

Format Date =

formatDateTime(items('Apply_to_each_2')?['dueDateTime'],'mm/dd/yyyy')
 
Get future date =
getFutureTime(3,'Day','mm/dd/yyyy')
Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @ADGToreUp,

     

    You can use a Filter Array action for this. This way you don't have to loop through every single task for the filtering part. After that you can use the outputs of the Filter Array for the notifications.

     

    Below is an example

    In this example the expression checks if the due date is not null and also compares it with 3 days from now.

     

    Add this in the advanced mode:

    @and(equals(empty(item()?['dueDateTime']), false), equals(formatdateTime(item()?['dueDateTime'], 'yyyy-MM-dd'), addDays(utcNow(), 3, 'yyyy-MM-dd')))

     

    filterarray_due3days.PNG

  • ADGToreUp Profile Picture
    58 on at

    Super cool! Thank you! 

  • ADGToreUp Profile Picture
    58 on at

    This does bring one other issue.  When I try to 'get user profile' it no longer gives me the option to get the info for the assignee.  I use this to send the email.  is there another way around that, or a way to add in the filter to give me that information also? 

  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @ADGToreUp,

     

    You can use the body of the Filter Array to loop through. The _assignments array with assigned users should still be available.

     

    Below is an example.

    In this example I assumed you want to sent an email per task to each individual assignee. There are also different approaches (like grouping the tasks per assigned user), but those require a different setup.

     

    1. First apply to each loop

    body('Filter_array')

     

    2. Nested apply to each loop

    items('Apply_to_each')?['_assignments']

     

    3. Get User Profile (v2)

    item()['userId']

     

    emailpertask.png

  • ADGToreUp Profile Picture
    58 on at

    You my friend, are a genius! I really appreciate your help.  Not sure why I am struggling so much with this, just as I was getting good with VBA and great with Excel functions, my organization changed over to this new software.  Great software, just struggling on learning the new! lol

  • ADGToreUp Profile Picture
    58 on at

    I apoligize to continually bug you, but i have one more item.  It all worked great, but then I just found out that it sent emails to people on the correct due dates, but their tasks were completed already.  I tried many ways to add this to the filter, but cannot get anything to stick.  This is what I tried below... (What I added is orange text) 

     

    @And(less(item()?['percentComplete'], 100), equals(empty(item()?['dueDateTime']), false), equals(formatdateTime(item()?['dueDateTime'], 'yyyy-MM-dd'), addDays(utcNow(), 3, 'yyyy-MM-dd'))))

  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @ADGToreUp,

     

    Can you try this:

    @and(and(not(equals(item()?['percentComplete'], 100)),equals(empty(item()?['dueDateTime']), false)), equals(formatdateTime(item()?['dueDateTime'], 'yyyy-MM-dd'), addDays(utcNow(), 3, 'yyyy-MM-dd')))
  • ADGToreUp Profile Picture
    58 on at

    Thank you, again!  Works perfect.  I tried the same but without the extra 'and()' statement.  still not quite sure why the extra 'and()' is needed, but this whole thing has taught me a lot.  I appreciate the help. 

  • alvinlee Profile Picture
    10 on at

    Hi I would also like to get some help. I created something similar here as I like to send the assigned user a reminder with a specific message of the action to take when the planner task is due.

     

    alvinlee_0-1720919251287.png

     

    This is the error that I get. May I check would you be able to advice what went wrong?

    alvinlee_1-1720919407895.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard