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 / get the html file from...
Power Automate
Answered

get the html file from SP Asset library in power automate

(0) ShareShare
ReportReport
Posted on by


Hi all,


I am new to power automation. I have created the HTML table using create HTML table and Compose action in power automate. here we need to use the HTML table which is created in SP asset library. is there any way to call a html file in power automate?

is there any way to write html in power automate ?

1) power automate component with following html code.

<table style="width:100%">
<tr>
<th>names</th>
</tr>

2) get items , loop append to table row.

<tr>
<td>current item 1</td>

</tr>

<tr>
<td>current item 2</td>

</tr> ... etc

3) close the table and send email.

</table>

 

is it possible ?

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    Hey Mate,

     

    @Anonymous 

     

    This is my solution

     

    CFernandes_0-1602608214633.png

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @CFernandes 

     

    Thanks for your quick response. I need to call that html file, then create the table in Power automate . Is it possible?

     

    Thanks a lot.

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @Anonymous  Can you please help me with a sample?

  • Community Power Platform Member Profile Picture
    on at

    Hi ,

     

    Consider a file stored in SP asset library. below is the file content.( file may contain the html or css )

     

    <table style="width:100%">
      <tr>
        <th>Firstname</th>
        <th>Lastname</th>
        <th>Age</th>
      </tr>
      <tr>

    /* table row will be dynamically populated from power automate*/
      </tr>
    </table>

    I need to call this file in Power automate. then append the table rows (dynamic data from get list items).

     

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @Anonymous You can create a Table using Append string and pass it to the HTML. 

     

    • The idea here would be to add a unique string in HTML.
    • Use the replace() function in HTML and replace the unique string with the Table that we populate in PowerAutomate.

    It would be difficult for me to setup a sample for you as I am swamped with work today. Maybe I create a demo by tomarrow evening. 

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    on at

    Hi @CFernandes 

     

    Thanks a lot .Please give some example . I will try from myside also.

     

    Again thanks.

  • Verified answer
    CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @Anonymous 

     

    Hey Mate,

     

    Here you go

     

    HTML in SharePoint Library. Note: I have $$$$$ which I will replace with actual table in Power Automate.

     

    <html>
    <head>
    <style>
    table {
     font-family: arial, sans-serif;
     border-collapse: collapse;
     width: 100%;
    }
    
    td, th {
     border: 1px solid #dddddd;
     text-align: left;
     padding: 8px;
    }
    
    tr:nth-child(even) {
     background-color: #dddddd;
    }
    </style>
    </head>
    <body>
    
    <h2>HTML Table</h2>
    
    <table>
     <tr>
     <th>Company</th>
     <th>Contact</th>
     <th>Country</th>
     </tr>
    
     $$$$$
    
    </table>
    
    </body>
    </html>

     

    Flow Solution.

    CFernandes_0-1602747184914.png

     

    Formula to replace $$$$$ with HTML 

     

    replace(outputs('Compose'),'$$$$$',variables('strVar'))

     

    Note: strVar hold the Table we created dynamically.

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @CFernandes 

     

    Thanks for the sample .It worked perfectly.

     

    Thanks a lot.

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @Anonymous  Cheers Mate. I am glad that my solution helped.

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard