cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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 DataSample Data

Sample Email ListSample Email List

4 REPLIES 4
Highlighted
Community Support
Community Support

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.

Highlighted

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

Highlighted

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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,570)