cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zcahwby
Level: Powered On

Help with body of email text filter in the condition

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 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Help with body of email text filter in the condition

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





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





View solution in original post

7 REPLIES 7
Dual Super User
Dual Super User

Re: Help with body of email text filter in the condition

@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

 





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





zcahwby
Level: Powered On

Re: Help with body of email text filter in the condition

@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?

Dual Super User
Dual Super User

Re: Help with body of email text filter in the condition

@zcahwby 

Can you share an screenshot of your email body?

BR





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





zcahwby
Level: Powered On

Re: Help with body of email text filter in the condition

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

 

Highlighted
Dual Super User
Dual Super User

Re: Help with body of email text filter in the condition

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





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





View solution in original post

zcahwby
Level: Powered On

Re: Help with body of email text filter in the condition

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 

Dual Super User
Dual Super User

Re: Help with body of email text filter in the condition

@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





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,356)