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 / how to remove blank sp...
Power Automate
Answered

how to remove blank spaces automatically when new email arrives

(1) ShareShare
ReportReport
Posted on by 2,249

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

 

 
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,958 Moderator on at

    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

  • Michael E. Gernaey Profile Picture
    53,958 Moderator on at

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

    Thanks!

  • Verified answer
    Veblitz Profile Picture
    2,249 on at

    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],': '))

     

     

  • Veblitz Profile Picture
    2,249 on at

    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

     

  • Veblitz Profile Picture
    2,249 on at

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

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 1,027

#2
Valantis Profile Picture

Valantis 809

#3
Haque Profile Picture

Haque 645

Last 30 days Overall leaderboard