cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JanaBaldermann
Regular Visitor

Create a due date for Task in MS Teams

Hi all,

 

I've created flows where based on a mail or MS Forms a task in MS Teams is created. I want to add a due date which should be one working day after "receiving day" at 4pm. 

 

I can't find a way to do this. Can anyone help me?

 

Thanks!
Jana

1 ACCEPTED SOLUTION

Accepted Solutions
StretchFredrik
Super User
Super User

You should be able to add a due date as the image below:

 

StretchFredrik_0-1669729452500.png

and then the formula:

 

addDays(utcNow(),1,'yyyy-MM-dd')

View solution in original post

4 REPLIES 4
StretchFredrik
Super User
Super User

You should be able to add a due date as the image below:

 

StretchFredrik_0-1669729452500.png

and then the formula:

 

addDays(utcNow(),1,'yyyy-MM-dd')

Hi @StretchFredrik,

 

thanks for the formula! That's already a great help. Is it possible to add somehow that the due date should not just be the next day but the next working day? So that if a mail comes in on Friday the due date is set to Monday?

 

Thanks!
Jana

StretchFredrik
Super User
Super User

For sure, you just have to make some if statements to check the following:

 

Use a dayOfWeek() expression - that will return Sunday as 0 and Saturday as 6.

 

If this solved your issue please mark the post as Solved. 
Also, if you appreciated my answer, don't forget to give it a Thumbs Up 😃

How exactly does the formula have to look? and can 4pm be added to the due date as well?

 

For  me it returns the following error for the week days: Unable to process template language expressions in action 'Create_a_task' inputs at line '0' and column '0': 'The template language function 'DayOfWeek' expects a single parameter that is a timestamp. The function was invoked with '3' parameter(s). 

Thanks for your help! I'm a Newbie when it comes to Power Automate so I really appreciate it

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,842)