Forum Discussion
Overview of completed tasks per day and who completed them
Hello, I would like to receive a daily overview via the Power Automate of all tasks completed that day and who completed them (set them to completed). How can I achieve this? Thanks
- Hi, Thomas!
Are these SharePoint tasks in a single SharePoint task list? Or Planner tasks in a single Planner Plan? Or something else?
What have you tried so far? Are you stuck somewhere specifically?- Thomas1730Copper Contributor
Hello Sandy, what is the difference between tasks in a single SharePoint task list? or scheduler tasks? The tasks are in Planner in different buckets. I've tried this so far but unsuccessfully, how do I get the name/userid of the user who completed the task? Thank you for your helpHi Thomas1730
Thanks for the additional info! Sorry, I've been on vacation 🙂
You're right that the completedBy person isn't shown in the Dynamic Content of the Filter Array result, possibly because there isn't always a completedBy value? But you can still retrieve it by typing it in. If you look at the output of the Filter Array action, you'll see there's a completedBy element - and even if a JSON element doesn't appear in the Dynamic Content UI, you can still refer to it manually. You can use the same syntax to get that user ID as the built-in dynamic content placeholder uses to get the createdBy user ID: that is, ['completedBy']?['user']?['id']
If you enter that as an expression in the Get User Profile action, it will get the profile of the user who completed the Planner task. Power Automate will automatically put that into a loop (for each item in the filtered array).
To test something like you're looking for, I initialized an Array variable at the top of the flow, and then used Append to Array within the loop to get each task's Title and the CompletedBy user's Display Name. Then outside the loop, created an HTML table from the array variable, that you could then put in an email.
(By the way, I guess you'd also want to filter on the Completed Date as well as the Percent Complete, right?)
Does this help you...?
Sandy
- Thomas1730Copper ContributorNo One an idea for this?