cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gemma
Level: Powered On

Send email with HTML table using contact information in a different Excel file

Good morning Flow Experts!

I'd like to use Flow to email a subset of a larger Excel table to different users based on a Location value. The email addresses are saved in a separate Excel file. Thanks to the help from some users last week, I was able to create separate HTML tables, but now I'm struggling to get the email part of the project right. 

After the Create HTML table step, I have added the Send an email step, but now it sends an email for every location to every email address listed! I have also tried to change the Apply to each output to "union(variables('Location'), variables('Location'))" because I thought it might be useful to "join" the table with the Email Information in, but I received a different error for that. 

Can you please provide me with other things I can try? Do I need to join the tables before the Create HTML table step? 

Email Tables1.PNG

Email Tables2.PNG

Here are data samples - I have two tables, and each of them have a Location field. I'd like to take the information from the Sample Data and email it to the corresponding Email address.

Sample Data.PNGSample Data

Email List.PNGSample Email List

4 REPLIES 4
Highlighted
Community Support Team
Community Support Team

Re: Send email with HTML table using contact information in a different Excel file

Hi @gemma ,

 

Could you please share a full screenshot of the configuration of your flow?

Would all the location have the same Email?

 

Best regards,

Alice       

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.

gemma
Level: Powered On

Re: Send email with HTML table using contact information in a different Excel file

Hi @v-alzhan-msft !

 

Thank you for getting back to me. All the locations will have different email addresses, but I've plugged in my email address for now for testing purposes!

 

Here are screenshots of all of the elements related to creating the table and sending the emails.  

Email Tables1.PNGEmail Tables2.PNGEmail Tables3.PNG

gemma
Level: Powered On

Re: Send email with HTML table using contact information in a different Excel file

Hi @v-alzhan-msft !

 

I've made some progress, but now I'm stuck on a different part of the flow. I've successfully joined my two tables, but I'm having trouble filtering it by location, especially now that my Location variable is a multi-dimensional array instead of a single item. How can I change my Apply to Each expression to fix this issue?

 

@v-bacao-msft, thank you so much for helping me with a similar issue last week! Can you also offer me some advice with this? 

 

Email Tables1.PNG

Email Tables2.PNG

Email Tables3.PNG

Email Tables4.PNG

gemma
Level: Powered On

Re: Send email with HTML table using contact information in a different Excel file

Hi!

I'm slowly working through my issue, and I'm now able to get the table that I want! I'm on the Send and Email step, and I'd like to put in the email address from the Create HTML Table step. What kind of expression can I use to get the email address from the table? 

 

I'm using this expression: 

body('Create_HTML_table_-_Filter_Inventory_by_Yard')?['Email']
 
Here's my flow followed by the results/error message I'm receiving! 
Email Tables5.PNGEmail Tables6.PNG

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (5,328)