Hey Guys,
I am trying to create a HTML table based on a single row from an excel table.
I am currently using the following:
1. List Rows Present in a Table
2. Apply to Each
3. Condition: If 'Generate Statement' = True
If Yes: Create HTML Table and then send as an email.
The excel table contains approx 40 rows. It is correctly identifying the one test row I want to include in the HTML table but it is duplicating it as many times as there are rows.
I just want the single applicable row to be included in the HTML table
Any help would be appreciated
Thank you. It wasn't.
I changed the column in Excel from a TRUE/FALSE to a "Y"/"N" and it seemed to do the trick.
Thank you for your help.
I have another query regarding how to get the email address from the row in question but I will post as a new question.
Thanks again.
Rich
Pls inspect if filter array is returning records from the last run flow instance.
Thanks
Thank you again for your response.
I followed the instruction but unfortunately the email returns with headers but no values.
Hi @Ricardinh0
We need to get rid of "Apply to each" action which causes the multiple emails to trigger.
Pls modify the flow as per the below instructions:
1. Delete all header & values rows from the "create html table" action.
2. Drag it out of apply to each action and place it just after the "Filter array" action.
3. Now, add the expressions for each columns. I have shown the example of 'Name' column:
item()?['Name']
Similarly, set the expression for all the required columns. It follows the following pattern:
item()?['<<Column Name in Table>>']
4. Drag out "Send an email" action out of the apply to each block and place it just after the "Create html table" action:
5. Delete the "Apply to each" action.
Pls retest the flow after making the required changes.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
Thank you for your response, but this resulted in 45 emails being sent.
I think the issue is that I need Custom Columns, when I populate the columns it creates an apply to each step which resulted in multiple emails being sent.
The emails were all blank as well.
Hi @Ricardinh0
You could use "Filter array" action just after the "List rows present in a table" action for filtering the records. After this, you could directly pass the output body of filter action to Create HTML table action. This way we will avoid the apply to each loop. Here is an example:
To enter the filter query, click "Edit in advanced mode" bottom on the bottom of the action. Filter query used in above screenshot:
@equals(item()?['Generate Statement'], True)
You could create the html table using the body of filter array action:
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2