cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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 III
Dual Super User III

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



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

7 REPLIES 7
Highlighted
Dual Super User III
Dual Super User III

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

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Frequent Visitor

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?

Highlighted
Dual Super User III
Dual Super User III

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

@zcahwby 

Can you share an screenshot of your email body?

BR



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Frequent Visitor

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 III
Dual Super User III

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



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Highlighted
Frequent Visitor

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 

Highlighted
Dual Super User III
Dual Super User III

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



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,228)