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 / Help with body of emai...
Power Automate
Answered

Help with body of email text filter in the condition

(0) ShareShare
ReportReport
Posted on by 12

Hi 

 

I am building a straightforward flow that uses the trigger "when an email is received in a shared mailbox" to get those emails which are received where the body of the email contains a certain string of text and I'm having trouble getting this to work. When I put the condition that the email body contains "Client Name: Client"  and run a test it returns that the expression is false and I'm not sure why. I have used condition statements for seemingly more complex things in the past, and have a fairly good grasp of the basics of microsoft flow but can't seem to get this to work. I have flows that filter the subject of an email by a string of text (also from shared mailbox trigger) and these seem to be working fine so can't understand what is going wrong. I have shared a screenshot of my flow below, any help or guidance would be much appreciated. 

1.PNG

 

2.PNG

 

I have added the "Get Email" step after first trying without this step, I'm not sure if this is even necessary or not. Either way, my flow recognises the expression as false. 

 

Thanks in Advance 

Categories:
  • efialttes Profile Picture
    14,756 on at

    @zcahwby 

    Did you try to remove the double quotes on the Condition action block and reexecute the Flow?

    "Get email" action block is not needed, since the body of the message is one the trigger's outputs

    Hope this helps

     

  • zcahwby Profile Picture
    12 on at

    @efialttes, thank you for your response, much appreciated. 

     

    Unfortunately, I've tried both of those suggestions already with no such luck. Is there anything that you can see that indicates my flow is not configured properly?

  • efialttes Profile Picture
    14,756 on at

    @zcahwby 

    Can you share an screenshot of your email body?

    BR

  • zcahwby Profile Picture
    12 on at

    The general format of the email is below. I wonder if it could be to do with the special character ':' in the string I'm trying to filter? I made a test flow that seemed to work but this didn't contain a special character (see below screenshot for flow configuration and results).test flow config.PNGtest flow result.PNG
    body.png

     

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi again!

    So, there are several clients, i.e. Bill Gates, Nadya Satella, etc., right? If so, the text to find is not Client Name: Client !!!

    I would suggest you to modify your Condition, and verify two rules instead of one:

    first rule: does body contain Client Name:   ?

    AND

    second rule: does body contain Instruction Deadline:  ?

     

    If true, then you need to use an expression to extract text between Client Name: and Instruction Deadline:

     

    Please also note the email body is HTML based, so probably need to remove HTML tags just in case.

    It is better explained in this thread

    Hope this helps

  • zcahwby Profile Picture
    12 on at

    Thanks for the response, there are a few nuances with this approach for my specific case e.g. sometimes the client name can be captured in the fund name but as far as the approach of looking for two or more criteria to check against I think this could work, I will just need to go away and flesh out the requirements. Thanks a bunch for the suggestion 🙂 

     

    I'll mark this thread as solved and come back to it if I have any more issues 

  • efialttes Profile Picture
    14,756 on at

    @zcahwby 

    If you find additional issues with the flow you are building, I would recommend to open a new thread and include a link to this thread, since Microsoft Support Team focus its efforts on threads that are still not solved.

    BR

  • joehague Profile Picture
    2 on at

    I have had exactly this issue and it ended up being that in my condition field the string had a space at the end. Once I noticed and removed the space it worked just fine

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard