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 / Parsing text from emai...
Power Automate
Unanswered

Parsing text from email body

(1) ShareShare
ReportReport
Posted on by 12
I created a flow that parses the text from the body of an email message for quotes that are sent by a lead generating company. I have used copies of their messages and sent the same messages to the "lead" shared mailbox and the flows parse and work correctly. However when the messages arrive from the lead generating company the extract is in a completely different format and the flow fails.
 
When I compare the 2 run histories, it "breaks down" during the "HTML to Text" part of the flow, the only difference is where the email originates from.
 
Below is an excerpt from the extracted text when I send test messages from my Outlook account to the shared mailbox that was created for the lead generation messages.
 
 "APPLICANT",
    "",
    "Item",
    "",
    "Value",
    "",
    "Where do you host your clients?",
    "",
    "I work at another person's or business's location",
    "",
    "Do you have any employees (including a business partner) or independent",
    "contractors?",
    "",
    "No",
    "",
    "Applicant First Name",
    "",
    "Bob",
    "",
    "Applicant Last Name",
    "",
    "Smith",
ETC.
 
When the message arrives to the same shared mailbox from the lead generating company it extracts the text as shown below:
 
"ItemValueWhere do you host your clients? I work at another person's or",
    "business's location Do you have any employees (including a business partner) or",
    "independent contractors? No Applicant First Name Bob Applicant Last Name",
    "Smith........
 
I do not know why the text is being extracted differently not how to correct it.
 
I am just learning and if someone could point me in the right direction it would be appreciated.
 
Thank you.
 
Categories:
I have the same question (0)
  • developerAJ Profile Picture
    4,763 on at
    It would be easier to confirm with flow screenshots, but if the only difference is the address, that shouldn’t normally impact your flow. One thing to check is when you’re using HTML to Text—make sure you’re not passing the entire email object. Instead, only pass the Body of the email to avoid issues.
     

    If this solution helped you resolve your issue, kindly mark it as accepted — it makes it easier for others to find and also closes the discussion. If you found it useful, a Like ❤️ would be greatly appreciated!

    🤝 Let’s connect on LinkedIn || 📘 Explore more on my articles

  • VictorIvanidze Profile Picture
    13,081 on at
    Do not use  "HTML to Text" action. Retrieve the email plain text directly using the method described at https://ivasoft.com/parsemsinvoiceflow.shtml
  • LR-11071431-0 Profile Picture
    12 on at
    Thank you  , I appreciate the information. I am not able to install 3rd party software into our environment. My end goal to get certain information into an excel spreadsheet. This was the only was I could figure out how to do this. 
  • VictorIvanidze Profile Picture
    13,081 on at
     
    OK, as you like. I've lust tried to inform you that there is a better way to get the plain text email body.
  • developerAJ Profile Picture
    4,763 on at

    Are you still facing the issue? If so, could you please send a screenshot of the flow? This will make it easier to see your inputs for the action and identify exactly where the issue is occurring.

     

    As mentioned before, the ‘From’ address should not cause any issue, as long as it is in a valid email format

  • LR-11071431-0 Profile Picture
    12 on at
    @developerAJ, thank you, below are some screenshots. The flow breaks down at the SplitBodyText (
    Split(Body('Html_to_text'),outputs('EnterKey'), ','))
    , when I send it, works, when the 3rd party sends it, it parses differently. I appreciate your help.
    The flow is the same, and I agree that the sending mailbox should not have an affect but it does. I have a screenshot of the flow below for both Failed and Successful. The issue is the way it parses the text, in the failed, it does not separate the paragraph, in the successful it separates it to separate rows. The is why the flow fails as it is contingent on the values being in separate rows.
    If there is a better way to accomplish this, I will gladly try it. When I researched how to get this done, this was the method I found.
     
    Failed:
     
     
    Successful:

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard