Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

how to remove blank spaces automatically when new email arrives

(1) ShareShare
ReportReport
Posted on by 2,245

My below flow i have used below expressions based on the indexes for predefined email template especially body.

Issue is if there are any spaces unknowingly then im not sure the below formula is getting broken. Kindly help how to remove empty spaces for the below email formats when new email arrives as per below

 

 
  • Veblitz Profile Picture
    2,245 on at
    Re: how to remove blank spaces automatically when new email arrives

    I'm not able to remove invisible blank spaces and unnecessary characters using replace function.please advice

  • Veblitz Profile Picture
    2,245 on at
    Re: how to remove blank spaces automatically when new email arrives

    can you please clarify if we need to use below one in above expression

    Use replace('current string', 'text to replace', '') where '' has no spaces so it just removes it

     

  • Verified answer
    Veblitz Profile Picture
    2,245 on at
    Re: how to remove blank spaces automatically when new email arrives

    Thanks for the details.

    replace('current string', 'text to replace', '')

    how to use the below formula in this expression or do we need to modify etc

    variable 3 expression :last(split(outputs('Compose_2')[6],': '))
    variable 4 expression: last(split(outputs('Compose_2')[8],': '))
    variable 5 expression: last(split(outputs('Compose_2')[12],': '))

     

     

  • Michael E. Gernaey Profile Picture
    43,442 Super User 2025 Season 1 on at
    Re: how to remove blank spaces automatically when new email arrives

    @Veblitz  if this does solve your problem please mark it as such

    Thanks!

  • Verified answer
    Michael E. Gernaey Profile Picture
    43,442 Super User 2025 Season 1 on at
    Re: how to remove blank spaces automatically when new email arrives

    Hi @Veblitz 

     

    Use replace('current string', 'text to replace', '') where '' has no spaces so it just removes it


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492