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 / URGENT - Automatically...
Power Automate
Unanswered

URGENT - Automatically setting Planner Due Date to skip weekends

(0) ShareShare
ReportReport
Posted on by

Hi, I have a functioning flow which creates a Planner task when an Outlook email is flagged.

This automatically populates the 'Start Date' to the date of when the email was received and the 'Due Date' to be 3 days from the 'Start Date'. 

However I need my flow to skip weekends if this falls on the 3 day period and go to the next working day. 

I have no idea how to do this - any help would be appreciated. 

 

Due Date Time Expression: 

addDays(outputs('Compose'),3,'yyyy-MM-dd')
 
milo1234_0-1622135780287.png

 

Categories:
I have the same question (0)
  • Kaito Goto Profile Picture
    Microsoft Employee on at

    I suggest this:

    Screenshot 2021-05-31 200122.png

    1) Use the dayOfWeek(addDays(outputs('Compose'),3,'yyyy-MM-dd')) expression on the compose action (like you have mentioned). This will return 1, 2 and 3 if Due Date is on Monday, Tuesday and Wednesday etc.

    2) Use the condition action to test if the date returned by step 1 is equal to 1, 2, 6 or 7. If yes, return Due Date as

    dayOfWeek(addDays(outputs('Compose'),5,'yyyy-MM-dd')). If no, continue to Step 3.

    3) Use the condition action to test if the date returned by step 1 is equal to 3. If yes, return Due Date as dayOfWeek(addDays(outputs('Compose'),4,'yyyy-MM-dd')). If no, return Due Date as what was returned by Step 1.

  • Community Power Platform Member Profile Picture
    on at

    @kaitogoto thank you for this. Would this step of my flow go before the 'Create a task' as seen in my attachment. 

  • Community Power Platform Member Profile Picture
    on at

    @kaitogoto can you also show what you have put within each 'Compose'. Thank you

  • Community Power Platform Member Profile Picture
    on at

    I have done the following however the flow failed - please can you advise? 

     
    milo1234_0-1622631853292.png

     

    milo1234_1-1622631861446.png

     

    milo1234_2-1622631868225.png

     

    milo1234_3-1622631874600.png

     

  • Community Power Platform Member Profile Picture
    on at

    1) dayOfWeek(addDays(outputs('Compose'),3,'yyyy-MM-dd')) is create a task and compose 2 is changed to 5, compose 3 is changed to 4, and compose 4 is changed to 3.

  • Verified answer
    Kaito Goto Profile Picture
    Microsoft Employee on at

    @Anonymous  Thank you for your reply. Firstly, can you please provide what error was returned on Message 5 and for Message 4, I have provided the expressions I used in the "compose" actions on my initial reply. Secondly, I will clarify the logic I used to adjust the due dates: If you want tasks to be due within three working days, the span from start day to end day must "touch" four weekdays. This is why if three days after start day is Monday, Tuesday, Saturday or Sunday, the due date must be pushed further by two days (i.e. five days after start day) because it "touched" both Saturday and Sunday. This was the logic behind step 2 of my initial reply and same logic applies for step 3.
    Please accept as the solution if solved, reply with copy of all error messages if not. All the best!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard