web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Automate - Building Flows
Answered

Create a HTML table from an Excel table after an Apply to each condition

Like (0) ShareShare
ReportReport
Posted on 24 Oct 2023 11:41:52 by 34

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

 

Ricardinh0_0-1698147537338.png

 

 

  • Verified answer
    ManishSolanki Profile Picture
    15,085 Super User 2025 Season 2 on 24 Oct 2023 at 12:38:15
    Re: Create a HTML table from an Excel table after an Apply to each condition

    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:

    ManishSolanki_0-1698150842447.png

    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

     

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete
Loading complete