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 / Sending teams message ...
Power Automate
Answered

Sending teams message for planner tasks approaching due date (14d and 30d notifications)

(0) ShareShare
ReportReport
Posted on by 12

Hi all...

 

I am looking to create a Teams message that advises when a Planner task is 30 and 14 days away from its due date.

 

My first issue is that most tasks do not have an assigned due date. I can rectify this manually although it would be preferable to use power automate to check if a task has no due date assigned, then assign a due date being x days from the created date. I've tried this however when using addDays() I lose the "due date" field from the task body.

Do I need to manually key this instead? I've tried filtering the array but it shows all the records that have no duedate field even in the array?

Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Tony_Kuiper 

     

    For that you can write this expression under due date field

    addDays(items('Apply_to_each')?['createdDateTime'],3)
    Nived_Nambiar_0-1679626076700.png

     

     
    [Note : if you don't get the required dynamic content , you can use a compose action in the loop and u will get all the variables there, from that select the desired one and double click , it will get selected , then press ctrl +c to copy it, by this you will get like this items('Apply_to_each')?['createdDateTime'] (Which i have used here in the expression]
     
    This the flow I have used here
     
    1. Get all tasks
    2. Loop through each task
     2a. Use a condition whether the duedate field is empty or not using the below expression
          empty(items('Apply_to_each')?['dueDateTime'])
          This will return True or False , then if it is True, we need to update the due date using the above expression as I said [ For demo expression I have made the flow to update the assigned date 3 days from created date]
     
    flow overall
    Nived_Nambiar_1-1679626241166.png

     

     

    I have ran the flow and I got output like this

     

    Input Task [No due date assigned]

    Nived_Nambiar_2-1679626320503.png

     

    After running flow task is assigned with date 3 days from created date [ created date is today]

    Nived_Nambiar_3-1679626378703.png

     

     

    Mark it as solution if it helps 🙂

     

     
  • Tony_Kuiper Profile Picture
    12 on at

    I set this up accordingly and thought it worked OK because of no errors. It actually didnt update the date with the function. It gave an error: ActionBranchingConditionNotSatisfied. The execution of template action 'Update_a_task_(V2)' skipped: the branching condition for this action is not satisfied.

    When you create the apply to each which value from the tasks list is supposed to be used?

     

    In order to keep moving I ended up just entering the date as a static date, however I would like to get this working for future tasks that are created without a due date being added.

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Tony_Kuiper 

     

    Could you please share screenshot of error ?

     

  • Tony_Kuiper Profile Picture
    12 on at

    There are technically no conditions that will result in a true output, however the message is the identical one as I got before I forced the dates to change.

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Tony_Kuiper 

     

    It seems like the condition is returning false,

     

    Are you using the condition

     

    empty(items('Apply_to_each')?['dueDateTime'])

     

     

  • Tony_Kuiper Profile Picture
    12 on at

    yes I was using that dueDateTime function and the equals to true function.

    I got the message when there were no dates set and the same message when dates are all set now.

    I did some reading re the same errors with sending to outlook... I wrapped the datetime items (the check if exists and the update the due date with the created plus a value) in formatdatetime().

     

    I then manually deleted a task due date and re ran the flow.

     

    Seems to work now. I suspect it's something to do with the formatDateTime thing?

  • MRChrisEther Profile Picture
    2 on at

    Hello,

     

    Did anyone resolve this:

     

    I am looking to create a Teams message that advises when a Planner task is 30 and 14 days away from its due date.

     

    ...as previously shared by someone else?

     

    Many thanks,
    Chris.

  • Sidhant_02 Profile Picture
    986 on at

    Hi @Nived_Nambiar ,
    Thanks for the response, learned a new thing through this post. Thanks @Tony_Kuiper for this question.
    Just had one small requirement that I wanted your inputs on:

    Sidhant_02_0-1707202429613.png

    Initially I had created the task named 'Demo' with no Due date and after I ran the flow (manually) it assigned a due date (from 4 days of the current date : 06/02/2024 +4 = 10/02/2024). Now what I want is let's say a user who is the part of this Teams channel (assume channel name: Power Apps) makes a change to the due date let's say changes it 12/02/2024 then once this is done I wanted a comment to be added in the same task stating 'Task_name due date changed to 12/02/2024' and also a notification to be sent to the assignee for that particular task (if there is any). 
    So if you have any idea about this please let me know

    Regards,
    Sidhant.

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