cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
therrean
Helper II
Helper II

Daily email report with uncompleted or unassigned to user tasks from Planner

Hello all,

 

I am stuck and I will appreciate some help.

I am trying to create a flow that will do the following:

Send an email every day listing all the tasks in planner that a user has not been assigned to them and that have not been completed.

 

It will be great if they are grouped by bucket name (and not ID because when visible it makes no sense).

Also the Due Date included will be great but without the time in the end that I cannot remove edit.

 

Any help or direction will be really appreciated.

 

Thank you all in advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Amit_Sharma
Super User
Super User

Hi @therrean,

I have created sample for you.

 

1. First Use Recurrence Action which trigger every.

Amit_Sharma_0-1671168941912.png

 

2. After that you can use List tasks Action which list all the task from your planner.

Amit_Sharma_1-1671169032359.png

 

3. After that Use filter array Action Which filter your task based on your Condition.

 

Use Expression in edit advance mode of filter array.

@and(equals(item()?['assigneePriority'], ''),not(equals(item()?['percentComplete'], 100)))

 

Amit_Sharma_2-1671169213548.png

 

4. After This You Can Use Select Action then select value which you send in mail.

Amit_Sharma_3-1671169344315.png

Format due date time.

formatDateTime(item()?['dueDateTime'],'dd-MM-yyyy')

Amit_Sharma_4-1671169419974.png

 

5. After that You Can Use Create Table Action.

Amit_Sharma_5-1671169554121.png

6. Then use Send email(v2) Action and send the html table.

Amit_Sharma_6-1671169667259.png

 

Complete Flow

Amit_Sharma_7-1671169704738.png

 

-------------------------------------------------------------------------
If I have answered your question, please mark post as Solved.
If you like my response, please give it a Thumbs Up.

 

Please share the flow screenshot and clarify more on requirement If I misunderstood the requirement.

 

View solution in original post

Amit_Sharma
Super User
Super User

Hi @therrean,

The Error Which Come in Select Action where you format Due Date Time Because If any Task Present in Bucket Which Not assigned any Due Date That throw error in Apply to Each Because FormatDateTime Function Never Accept First Value as a Null So Fix This Issue You Can Simply Use Expression as Shown Below.

if(empty(item()?['dueDateTime']),'Not Assigned',formatDateTime(item()?['dueDateTime'],'dd-MM-yyyy'))

Amit_Sharma_0-1671253868097.png

Amit_Sharma_1-1671254149046.png

 

After doing this it's Work Perfectly.

 

Best regards,

 

 

 

View solution in original post

7 REPLIES 7
Amit_Sharma
Super User
Super User

Hi @therrean,

I have created sample for you.

 

1. First Use Recurrence Action which trigger every.

Amit_Sharma_0-1671168941912.png

 

2. After that you can use List tasks Action which list all the task from your planner.

Amit_Sharma_1-1671169032359.png

 

3. After that Use filter array Action Which filter your task based on your Condition.

 

Use Expression in edit advance mode of filter array.

@and(equals(item()?['assigneePriority'], ''),not(equals(item()?['percentComplete'], 100)))

 

Amit_Sharma_2-1671169213548.png

 

4. After This You Can Use Select Action then select value which you send in mail.

Amit_Sharma_3-1671169344315.png

Format due date time.

formatDateTime(item()?['dueDateTime'],'dd-MM-yyyy')

Amit_Sharma_4-1671169419974.png

 

5. After that You Can Use Create Table Action.

Amit_Sharma_5-1671169554121.png

6. Then use Send email(v2) Action and send the html table.

Amit_Sharma_6-1671169667259.png

 

Complete Flow

Amit_Sharma_7-1671169704738.png

 

-------------------------------------------------------------------------
If I have answered your question, please mark post as Solved.
If you like my response, please give it a Thumbs Up.

 

Please share the flow screenshot and clarify more on requirement If I misunderstood the requirement.

 

therrean
Helper II
Helper II

Hello @Amit_Sharma 

Thank you for taking your time to help me. The flow fails with the date expression. It only works with due date and bucket id.

So back in square one.

Is there a way out?

 

I have attached two screens.

This is the flow when it works. When I put the date expression it fails.This is the flow when it works. When I put the date expression it fails.This is the format of my results. Good but I will like to see the name of the buckets and the date without the tine.This is the format of my results. Good but I will like to see the name of the buckets and the date without the tine.

Amit_Sharma
Super User
Super User

Hi @therrean,

I have Create Sample for You That is Return HTML table With Group by Bucket Name and Also Fix Date Time Format.

1. First Use Recurrence Action which trigger every.

2. After that you can use List tasks Action which list all the task from your planner.

Amit_Sharma_0-1671186714908.png

items('Apply_to_each')?['Bucket ID']

 

3. After that you can use List buckets Action which list all the Buckets from your planner.

Amit_Sharma_1-1671186779472.png

 

4. After This Use Initialize variable Action and Initialize variable with name Bucket Group  and type select type is array.

Amit_Sharma_2-1671186910842.png

 

5. After that Use filter array Action Which filter your task based on your Condition.

Use Expression in edit advance mode of filter array.

@and(equals(item()?['assigneePriority'], ''),not(equals(item()?['percentComplete'], 100)))

Amit_Sharma_3-1671187034685.png

 

6. After that Use Select (Select Bucket Id) Action and select bucket id that return by Filter array action.

Amit_Sharma_5-1671187359185.png

7. After That Use One Compose (Union) Action and enter expression for union of output that return by select bucket id.

 

union(body('Select_Bucket_Id'),body('Select_Bucket_Id'))

Amit_Sharma_6-1671187572733.png

 

8. Next Use one apply to each Action and provide output that return by Union Action.

Amit_Sharma_7-1671187731244.png

9. Take one Another Filter array (Filter array 2) Action Inside of apply to each And Provide value according to pics.

1. from field

Amit_Sharma_9-1671188086409.png

Amit_Sharma_10-1671188214685.pngAmit_Sharma_11-1671188385224.png

items('Apply_to_each')?['Bucket ID']

 

10. Then Take one Another Filter array (Filter Bucket By Id) Action Inside of apply to each And Provide value according to pics.

Amit_Sharma_12-1671188550678.png

Amit_Sharma_13-1671188685773.png

items('Apply_to_each')?['Bucket ID']

 

11. Then Take one Select (Select Columns) Action Inside of apply to each And Provide value according to pics.

Amit_Sharma_14-1671188837741.pngAmit_Sharma_15-1671188922479.pngAmit_Sharma_16-1671188973460.png

body('Filter_Bucket_By_Id')?[0]?['name']

Amit_Sharma_17-1671189022711.png

formatDateTime(item()?['dueDateTime'],'dd-MM-yyyy')

 

12. Then use One Compose (Get Variable Value) Action and get variable value that initialize above.

Amit_Sharma_18-1671189186224.png

13. After That Use Set variable Action and Enter expression.

union(outputs('Get_Variable_Value'),body('Select_Columns'))

Amit_Sharma_19-1671189275670.png

 

14. Then Use Create Html Table Action and Again Use Variable Value.

Amit_Sharma_20-1671189371792.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it.

therrean
Helper II
Helper II

Hello @Amit_Sharma 

I have followed everything and it is almost there. The flow works and send out the info if I have the date expression removed.

If it is added then the flow fails.

What do you think I am doing wrong?

Your help is appreciated!!!

Date fails.JPG

Amit_Sharma
Super User
Super User

Hi @therrean, can you please share the input values passed to the Select Columns action? I suspect the field name is different for you.

therrean
Helper II
Helper II

Hello @Amit_Sharma 

 

Please find attached the Select Columns action. Once I delete the FormatDateTime expression that is when the flow works.

 

Thank you for your help! You are a star my friend!

 

due date.JPG

Amit_Sharma
Super User
Super User

Hi @therrean,

The Error Which Come in Select Action where you format Due Date Time Because If any Task Present in Bucket Which Not assigned any Due Date That throw error in Apply to Each Because FormatDateTime Function Never Accept First Value as a Null So Fix This Issue You Can Simply Use Expression as Shown Below.

if(empty(item()?['dueDateTime']),'Not Assigned',formatDateTime(item()?['dueDateTime'],'dd-MM-yyyy'))

Amit_Sharma_0-1671253868097.png

Amit_Sharma_1-1671254149046.png

 

After doing this it's Work Perfectly.

 

Best regards,

 

 

 

Helpful resources

Announcements

Celebrating the May Super User of the Month: Laurens Martens

  @LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!        

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!    

Welcome to the Power Automate Community

You are now a part of a fast-growing vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun.   Now that you are a member, you can enjoy the following resources:   Welcome to the Community   News & Announcements: The is your place to get all the latest news around community events and announcements. This is where we share with the community what is going on and how to participate.  Be sure to subscribe to this board and not miss an announcement.   Get Help with Power Automate Forums: If you're looking for support with any part of Power Automate, our forums are the place to go. From General Power Automate forums to Using Connectors, Building Flows and Using Flows.  You will find thousands of technical professionals, and Super Users with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Automate community forums. Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered. Galleries: The galleries are full of content and can assist you with information on creating a flow in our Webinars and Video Gallery, and the ability to share the flows you have created in the Power Automate Cookbook.  Stay connected with the Community Connections & How-To Videos from the Microsoft Community Team. Check out the awesome content being shared there today.   Power Automate Community Blog: Over the years, more than 700 Power Automate Community Blog articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on the future of process automation. In the Power Automate Community Blog, you can read the latest Power Automate-related posts from our community blog authors around the world. Let us know if you'd like to become an author and contribute your own writing — everything Power Automate-related is welcome.   Community Support: Check out and learn more about Using the Community for tips & tricks. Let us know in the Community Feedback  board if you have any questions or comments about your community experience. Again, we are so excited to welcome you to the Microsoft Power Automate community family. Whether you are brand new to the world of process automation or you are a seasoned Power Automate veteran - our goal is to shape the community to be your 'go to' for support, networking, education, inspiration and encouragement as we enjoy this adventure together.     Power Automate Community Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (6,324)