web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ** HELP ** NEED TO EXT...
Power Automate
Unanswered

** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

(0) ShareShare
ReportReport
Posted on by 157

Hi,

 

Im struggling to be able to extract text from an email that is in a weird HTML format from Openreach

Basically anything that appears after any word that is underlined blue, i want to extract the text that is underlined red. Due to the formating of the email it bunches words together etc

sbruk89_2-1691584608351.png

Any help would be greatly appreciated!

 

 

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi @sbruk89 

     

    You could try using xapth() function that can extract the data from well-formed xml or html text. You can refer the below link:

    How to extract value from XML using Power Automate flow (tomriha.com)

     

    I could try if it possible for you to share the html of email text 🙂 (pls mask the sensitive info).

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi @sbruk89 

     

    I have designed a sample flow to parse the html that extracts the values using xapth() function. I hope it will help you in extracting the required values from the email body 🙂

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • sbruk89 Profile Picture
    157 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi Manish,

    Thank you so much that seems to work perfectly, although I require a small tweak. For B End Interface Type and B End Power, I don't need require the output to state "B End" or "- B End" as the compose already tells me what it is 😁

     

    sbruk89_0-1692373653428.png

     

  • sbruk89 Profile Picture
    157 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    sorry @ManishSolanki ,

    Also noticed that the bandwidth is missing on the flow as well 

  • sbruk89 Profile Picture
    157 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    also, I only require the part of MDF ID : 

    So in this section i only require NINTH

    sbruk89_1-1692374638146.png

     

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi  @sbruk89.

     

    Here is the updated version of the flow. It will extract the bandwidth & trim 'MDF ID' field text. I have manually changed some value by appending "b end" to test the flow as those fields are also present in 'A end' section.

     

    Pls replace "Manually trigger a flow" trigger action with when an email arrives and pass the html of email body so that flow will extract fields values for all received emails.

    ManishSolanki_2-1692376051251.png

    Add some filters in above action so that flow will trigger for the relevant email only else it will trigger for all incoming emails.

    ManishSolanki_0-1692375615589.png

     

    Expression used in above screenshot:

    @{triggerOutputs()?['body']?['body']}

    You can just copy & paste this expression in compose textbox.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • sbruk89 Profile Picture
    157 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi @ManishSolanki ,

     

    Thanks for the additional updates, truly appreciated.

     

    However, I forwarded an email onto myself to trigger the email which is fine which has a different Customer Order ID: xxx-ENTA-1677 however it still pulls through the xxx-FLXG-104

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi @sbruk89 

     

    Pls share the screenshots of your flow.

     

    Thanks

  • sbruk89 Profile Picture
    157 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi @ManishSolanki ,

    I added in that compose (Compose 4) you suggested. Which shows the correct reference xxx-ENTA-1677

     

    sbruk89_1-1692630479090.png

     

    However, when you get to action "Compose" it still has XXX-FLXG-104

     

    sbruk89_2-1692630597611.png

     

    I assume it has something to do with xxx-FLXG-104 being in the text of "Compose"

    sbruk89_3-1692630698282.png

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: ** HELP ** NEED TO EXTRACT TEXT FROM HTML EMAIL

    Hi @sbruk89 

    Pls replace static text in topmost Compose action with dynamic email body in html format. You can use the below expression in that Compose action to get the html text of the arrived email:

    @{triggerOutputs()?['body']?['body']}

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard