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 / Why this condition is ...
Power Automate
Suggested Answer

Why this condition is not working for text in email?

(0) ShareShare
ReportReport
Posted on by 1,089
Hello,
 
I have create a flow that mus see the text in the body from a email but it doesn't.
What is going wrong?
 
 
This is the result
 
Categories:
I have the same question (0)
  • CU30121719-0 Profile Picture
    on at
    Could you please show the output of the Compose action?
  • frixel Profile Picture
    1,089 on at
    This is the output from the Compose

  • Suggested answer
    Srini007 Profile Picture
    3,483 Super User 2026 Season 1 on at
    Hi @frixel,
     
    Are you sure that subject does not contains "RE: or FW:" you can verify by placing a compose and also you can try with equals instead of contains and try
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini
  • frixel Profile Picture
    1,089 on at
    No the subject contains not RE: or FW:
     
    See compose 2 is the subject
     
     
    So weird why this is not working.
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    Sometimes I find that if you use an expression on the left side of the condition to evaluate if it returns true or false, it works better. So, on the left, try using a contains() expression with the output, and on the right side insert true from the expression maker (don't manually type true).
     
    And while I don't spot any difference between the text in the output and the text in the expression, double check that the text in both matches exactly. Even though you are using contains, the phrase it is looking for needs to be an exact match. Even an extra space between a word would cause it to not consider it containing the phrase. Therefore, you may even want to use an expression such as contains(trim(outputs... instead.
  • CU30121719-0 Profile Picture
    on at
    I almost sure the first (the topmost) condition returns false. Could you check if the output of the first Compose does not contain CR or LF?
     
  • Tomac Profile Picture
    4,153 Moderator on at
    I agree with @David_MA, using Contains in a Condition wants to evaluate to True or False on the right side, it doesn't work the same as the contains() function in a Compose for some reason.
     
    So the left side would be your Contains() expression, the middle would be Is Equal To, and the right side would be an expression of True (not the word "True" as plain text, it needs to be put in with the expression editor)
  • CU30121719-0 Profile Picture
    on at
    Also instead of "HTML to Text" action try to use this approach:  ParseMSInvoice flow parses the real Microsoft email invoice
  • frixel Profile Picture
    1,089 on at
    @tomac & David MA,
     
    I don't understand what you mean by on the left and on the right.
     
    The text in the email is exactly the same as in the condition. I pasted and cut it
     
    by the way what does the expression split doing in the compose? (i am a noob with this and find this example on google)
  • frixel Profile Picture
    1,089 on at
    I think you mean something like this?
     
    But the expression True will not automaticly fill in and what is te expression from the contains()? 

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 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard