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 / Remove spaces from com...
Power Automate
Answered

Remove spaces from compose function (parse email)

(0) ShareShare
ReportReport
Posted on by 193

Hello,

 

Could anyone assist, I found this great article which had the following expression, to parse email text and its worked a treat on the majority of the email body. 

 

trim(Split(Split(body('Html_to_text'), 'ENGINEER SIGN OFF SHEET')[1], 'Has')[0])
 
Result it generates the following output 
 

LINE 1

space
LINE 2

space
LINE 3

space
LINE 4

 

How do I get it to remove the space from the output? 

 

Many thanks in advance 🙂

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @shelleyb 

     

    Are you expecting LINE 1LINE 2LINE 3LINE 4

     

    OR 

     

    LINE 1

    LINE 2

    LINE 3

    LINE 4

     

    Please confirm?

     

    Thanks

     

  • PrasadAthalye Profile Picture
    on at

    Declare variable called seperator and press enter 2 times in the value.

    PrasadAthalye_0-1632398809299.png

     

    Then use split function and split using this variable... Refer example below

     

    split(variables('test'), variables('seperator'))

     

  • shelleyb Profile Picture
    193 on at

    LINE 1LINE 2LINE 3LINE 4

     

    would be good 🙂

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @shelleyb 

     

    Thanks for your reply. Please see below.

     

    image.png

     

    Above expression is as follows:

     

    replace(outputs('Compose'),outputs('Compose_2'),'')

     

    My Test Result

     

    image.png

     

    Thanks

  • Verified answer
    shelleyb Profile Picture
    193 on at

    Perfect! Thank you 🙂 

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard