cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Amapola188
Resolver I
Resolver I

HTML Table in email causing trouble

Good Afternoon

 

I'm compiling a table from SharePoint list items and placing it into an email. Trouble is that any text that comes after for some reason ends up in the table and nothing seems to work.

 

This is the code in the email:

<strong>@{outputs('Get_item_PO')?['body/Title']}</strong><br>
Vendor: @{outputs('Get_item_PO')?['body/Vendor/Value']}<br>
Project: @{outputs('Get_item_PO')?['body/Title']}<br>
Amount:  @{formatNumber(float(outputs('Get_item_PO')?['body/POAmountTotal']),'c','en-NZ')}</p>
<p></p>
<p>@{outputs('FormattedTable')}</p>
<p></p>
<span style="color:#3232b4">Please Reply All to keep the approval thread.</span style="color:#3232b4">
<p>Thanks,<br>

And this is what it looks like in the email:

Amapola188_0-1646886087648.png

And if you're wondering why I'm not using approvals ... one of my approvers doesn't like it. And since it's actually quite hard to get the Approvals result into an external system, an email will do just as well.

 

Thanks, Christine

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @Amapola188 ,

my guess would be that you don't close the <table> tag when building the HTML table. Try to add the </table> after the dynamic content with the table.

<strong>@{outputs('Get_item_PO')?['body/Title']}</strong><br>
Vendor: @{outputs('Get_item_PO')?['body/Vendor/Value']}<br>
Project: @{outputs('Get_item_PO')?['body/Title']}<br>
Amount:  @{formatNumber(float(outputs('Get_item_PO')?['body/POAmountTotal']),'c','en-NZ')}</p>
<p></p>
<p>@{outputs('FormattedTable')}</table></p>
<p></p>
<span style="color:#3232b4">Please Reply All to keep the approval thread.</span style="color:#3232b4">
<p>Thanks,<br>

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @Amapola188 ,

my guess would be that you don't close the <table> tag when building the HTML table. Try to add the </table> after the dynamic content with the table.

<strong>@{outputs('Get_item_PO')?['body/Title']}</strong><br>
Vendor: @{outputs('Get_item_PO')?['body/Vendor/Value']}<br>
Project: @{outputs('Get_item_PO')?['body/Title']}<br>
Amount:  @{formatNumber(float(outputs('Get_item_PO')?['body/POAmountTotal']),'c','en-NZ')}</p>
<p></p>
<p>@{outputs('FormattedTable')}</table></p>
<p></p>
<span style="color:#3232b4">Please Reply All to keep the approval thread.</span style="color:#3232b4">
<p>Thanks,<br>

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

@tom_riha 

Hi Tom - Spot on. My HTML is very basic! Thanks so much.

BTW, I really love your work. So practical and useful!

 

Working nicely now. - I've also added a &nbsp into the paragraph after the table. It doesn't seem to pick it up otherwise and sticks the sentence too close to the table.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,740)