web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / when new email arrives...
Power Apps
Unanswered

when new email arrives to remove invisible spaces,unnecessary characters

(1) ShareShare
ReportReport
Posted on by 2,249

I have below predefined email format but issue im going through is if there any invisible spaces and unnecessary characters in the incoming email then below flow is not working,please revert incase of any details.

 

Email template which arrives with below format //Incoming email format

 

When we recieve incoming Email with below predefined email format then in my flow i have put indexes as per  it works ,please see my flow  but i need some help to remove unnecessary blank spaces from email . im not sure how to remove blank spaces in the new email .

 

Indexes fixed: //so its working but at the same time if its blank spaces exceeds below indexes values its failed

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_0-1720756404952.png

 

 

 

 

Input data structure

 

Contract_List:

Veblitz_1-1720756405332.png

 

 

 

Customer-single line of text

Location- single line off text

Typeofcontract-Single line of text

From-single line of text

To-single line of contract

 

document library

Veblitz_2-1720756404923.png

 

 

 

 

 

 

 

Complete Flow details:

Veblitz_3-1720756405150.png

 

 

 

 

 

Detailed flow steps:

 

Veblitz_4-1720756405164.png

 

 

 

 

Veblitz_5-1720756405144.png

 

 

 

compose 2 expression-

split(outputs('Html_to_text')?['body'],outputs('Compose'))
Veblitz_6-1720756405140.png

 

 

 

 

Veblitz_7-1720756405132.png

 

 

 

Detailed step by step condition flow steps

Yes branch flow steps

Veblitz_8-1720756405107.png

 

 

 

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_9-1720756404974.png

 

 

 

 

Veblitz_10-1720756405335.png

 

 

 

create new folder2 expression : concat(variables('Location'),'/',variables('Customer'))
 
Veblitz_11-1720756405167.png

 

 

 

 

create new folder 3 expression:

concat(variables('Location'),'/',variables('Customer'),'/',formatDateTime(utcNow(),'yyyy'))
create new folder 4 expression:
concat(variables('Location'),'/',variables('Customer'),'/',formatDateTime(utcNow(),'yyyy'),'/',formatDateTime(utcNow(),'MMMM'))
 
Veblitz_12-1720756405147.png

 

 

 

set variable 2 expression:

concat(variables('Location'),'/',variables('Customer'),'/',formatDateTime(utcNow(),'yyyy'),'/',formatDateTime(utcNow(),'MMMM'))
 
Veblitz_13-1720756405000.png

 

 

 

create new folder 5 expression:

concat(variables('VarPath'),'/',variables('VarType'))
 
Veblitz_14-1720756404938.png

 

 

 

 
No branch:
 
Veblitz_15-1720756405136.png

 

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    52,985 Super User 2025 Season 2 on at

    Hi @Veblitz 

     

    Why did replacing the spaces not work with what I shared with you before? Can you be more clear with an example of a space you don't want in your variables?

     

  • Veblitz Profile Picture
    2,249 on at

    Apologies, I am not aware how to modify my flow with your inputs which you have shared.

    Please consider the below example incoming email which has incoming email format, i need to remove blank spaces inside the body email, i have created spaces here and there and if there are any white spaces and blank spaces.

     

    Additionally, i do not where to add the replace function inside my above flow 

     

    Correct Format incoming email

     

    Hi,

       We are happy to inform that contract is Renewed:

       Please find the below contract details:

    Country: Kenya

    Customer: Kengsk

    Contract Number: 43291

    Type: Renewed

    Region: Washington

    Department: Sharepoint

    Note: This email is auto generated. Do not reply to this message

     

    Thanks,

    Support Team 

     

    Incorrect Format incoming email:

    Hi,

       We are happy to inform that contract is Renewed:

     

       Please find the below contract details:

    Country: Kenya

    Customer: Kengsk

     

    Contract Number: 43291

    Type: Renewed

    Region: Washington

    Department: Sharepoint

    Note: This email is auto generated. Do not reply to this message

     

    Thanks,

    Support Team 

     

     

     

  • Veblitz Profile Picture
    2,249 on at

    please help me how to put replace function in my above flow.Thanks a lot in advance.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard