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 / extract outlook html t...
Power Automate
Suggested Answer

extract outlook html table into excel table using powerautomate

(0) ShareShare
ReportReport
Posted on by 3
this is my email html body
//<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:Aptos}
            @font-face
                {font-family:""Segoe UI""}
            p.MsoNormal, li.MsoNormal, div.MsoNormal
                {margin:0in;
                font-size:12.0pt;
                font-family:""Aptos"",sans-serif}
            span.EmailStyle18
                {}
            .MsoChpDefault
                {font-size:10.0pt}
            @page WordSection1
                {margin:1.0in 1.0in 1.0in 1.0in}
            div.WordSection1
                {}
            -->
      </style>
   </head>
   <body lang=""EN-US"" link=""#467886"" vlink=""#96607D"" style=""word-wrap:break-word""> 
   <div class=""WordSection1"">
      <div>
         <div>
            <p class=""MsoNormal"">&nbsp;</p>
         </div>
         <div>
            <table class=""MsoNormalTable"" border=""0"" cellspacing=""3"" cellpadding=""0"" align=""left"" width=""100%"" style=""width:100.0%"">
            <tbody>
               <tr>
                  <td style=""padding:3.75pt 1.5pt 3.75pt 1.5pt"">
                  <div>
                     <div><p class=""MsoNormal"" style="""">
                        <span style=""font-size:9.0pt; font-family:&quot;Segoe UI&quot;,sans-serif"">'AMC-sdf' </span>
                        </p>
                     </div>
                  </div>
                  </td>
               </tr>
            </tbody>
            </table>
         </div>
         <p class=""MsoNormal""><img width=""1"" height=""1"" id=""_x0000_i1025"" src=""https://mucp.api.account.microsoft.com/m/v2/v?d=AIAADLVTVAP5NT7HZ3OA
         LLPX5J2HVYHFFH4UKMWFBLUZUNNJLGFCYDIU6WQNYUJYPQ6PFHPOZK7VJL7JKKH3HXYQXPJ3NX2NXWCJ7EVBPDKK67YE6R
         NOBY5AKX6G4OY7CHIEIN2WNCCUZIFTQUT4DLIF7E7STII&amp;i=AIAADFYLTM57VMQIN6A72US2PQUBJF4YNI5F4HS5ETU72YY3JN
         VINC4M5FOSZZSFSQZ2PVAFU6HPLU7SI5BR666DVYKFWBNWTBWXABXW35EE6MW77Z4CZ72MH2E2AVKJNYHVPFOJOHQSSY3WNXXRYSGG2OLGP
         PLBQ6KN4EY45TV2ROODPJZC7F57CH6I3G3MTS3UTHTAA6IOMD4XMI4I7W6LAGLILEFU4CBBHJ2IUH2X4IR37VOB7247NYVR6PN5H3FUOMY5MR
         G45JSTRENZTFPLJC5QKFA"" style=""width:.0083in; height:.0083in""></p>
         
      </div>
   </div>
   <br><body>
</html>// 
 
 
i want to extract // <span style=""font-size:9.0pt; font-family:&quot;Segoe UI&quot;,sans-serif"">'AMC-sdf' </span>//  "AMC-SDF" into excel table. 
How do i achieve it using htmlto text but it adds whole html instead of AMC* value 
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    If your HTML is always in that format, this should be rather easy. Run the HTML through the Html to text action to remove all of the HTML code. Based on what I see, that will leave you with the value you are trying to extract.
     
  • SR-13011330-0 Profile Picture
    3 on at
    content of the mail is either 
     
     
    AMC-sdf
     
    or 
     
    AMC-sdf,AMC-wer4, and this pattern repeats  
     
    need exact set of actions to extract this value 
  • Suggested answer
    Srini007 Profile Picture
    3,483 Super User 2026 Season 1 on at
     
    You can use HTML to Text action, hope this helps you
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini
  • Chriddle Profile Picture
    8,708 Super User 2026 Season 1 on at
    Your HTML code contains several errors.
    After you've fixed them (especially the double quotes and non-breaking spaces in the CSS), you can try this expression using string functions in the HTML code.

    It finds the first occurrence of `<span>` and `</span>` and returns the text in between, minus one character at the beginning and end due to the quotes.

    Whether this works reliably depends, of course, on how standardized this email is.
     
    slice(
    	outputs('Compose'),
    	add(indexOf(outputs('Compose'), '<span style="font-size:9.0pt; font-family: Segoe UI ,sans-serif">'), 66),
    	sub(indexOf(outputs('Compose'), '</span>'), 2)
    )
     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard