web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Merging 2 or more HTML...
Power Automate
Answered

Merging 2 or more HTML tables into one in flow

(0) ShareShare
ReportReport
Posted on by 75

Hello, 

 

I have a flow where I I am looping every country to filter array from 2 share point list and creating 2 HTML tables out of it to send it an email. (Flow can be seen below ) . 

 

But I want to merge the 2 HTML table output into one consolidated HTML before using it in Email step. I do not want to send 2 different tables inside a email . Both these HTML table output are having same columns , only difference is the Data.(Example can be seen below ) . 

 

Ideally, I would like to avoid nested loop(Apply to each inside current Apply to each ) if possible. 

Can you let me know of any way I can achieve this ?

 

Thank you 

 

Current flow: 

Sivaperumal31_0-1678411963516.png

 

HTML table output example:

Sivaperumal31_2-1678412208412.png

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @Sivaperumal31 ,

     

    If your two tables have the same format, you can hand-write an HTML table header, and then use the split() formula to cut out the table body and merge them together.

    vdezhilimsft_1-1678428644050.png

     

    vdezhilimsft_0-1678428507615.png

    vdezhilimsft_2-1678428664545.png

    vdezhilimsft_3-1678428702079.png

    vdezhilimsft_4-1678428729045.png

    <table>
    <thead>
    <tr>
    <th>Name</th>
    <th>Grade</th>
    <th>Date</th>
    </tr>
    </thead>
    <tbody>
    @{split(split(body('Create_HTML_table'),'<tbody>')[1],'</tbody>')[0]}
    @{split(split(body('Create_HTML_table_2'),'<tbody>')[1],'</tbody>')[0]}
    </tbody>
    </table>

     

    Best Regards,

    Dezhi

     

     

     

     

     

  • Sivaperumal31 Profile Picture
    75 on at

    Thank you @v-dezhili-msft , It did the job for me. Appreciate it.

  • Amirin Profile Picture
    128 on at

    Hi to the solution giver

    I use your solution,, but my table does not have any grids. can you optimize your code? ^_^

    Amirin_1-1692050551621.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 248 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 207 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 101 Super User 2026 Season 1

Last 30 days Overall leaderboard