Hi everyone,
Context:
I have a Power App. The App has a button which has been assigned to a Flow/Power Automate Action. The action sends an email notification.
There are a couple of other things going on - you will note in the screenshot below I am initialising variables to perform some other functions but these are not relevant to the problem.
Using the Ask in Power Apps function, the Flow obtains the To, Subject & Body, CC content from Power Apps.
Problem
This is all working perfectly fine. However, I need to make a change. I have a SharePoint list with a single text column which displays a list of e-mail addresses (each e-mail address is a separate record). I want Flow to e-mail each e-mail address in that list instead of the using the single hardcoded e-mail address I am currently using in the Power App.
From my research I understand I can use the Get Items Action to get a list of those e-mails, and then use the Apply to Each Control to repeat the Send an email notification Action. But I cannot understand how this is supposed to work, because when I assign the Flow Action to a button in Power Apps, the function will still ask for a To value.
I also understand another approach is to possibly to create a Collection of those e-mail addresses in Power Apps, and then to send that Collection to Flow. Unfortunately I could use some direction if this is the best approach.
https://powerobjects.com/powerapps/send-a-collection-from-powerapps-to-flow/
Any direction will be appreciated.
best regards,
AmiK
Hi Qi, I get an error "Flow save failed with code 'invalidtemplate' and message 'the template validation failed: the repetition actions 'apply to each 2' reference by 'inputs' in action 'Send an e-mail (V2)' are not defined in the template.
Apologies @v-qiaqi-msft you're right. This is now working. Thank you very much for your prompt responses and support
Hi @Amik,
Have you followed my solution completely?
I use the ";" to separate emails in my flow, please post your flow configuration.
Here is my test result.
Thanks for your support @v-qiaqi-msft
I am not sure what more information I can share about my scenario. Could you let me know what is not clear and I can provide more detail?
I have attempted the suggested solution. The flow successful but unfortunately an e-mail is not received, I suspect this is because the input does not split the e-mail addresses with a semi colon?
Hi @Amik,
Based on the issue that you mentioned, do you want to send email to the users in a whole column?
Could you please share a bit more about the scenario?
I think you should add a Append to string variable action.
I have a test on my side, please take a try as below:
Please note that you should append this variable as below. Make sure you select the Email from the 'Get items' action.
Also, you should refer to the variable Email within the To parameter. Remember the 'Send email' action should be set outside the Apply to each, they are standalone.
Then you should go to your Power Apps screen, add your flow to your app as below:
Finally, set the OnSelect property of the button as below:
PowerAppsbutton.Run()
Note that PowerAppsbutton is my flow name, please replace it with yours.
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2