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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Format Data Table in P...
Power Automate
Unanswered

Format Data Table in Power Automate Desktop to include in email body

(0) ShareShare
ReportReport
Posted on by 10

Hi

 

I have a simple result from a SQL query in PAD stored as a Data Table in the variable QueryResult.  This is what the data looks like.

 

Reuslt.jpg

I want to be able to format this into the body of an email (without the # row identifer) so just columns Pathway and Tot.  What is the best way of formatting and manipulating this so I can insert into the body of an email?

 

Any advice would be welcome.

 

Thank you.

 

Jon

I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    Hi @JonL_srft 

     

    You can loop through the datatable, pick only the values of Pathway and Tot columns and form the HTML table tags as per your requirement.

     

    For example:

     

    The below html..

     

     

     

    <!DOCTYPE html>
    <html>
    <body>
    
    <h2>Below are the required details</h2>
    
    <table border=1>
     <tr>
     <th width="50%">Pathway</th>
     <th width="30%">Tot</th> 
     </tr>
     <tr>
     <td></td>
     <td>08</td>
     </tr>
     <tr>
     <td>P0</td>
     <td>27</td>
     </tr>
     <tr>
     <td>P1</td>
     <td>30</td>
     </tr>
    </table>
    
    
    </body>
    </html>

     

     

    Will give you the output as below..

     

    VJR_0-1640949890683.png

     

    You can add centre alignment tags etc.

     

    Taking the above syntax, during the loop you need to form the string as follows

     

    <td>%CurrentLoopValueHere%</td>

     

     

    Once you have the html string use it to send it in the body section while sending the email.

     

  • JonL_srft Profile Picture
    10 on at

    That's great thank you!  I will give this a try.

     

    Jon

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 267 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 196

#3
Haque Profile Picture

Haque 182

Last 30 days Overall leaderboard