Hi, guys! I'm a beginner in Power Automate. I have a simple flow I created that sends an email to a list of emails stored inside a list. It works fine.
Here is a photo
But now, this email also needs to be sent to a list of emails from another list. I tried creating the below but it had an error. The 'Apply to each 2' was automatically generated when I entered in the 2nd 'Title' in the recipients text box.
How to resolve the error? I would really appreciate if screenshots are given for sample.
The error message is because you aren't using a valid email address. Assuming "Title" contains an email address, you'll need to use a semi-colon (;) betwen your two "Title" fields.
However, what are you trying to actually do. Right now you'll loop through every row in your List 1, and then for each of these you'll then loop thorugh each row in List 2, sending an email to every combination of each list.
List 1: Homer, Bart, Milhouse
List 2: Lisa, Marge, Maggie
THis will loop thorugh and send an email to:
Homer/Lisa, Homer/Marge, Homer/Maggie, Bart/Lisa, Bart/Marge, Bart/Maggie, Milhouse/Lisa, Milhouse/Marge, Milhouse/Maggie
If that is what you are trying to do then great!!!
Hi @ccc333ab ! Noted on the semi-colon!
As you illustrated, the looping thing (Homer/Lisa, Homer/Marge, Homer/Maggie, Bart/Lisa, Bart/Marge, Bart/Maggie, Milhouse/Lisa, Milhouse/Marge, Milhouse/Maggie ) is not my intention.
Based on your scenario, I would like the email to be sent to Homer, Bart, Milhouse, Lisa, Marge, Maggie. How do I achieve this? (Nice examples, by the way 😁 )
I guess it depends on how complicated you want to get, or if there are other things you are trying to do with this flow. You could, for example, is just run two separate loops for each list (i.e., have two ""Send an email" actions for each list).
If you don't want to have two separate email actions do that, you could do something like this:
1. Get the lists and just select out the Title from each list (since it holds an email address, I am mapping it to a column called "EmailAddress").
2. Now union those two into a single column using a "union" expression.
3. Now loop thorough each of these items you unioned together, and send an email to them.
Sorry, I should have pointed out I listed the expression in the note box (above the TO: line). But here it is in text for you:
Also, make sure you are typing this as an expression, not just in the To: Line
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.