Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

List row from HTML table in outlook mail in excel table ehich exist in sharepoint

(0) ShareShare
ReportReport
Posted on by 43

Hi,

I am recieving emails which have HTML table with constant header,and I have excel file in my sharepoint.

what I need to list the row from each outlook email in my inbox in this excel file.

write now I made a flow who flow the emails and convert html to text and put all the text in each cell in all columns,

but I need to only put each cell from each column in the mail table to its corresponding table in excel file .
any suggestions?

Thanks in advance.

osama_ayoub_1-1687797752428.png

 

 

osama_ayoub_0-1687797604865.png

 

  • Nived_Nambiar Profile Picture
    17,895 Super User 2025 Season 1 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    Hi @osama_ayoub 

     

    The logic behind this should be to use string manipulation to extract the data from the email regarding table data.

     

    The logic of extracting data from that email body should be like below 

     

    1. Split the email body based on <table> and then take the second element in the resultant array.

    2. Using second element from the array got from split operation in Step 1, use that again to split the email body based on </table> tag then take the first element out of resultant array.

    Now you have got the complete table data 

     

    3. Now you want to extract data row by row, for that split the output data from step 2 to split based on <tr>

    Now you will get collection of individual rows. 

     

    For each row, split it by <th> (in case of header) or <td> (in case of values). And then take values respectively.

     

     

     

    Problem was quite easier if regex feature was present in power automate 🙂

     

    Let me know any help is needed.

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • osama_ayoub Profile Picture
    43 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    ok I used compose action to extract html code and this is what I got 
    could you tell me how can I convert it to table in excel file ?

    Regards

     

    osama_ayoub_0-1691954519398.png

     

  • Nived_Nambiar Profile Picture
    17,895 Super User 2025 Season 1 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    Hi @osama_ayoub 

     

    Normally an html table having table in email body looks like this 

     

    <table>

    <tr>

    <th>A</th>

    <th>B</th>

    <th>C</th>

    </tr>

    <tr>

    <td>A</td>

    <td>B</td>

    <td>C</td>

    </tr>

     

    So to get the html code , use compose action after trigger and add email body which is coming as dynamic content from trigger output and show the end result of the flow which displays the email body html format.

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

     

     

  • osama_ayoub Profile Picture
    43 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    I do not know How can I find the HTML code of the table , but yes the table has only 2 rows and 5 columns with always the same header 

  • osama_ayoub Profile Picture
    43 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    I do not know How can I find the HTML code of the table , but yes the table has only 2 rows and 5 columns with always the same header .

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    Hello again.

     

    I meant the html code. If I view the source code of your post, would there be the exact html table you receive? And are there only 2 columns?

  • osama_ayoub Profile Picture
    43 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    Hello @Matthy79
    Thanks for your support
    this is a table from one mail as a sample .


    Code

    model

    Serial

    Case no

    warranty

    TV-1190895

    55U5965EA _ (TOSHIBA LED 4K smart 55 inch receiver)

    m20alaa22018a1

    CAS2023061930288699

    IN

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    Hello @osama_ayoub 

     

    I would suggest you post some sample data of such an HTML table from your email.

  • osama_ayoub Profile Picture
    43 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    yes that is what i need,
    I have outlook emails with html table (same headers and 1 row of data) and I want to list each table (I mean here the second row of table) in the table I have created in excel file on sharepoint.

    Regards

    @Nived_Nambiar

  • osama_ayoub Profile Picture
    43 on at
    Re: List row from HTML table in outlook mail in excel table ehich exist in sharepoint

    yes that is what i need,
    I have outlook emails with html table (same headers and 1 row of data) and I want to list each table (I mean here the second row of table) in the table I have created in excel file on sharepoint.

    Regards

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

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!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1