web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Mail subject filter

(0) ShareShare
ReportReport
Posted on by 147

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

 

Categories:
I have the same question (0)
  • Verified answer
    v-yamao-msft Profile Picture
    on at

    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

     

  • Michal Z.  Profile Picture
    147 on at

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

     

  • Russbellon Profile Picture
    21 on at

    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 Profile Picture
    46 on at

    I have the same question. Any answers?

  • Gaolai Profile Picture
    46 on at

    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/

  • Community Power Platform Member Profile Picture
    on at

    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.

  • Community Power Platform Member Profile Picture
    on at

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

  • MAK22 Profile Picture
    3 on at

    Thanks, that works perfectly!

  • Peter1234 Profile Picture
    on at

    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...

  • JamesMartin001 Profile Picture
    17 on at

    I have the same problem, which I am struggling to solve.

     

    Our customers use a Reference number in this format:

     

    HR123456-10 (HR&6 digit number&-&2 digit number below 100)

    Some earlier customers have a 5 digit number. And most customers only have a version number after the dash that goes to under 10. Some customers go more than 10 versions but these are very few.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard