50

I'm trying to filter our emails on Gmail that are:

from: specific sender

to: specific recipient

subject: contains specific words

I tried this filter:

has words>> from:xxx@example.com AND to: yyy@yyy.com --> this works by its own

has words>> subject:(test AND demo) --> this works by its own

problem is - when I use them together, it doesn't work:

has words>> from:xxx@example.com AND to: yyy@yyy.com AND subject:(test AND demo

OR

has words>> from:xxx@example.com AN subject:(test AND demo)

How can I achieve the filtering I need?

1
  • You are very close. In fact, back when you asked this question I don't think they worked this way, but now in September 2017 they do - except that you need parens around the from: choices. See the answer below:
    – SDsolar
    Sep 19, 2017 at 18:46

3 Answers 3

55

Google has a page which explains this:

Search operators you can use with Gmail

These same searches work in the Has Words section of filters.

The key is to capitalize OR and AND in between the choices.

If you want to specify multiple email addresses then use the same firld and this sort of syntax:

Has Words

from:(abc@def.com OR def@ghi.com)
2
  • Followed the link, and got my answers. Thanks
    – Deepak Rao
    Nov 21, 2020 at 3:36
  • @Rani if this answered your question, please mark it as 'solved' Mar 11, 2021 at 23:14
32

If you want to add multiple words, you need to use quotes, and OR to separate words like so "word1" OR "word2" OR "word3"

I found this especially useful when trying to get rid of all the privacy policy emails I've been getting slammed with lately. This short tutorial explains it. https://youtu.be/f9Ttwq-Pidw

1
  • 3
    this may be useful, but probably belongs as a comment as it does not fully answer the question
    – Claire
    May 15, 2018 at 2:50
1

I wanted to filter by the displayed name and apply them in a single filter. This worked (The Washington Reporter) OR (Hooterville Times) OR (The Daily Ragpicker). breaking that down it is (display name) OR (display name)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.