cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JschnB
New Member

Perform Action based on Planner Task Due Date

Hello,

 

I managed to successfully put together several flows that auto-create planner tasks based on parsed info from emails. 

Now I'm trying to essentially do the opposite, and send an email with planner task details on the date that it's due. 

 

To test, I generated a new Planner Test Task:

JschnB_0-1642099424957.png

 

 

Next I created the Flow based on how I thought it should work:

JschnB_3-1642100027114.png

 

The Flow is:

1. Every day at 5 am >

2. List all tasks in Plan ID

3. Apply to Each (task) {

   Condition {And (DueDate is equal to UtcNow()

         PercentComplete is not equal to (100)

4. If above is true then Send an Email

JschnB_4-1642100107818.png

JschnB_5-1642100125700.png

 

The flow runs successfully but doesn't find the test task that I created specifically to trigger it.

 

JschnB_6-1642100357545.png

 

My best guess is I don't have the UtcNow expression detailed correctly? The date of the task is embedded within Planner, not as a string, so my issue must be in correctly identifying the date in the Flow?

 

Any help would be super appreciated! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @JschnB,

 

The Value Due Date Time field also contains a time portion. So, the first condition will not be true.

 

Can you try this for the first condition on the left side of the is equal to:

formatDateTime(items('Apply_to_each')?['dueDateTime'], 'MM/dd/yyyy')

 

Use the same formatting for the UtcNow, on the right side:

utcNow('MM/dd/yyyy')

 

With the percent complete I would use int, because it is a number value.

int('100')

 

That would look like this:

planner_condition.png

View solution in original post

2 REPLIES 2
Expiscornovus
Dual Super User
Dual Super User

Hi @JschnB,

 

The Value Due Date Time field also contains a time portion. So, the first condition will not be true.

 

Can you try this for the first condition on the left side of the is equal to:

formatDateTime(items('Apply_to_each')?['dueDateTime'], 'MM/dd/yyyy')

 

Use the same formatting for the UtcNow, on the right side:

utcNow('MM/dd/yyyy')

 

With the percent complete I would use int, because it is a number value.

int('100')

 

That would look like this:

planner_condition.png

JschnB
New Member

@Expiscornovus That worked! Thank you very much!

 

I marked your reply as the solution. Thank you again!

Helpful resources

Announcements
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 (990)