Aug 02 2023 03:59 AM
I've built a flow that is nearly perfect!
Just for background:
I've got a PowerApp that lets our end users make a Stationery Order, and exports the end users order to a SharePoint List. That bits all working great.
Id like to then take this submission in the SharePoint List and get it to our purchasing team, via email- so over to PowerAutomate/Flows!
I've built a flow, that does exactly that, and tidies up the list afterwards, those with a much better understanding of Flows will immediately spot my issue.
I receive an email with the exact data I needed from the list, great!
But my flow in its current setup it sends 1 email "order summary" for each unique stationary item. So i placed an order for 5 different items, so 5 emails!
I can see why its doing this as its triggered by a new list submission, but I'm unsure how to fix it, id like it to collect the entire list data when something is submitted, and send 1 email but I'm stuck- any ideas on how to achieve this?
I need this to remain automated whenever a new list item(s) are detected as its coming from a PowerApp, and I have to avoid using Flow scheduling, as multiple people may use this order form at once (large staff base), so i cant have orders getting mixed up/combined if its only looking every day or hour. This is also why I clean up the list and delete all entries at the end of my flow so its ready for the next order.
Im hoping im missing a very obvious step or flow action, any advice would be appreciated, thanks!
Aug 02 2023 04:10 AM
Aug 02 2023 05:00 AM
@NDCOPC as you've realised, the initial problem is that the flow will trigger for each individual item ordered - i.e. each time an item added to the list. So in your Power App you need to be generating a unique order number, patching that order number to a column in the list for each item ordered then using the Power Apps (v2) trigger with the unique order number as an input parameter. Then you can use the SharePoint get items action from your list with a filter query using the order number. That will get all the items with that order number, then your Select, create html table and other actions will run as you intend.
I hope to have some time this afternoon to demonstrate this and I'll post back here asap.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)