cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WebPortal
Post Prodigy
Post Prodigy

Send an Office 365 email to selected contacts in an Excel table

Hello,

 

I'm building a flow from the template "Send an Office 365 email to selected contacts in an Excel table".

 

The file is saved in OneDrive for Business and it contains a table.

 

Now, when building the flow, I need to send an email per each row of the table. 

 

The table contains the fields: "Name", "Subject", "Body" and "Email".

 

Of course, each row contains different data.

 

How to configure the flow to get the email addresses, subject and body from the table?

 

Anotação 2020-04-19 165624.png

 

I want the flow to scroll through each row of the table, get the data and send an email.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi!

I am afraid I did not explain myself properly.

I was assuming you were using 'List rows present in a table'. If so, add an 'Apply to each' action block, assign 'List rows present in a table' value output as its input.

'Apply to each' iterates over all the elements in the input array; so if you follow my advice, it will iterate all through the rows from your excel table.

But, it will not work as desired if you assign 'For a selected item' outputs as its input

You will find tons of examples in this community, just search for 'List rows present in a table'; you can even bing/google it, in such case add excel, flow in your search

Believe me, the learning curve is fast, once you get used to search in the community, try and ask if you found a blocking issue

Happy flowing!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

6 REPLIES 6
abm
Super User
Super User

Hi @WebPortal 

 

As you mentioned the table contains "Name", "Subject", "Body" and "Email", why not use List Rows instead of select trigger.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

@abm interesting, I thought the template was the easiest path 🙂 but I'm struggling very hard to make the transition from Google Apps Script to MS Flow... 

 

Anyway, now I have the following flow, how do I iterate over each row of the table and send an email with the respective "Subject", "Email" and "Body" columns?

 

Anotação 2020-04-19 172120.png

 

Thanks a lot for helping!

Hi!

Add an 'Apply to each' action block, assign 'List rows present in a table' value output as its input.

Now if you need to send 1 email per row, move your 'Send an email' action block inside your 'Apply to each'

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi @efialttes 

Cool, I'm beggining to like this stuff... this is what I have now, but how to Run it?

 

Anotação 2020-04-19 173347.png

Hi!

I am afraid I did not explain myself properly.

I was assuming you were using 'List rows present in a table'. If so, add an 'Apply to each' action block, assign 'List rows present in a table' value output as its input.

'Apply to each' iterates over all the elements in the input array; so if you follow my advice, it will iterate all through the rows from your excel table.

But, it will not work as desired if you assign 'For a selected item' outputs as its input

You will find tons of examples in this community, just search for 'List rows present in a table'; you can even bing/google it, in such case add excel, flow in your search

Believe me, the learning curve is fast, once you get used to search in the community, try and ask if you found a blocking issue

Happy flowing!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



You got it!

 

The final solution is completely different from what I thought to be the template.... 🙂

 

Well, thanks to your valuable input, it is working now!

 

Cheers!

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,194)