I have an idea to automate our company overtime forms. Id like to use PowerApps for data entry and use a SharePoint List to hold the data, the list will consist of standard strings such as name, manager, time spent, internal reference etc.
I'd like to build a Flow to run at 8am in the morning and get all the data and submit to each manager for approval, the catch is, users may submit multiple list items as they may get called out at different times during the night and submit different items.
With a list with multiple users and possible multiple entries for one user, how would i build a Flow to gather all the items for one user and present them in an email to their manager?
If there is a better way to attack this let me know!
Hope it makes sense, let me know if you need to know anything else.
Solved! Go to Solution.
Okay, here is what I have. I create a list of users, this would be the list of employees that you want get the hours for. There are other ways to get the list of users but this is just one way that I have used in the past. Then we loop and get the hours for each users. Next we build a table for all the entries for that user and add that table in a email or approval.
If this has helped please mark as a solution.
Could your problem solved by @spsolutionsgrp's solution, if yes, please consider Accept it as the solution to help the other members find it more quickly, if no, please share more details about your sharepoint list and I would provide a proper workaround for you.
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is fantastic, thank you, I've copied this and working great!
However, I'm having issues with the send email part as the user's have different managers.
I've added a column with the manager's emails but I'm having difficulty making it dynamic for each created HTML table.
Any ideas on this?
I've gathered all the info for each user in "Title" into 1 HTML table, but sending it via email to the "Manager Email" only once is proving challenging.
Here are the two options. Either add the manager to your list of users or if you have the manager field filled out in Active Directory you could use the action to get manager.
Thank you, i've applied this but it is still sending the gathered HTML multiple times for each user:
(in reference to my pic above)
3 of the same HTML email to Daniel Gell's manager
4 of the same HTML email to Service Desk's manager
Id just like 1 email per gathered HTML to their Manager
Thank you again, i apprieciate this!
Im wondering if its the placement of the Send Email action in the outer loop?
If there are 7 values on the 1st Apply to Each it will send 7 emails no matter what.
I've seen the Do Until method on these forums before and tried it but it was doing the same thing.
The first apply to each should be going through the list of users. In that list there should not be duplicate users so one emails should be sent for each users manager.
Here is my user list.
Here is my time list.
I think you may have the wrong value in the email field. Make sure it is a value from the first get items list (user list). Here is a video that may help.
not in the user list. The user list is just a list of your employees and their manager and is users to build a filter. If the users list does not work for your solution there may be other options.
Here is the video that will help explain.
Check out the on demand sessions that are available now!
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.