cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarvinE
Frequent Visitor

Create E-Mail with all overdue and outstanding MS Planner tasks

Hey there,

 

I am trying to create a flow that creates an email with all overdue and outstanding MS Planner tasks. The E-Mail with the HTML table should then be send to management every morning. 

 

The table should contain the following content:

  • Task title
  • Assigned to
  • Due Date

 

The "Send a digest email of all outstanding Planner tasks" template is getting close to my needs, but it will also show all tasks that are not late yet. 

 

I tried to implement a second condition to check if "Due Date" is less then utcNow but the flow runs into an error for every tasks without a due date (the flow expects a value for every task and I can not guarantee that every user will assign a due date when creating a new task).

 

Is there a way to filter all overdue and outstanding task and create a HTML table with the result?

 

Thanks a lot in advance!

Marvin

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @MarvinE ,

 

You could add two Filter array actions above the Filter array to further filter tasks.

30.PNG

Please take a try and feel free to let us know if you have any questions about this method.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

15 REPLIES 15
v-bacao-msft
Community Support
Community Support

 

Hi @MarvinE ,

 

You could add two Filter array actions above the Filter array to further filter tasks.

30.PNG

Please take a try and feel free to let us know if you have any questions about this method.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hey v-bacao-msft,

thanks a lot! The proposed solution solved my challenge! 

 

MarvinE_0-1599726202946.png

 

There are just two last things for fine tuning the HTML table. Is it possible to:

  • format the date to only show the date without time?
  • separate the User Names in the Assigned To column so that the names are separated at least by a space or even better by a comma?

 

Currently the Due Date is displayed with time and the User Names are all connected without separation, i.e. Max MillerMoritz Miller etc.

Picture2.png

Thank you very much for your fast and valuable support!

 

All the best

Marvin

 

MarvinE
Frequent Visitor

Hi all,

 

I found a solution to format the date and to concatenate a "," behind the user name. 

 

The last step now is to add a another column that shows the bucket name of the task. I already tried a few approaches but the best I could achieve so far is to get all overdue and outstanding tasks listed but with all 4 buckets, although the task is only in one bucket.

 

MarvinE_0-1599812422960.png

 

I would highly appreciate any support.

 

All the best

Marvin

CaoMJ
Frequent Visitor

I'm trying to do what you are doing well. Can you detail out what you did? or anyway to share your flow? 

Hey @MarvinE 

 

Would you mind sharing the contents of this flow, please?

MarvinE
Frequent Visitor

Hello everyone,

 

attached you find the Flow. Let me know if you have any questions! 

The flow has been running for weeks without an error so far!

 

All the best

Marvin

 

Flow.png

Awesome, I'll take a look at this on Monday! Thank you!!

 

Hey @MarvinE ,

 

I hate to ask this but can you make the screen shots bigger. I tried zooming in and it helps a little but I'm still struggling to make out the contents.

 

I downloaded the image, I'm set now ... Thank you!

 

@MarvinE 

 

Thanks for sharing this flow! It's gotten me pretty far along! I do have a few questions, I noticed the "AssignedTo" Set variable was set to null, why is that? I'm wanting to add the Display Name of all assigned to a task. Also, I took a shot at concatenating the Usernames, with no luck. Can you share that formula? One last item, how did you format your table so nicely?

@MarvinE ,

 

This userId field doesn't show up under my filter array options, can you help me out with why that might be?

 

Flow.png

Hey Trishmalloy,

 

the "AssignedTo" variable is set to the following (after being initialized without an value at the beginning): 

concat(outputs('Get_user_profile_(V2)_2')?['body/displayName'],', ')

Please see the screenshot below for further details. If I remember correctly, the AssignedTo variable is then set to Null after going to all process steps of a specific task, to free up the variable for the next task (as the variable is initiate at the very beginning outside the "Apply to each" box.

 

MarvinE_1-1608372841441.png

 

To concatenate the user names, I used the the above formula: concat(outputs('Get_user_profile_(V2)_2')?['body/displayName'],', ')

 

I used the following code to format the table:

Flow HTML Table.png

 

I hope this works for you too! 

 

All the best

Marvin

That is an interesting questions as userId doesn't show up for me either. Please try the following: 

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

trishmalloy
Post Partisan
Post Partisan

Thank you @MarvinE !! This was so helpful and my coworker is so excited to use the automation. Thanks so much! 😁

trishmalloy
Post Partisan
Post Partisan

@MarvinE ,

 

How did you get rid of the trailing comma at the end of each Assigned to name? Someone gave me a suggestion yesterday but at this point their idea is over my head. I did some research to try to figure it out ...

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (19,787)