cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

How to build a flow with a dynamic table in an email?

Hello, I am completely new to Microsoft Flow so I apologize if this has been answered. I looked through multiple posts and it seemed like that were needing what I need, but I could not figure it out at all.

 

Here's what I am trying to do, I have the below Excel table.

 
 
 

Email Table .png

 

I would like to turn this into a email, but with a dynamic table with multiple rows. That, would turn into this email,

Email.png

 

And then repeat that for each email. So for that table, I would have 3 total emails. 1 for firstname@gmail.com 1 for firstname2@gmail.com and 1 for firstname3@gmail.com. 

 

I know from other posts I will need an html table, but I haven't even been able to get it to filter the table properly. Please help. I have seen so 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

@MoneyJ2k 

 

Built an example for you to review.

 

2.JPG

3.JPG

4.JPG

 

Output Email:

5.JPG

 

Please review above sample and let me know if you have any questions.

 

If this sample helps you, please mark this reply as Accepted Solution.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

@MoneyJ2k 

 

Built an example for you to review.

 

2.JPG

3.JPG

4.JPG

 

Output Email:

5.JPG

 

Please review above sample and let me know if you have any questions.

 

If this sample helps you, please mark this reply as Accepted Solution.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

Highlighted

Thanks for the reply!

 

Wont this only filter the email once by that specific email? I need the email to be dynamic. It won’t always be the same email and I need it to loop through each email. Do it couldn’t be just eq’firstname@gmail.com’ it would have to build some form of loop so I could put in any email and any size table with any number of emails.

Highlighted

@MoneyJ2k 

 

Updated my sample to reflect your requirement.

 

Created a list to track all the emails.

10.JPG

Here is the complete sample flow:

11.JPG

12.JPG

13.JPG

14.JPG

 

The above sample works if you know all the Email IDs ahead. If you do not know then, then we need to read from the excel to find distinct email addresses.

 

Please mark the reply as Accepted Solution if this helped you.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
Highlighted

Thanks for the help. I think we are really close.

 

"If you do not know then, then we need to read from the excel to find distinct email addresses."

 

I do need the emails to not be a predetermined list, however I can do that with excel. So I made a power query in excel that returns a unique email list. That takes the place of the sharepoint list you had. How could we make the flow do that instead? The first part of the flow seems to work. The part where the excel table is brought in and filtered by the email list, however I can't seem to get that join function to work. What am I doing wrong?

 

Flow.png

 

 

Highlighted

Hi @MoneyJ2k,

 

@rsaikrishna 's solution is great, it could make the table beautiful, and I have an idea that could not create additional Sharepoint list to store these Emails.

 

You could initialize an array variable named EmailAddress, then use select to get all Emails from the Excel, then use union() function to remove these repeat Emails to store in the EmailAddress variable, then you will get a variable like:

[
{"Email": "firstname@gmail.com"},
{"Email": "firstname2@gmail.com"},
{"Email": "firstname3@gmail.com"}
]

Annotation 2020-06-03 092307.jpg

 

Then put the variable into the Apply to each action to loop through these Emails, use expression item()?['Email'] to get them:

Annotation 2020-06-03 093305.jpg

 

Then the following steps are provided by @rsaikrishna. Please enjoy it.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 (7,543)