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 / Removing the HTML tags...
Power Automate
Unanswered

Removing the HTML tags in email body when adding row to table in Excel

(0) ShareShare
ReportReport
Posted on by 4

Hello I have read some different scenarios for removing HTML tags from an email when posting the results to a SharePoint site. However, I want to add a row to a table in Excel and cannot find a way to remove the tags from the body of the email so only the content remains. Below is the simple flow I have created. The HTML to text element is set to the Body of the email.

 

RAFLUKE_0-1701128442074.png

 

Unfortunately, the html will not be consistent so using text functions to split or replace text doesn't seem to work. I get an entry that looks like this below.

 

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.MsoHyperlink
{color:#0563C1;
text-decoration:underline}
span.EmailStyle17
{font-family:"Calibri",sans-serif;
color:windowtext}
.MsoChpDefault
{font-family:"Calibri",sans-serif}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
{}
-->
</style></head><body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><div class="WordSection1"><p class="MsoNormal" style="line-height:16.5pt"><a name="_Hlk93337619"></a><a name="_Hlk142911914"></a><a name="_Hlk536104091"></a><a name="_Hlk536103749"><span style=""><span style=""><span style=""><span style="color:#2B2E2F">Hi,<br>&nbsp;<br>I hope you had a nice weekend. I've opened a ticket to have Ops update your Test environment to 8.1.2023. Jeremy will reach out to you directly to coordinate timing.&nbsp;<br>&nbsp;<br>Please let me know if you have any questions or concerns.&nbsp;</span></span></span></span></a><span style=""><span style=""><span style=" .... etc.

 

 

Categories:
I have the same question (0)
  • Verified answer
    Gdarmon Outlook Profile Picture
    372 on at

    Hi,

     

    You can use the HTML to text action in Power Automate to remove HTML tags from the email body. This action converts the HTML content to plain text, which you can then use to add a row to an Excel table. Here’s how you can do it:

    1. Add the HTML to text action to your flow.
    2. Set the Content field of the HTML to text action to the Body of the email.
    3. Use the output of the HTML to text action to add a row to the Excel table.

    If the HTML content is inconsistent, you can use the Replace function to remove specific HTML tags. Here’s an example of how you can remove the <style> tag from the HTML content:

    replace(outputs('HTML_to_text'), '<style>', '')

    This will replace all occurrences of the <style> tag with an empty string.

    Gill

  • RAFLUKE Profile Picture
    4 on at

    Thank you, that solution worked perfect. 

  • VictorIvanidze Profile Picture
    13,073 on at
    There exists an alternative way to get the plain text email body: 
     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard