Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

HTML to Text Line Breaks

(0) ShareShare
ReportReport
Posted on by 13

I am trying to parse out readings from automated emails from customers, 
However, when I am trying to use HTML to text, it is removing the proper line breaks, making it hard to get the numbers I am trying to isolate to an excel sheet:

Screenshot 2022-02-20 093122.png

I am trying to use a filter array and splits to get the number value out. 

 

Is this the correct approach to getting data out of the emails? 

  • Verified answer
    abm abm Profile Picture
    32,492 Most Valuable Professional on at
    Re: HTML to Text Line Breaks

    Hi @Wzaorski 

     

    Based on the first message here is the flow I built.

     

    image.png

    image.png

     

    Above expressions are as follows:

     

    split(outputs('Compose'),outputs('Compose_2'))
     
    last(split(outputs('Compose_3')[4],':'))
     
    image.png
    last(split(outputs('Compose_3')[5],':'))
     
    My test result:
     
     
  • Wzaorski Profile Picture
    13 on at
    Re: HTML to Text Line Breaks

    Thanks @abm

    The emails are always constant and automated, each customer varies a little on format,

    here is one (raw input):

    <p>

    CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

    Current tag data:
    Carbon Actual Weight = 125498
    Sent at: 02-18-22 07:00:00 PM
    This email and its attachments, if any, are intended for the personal use of the named recipient(s) and may contain confidential, privileged, or proprietary information. If you are not a named recipient, or an agent responsible for delivering it to a named recipient, you have received this email in error. In that event, please (a) immediately notify me by reply email, (b) do not review, copy, save, forward, or print this email or any of its attachments, and (c) immediately delete and/or destroy this email and its attachments and all electronic and physical copies thereof. Thank you.
    </p>

    The another is in the screenshot.

     

    I need to pull out the EMCI and the Moca on the screenshot, and the single Lbs number on the example above. 

     

     

     

  • abm abm Profile Picture
    32,492 Most Valuable Professional on at
    Re: HTML to Text Line Breaks

    Hi @Wzaorski 

     

    Is your email format is always consistent.  What numbers you after here? Could you please explain?

     

    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1