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 / Whys isnt split working ?
Power Automate
Unanswered

Whys isnt split working ?

(0) ShareShare
ReportReport
Posted on by 26

after html to text I get ...

 

Membership Number: 123456789

Application Reference: hshshshshshshshsh


EMPLOYER

Name: Fred Bloggs LIMITED


if I add a compose  with an expression split(body('Html_to_text'),'\n\n')

 

the output is the same ?

 

Raw input
"Membership Number: 123456789\n\nApplication Reference: hshshshshshshshsh\n\n\nEMPLOYER\n\nName: Fred Bloggs LIMITED\n\n"


Raw Ouput
"Membership Number: 123456789\n\nApplication Reference: hshshshshshshshsh\n\n\nEMPLOYER\n\nName: Fred Bloggs LIMITED\n\n"

 

What am I doing wrong ?

Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @smallzoo ,

     

    This is because '\n' isn't html in body('Html_to_text'), it has been converted to text.

    If you want to identify '\n' in body('Html_to_text'), please try this.

    vmengmlimsft_0-1710506692970.png

    Then modify your expression.

     

    split(body('Html_to_text'),outputs('Compose'))

     

     

     

     

    Best regards,

    Rimmon

  • smallzoo Profile Picture
    26 on at

    Thanks but I dont understand 

     

    this is the simple flow

    p1.png

    The RAW output of the HTM to Text is

     

        "body""Membership Number: 123456789\n\nApplication Reference: hshshshshshshshsh\n\n\nEMPLOYER\n\nName: Fred Bloggs LIMITED\n\n"
     
    The Compose expression is
     
    split(body('Html_to_text'),outputs('Compose'))
     
     
    The RAW outputs of the Compose is
     
    "Membership Number: 123456789\n\nApplication Reference: hshshshshshshshsh\n\n\nEMPLOYER\n\nName: Fred Bloggs LIMITED\n\n"

     

    I'm missing something !

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @smallzoo ,

     

    Thanks for your positive response.

    I retest your problem and here is a method may help solve your problem.

    vmengmlimsft_1-1711530315837.png

    replace(outputs('Html_to_text')?['body'],'\n',decodeUriComponent('%0A'))

    vmengmlimsft_0-1711530267614.png

     

     

    Best regards,

    Rimmon

     

  • Chriddle Profile Picture
    8,708 Super User 2026 Season 1 on at

    Your "Raw Ouput" is the Power Automate object converted to a JSON string.

    In a JSON you must not confuse /n with ordinary characters.
    In JSON, the backslash is a control character which in this case means that the following n is a newline character.
    If this JSON is turned into a Power Automate object, /n is just one character meaning "new line".

    Within a Power Automate expression you can write this new line character as decodeUriComponent('%0A')

     

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 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard