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 ?
Solved! Go to Solution.
@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.
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!
Hey Mate,
@Anonymous
This is my solution
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!
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.
@Anonymous Can you please help me with a sample?
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).
@Anonymous You can create a Table using Append string and pass it to the HTML.
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!
@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.
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!
@Anonymous Cheers Mate. I am glad that my solution helped.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
12 | |
11 | |
9 | |
9 | |
6 |
User | Count |
---|---|
26 | |
20 | |
12 | |
9 | |
7 |