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

Mail subject filter

Hi,

I am using the When a new email arrives in a shared mailbox action and want to filter out emails with the specific keyword in the subject. 

Instead of using the condition I tried Subject filter field but whatever I put there the action will work for any email subject. 

If you found it working for you, please share how to use it.

If you found it not working - question to the MS Flow team - please remove it or make it work and document it with an example so we know how it works. 

 

/Mike

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Mail subject filter

Hi Michal,

 

We can use Subject Filter to search for the presence of specific words in the subject of an email. Your flow then runs actions based on the results of your search.


In the Subject Filter box, enter the text that your flow uses to filter incoming emails.


This documentation about Trigger a flow based on email properties could be a reference for you, please check it at here:
https://flow.microsoft.com/en-us/documentation/email-triggers/

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Community Support Team
Community Support Team

Re: Mail subject filter

Hi Michal,

 

We can use Subject Filter to search for the presence of specific words in the subject of an email. Your flow then runs actions based on the results of your search.


In the Subject Filter box, enter the text that your flow uses to filter incoming emails.


This documentation about Trigger a flow based on email properties could be a reference for you, please check it at here:
https://flow.microsoft.com/en-us/documentation/email-triggers/

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Michal
Level: Powered On

Re: Mail subject filter

Thank you. It works now. I don't know why it was not working before. 

 

Russbellon
Level: Powered On

Re: Mail subject filter

How do you specify multiple values? Like if i want to run the next step if the subject contains value1 OR Value2 OR Value 3, but NOT value 4.

Gaolai
Level: Powered On

Re: Mail subject filter

I have the same question. Any answers?

Gaolai
Level: Powered On

Re: Mail subject filter

You can use condition, for example, add a condition like

@or(contains(triggerBody()?['Subject'], 'A'),contains(triggerBody()?['Subject'], 'B'),contains(triggerBody()?['Subject'], 'C'))

 

Please refer to this link, it answers your question, mine too

https://marckean.com/2017/03/07/microsoft-flow-logic-app-conditions/

Anonymous
Not applicable

Re: Mail subject filter

Subject filter is not acception whitespace. Eg- "Re: This is a new message." . I want to add this whole string in Subject Filter. But it is not working.

schrodingerskat
Level: Powered On

Re: Mail subject filter

Hey daska - try using the string() expression, e.g. string('Re: This is a new message.')

MAK22
Level: Power Up

Re: Mail subject filter

Thanks, that works perfectly!

Highlighted
Peter1234
Level: Powered On

Re: Mail subject filter

Is it possible to put a regular expression in the mail filter?

If it's not, this is really an oversight... for example I want to get only those emails that contain an ID Code in a specific format. How would I go about that?

Say i would want to find all mails with  following 999-XXX-999... (examples 123-ABC-789, 546-DEF-547) as far as i know I have two options now:

* using javascript (requiring an integration account)

* creating a azure function

 

Seems to me this is a waste of time and making logic apps more complex then they need to be.

Really hoping someone tells me i can just enter a regular expression in the filter...

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Kudoed Authors
Users online (5,094)