Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I create a filter in gmail like the following :

from:amy OR to:amy

Is it possible to create this kind of filter using the "Create new filter wizard" or do I have to manually edit the filters. If so, how?

So, far what I am able to do is create something like following, which is AND operation.

from:amy to:amy
share|improve this question
So your saying you want to know how to make the filter an OR condition rather then an and condition? – ComputerLocus Apr 29 '12 at 22:51
@fogest exactly. – iamcreasy Apr 29 '12 at 22:58
up vote 6 down vote accepted

To make an or condition just simply make two filters. It's possible to use the or condition in one of the lines for example:

From: a@a.com OR b@b.com

But you cannot have an OR statement for two different fields such as From and To.

I believe creating two filters though one, containing only the from and the other containing only the to. Yes it may require a few more seconds of work but that's the best your going to get for now.

OR try this:

  1. Create or modify a filter.
  2. In the Has the words field, enter your OR condition. For example: to:user@example.com OR From:user@example.com
share|improve this answer
To make an or condition just simply make two filters, yep so far this is what I've been doing, i don't like it at all. That' why posted this question here. I'll leave the question open for some time any other answers. – iamcreasy Apr 29 '12 at 23:07
@iamcreasy I found another question similar to your but less specific. Will edit my question in with a answer that may help you more. – ComputerLocus Apr 29 '12 at 23:16
Noup, doesn't work. I guess, Has the words field doesn't take query. – iamcreasy Apr 30 '12 at 0:17
@iamcreasy so you made sure that you did it just like the example? If that doesn't work then unfortunately you will need to just create two filters. – ComputerLocus Apr 30 '12 at 0:22
I noticed something strange, GMail add up two condition like they were on their respective field. – iamcreasy Apr 30 '12 at 0:30

You can filter on any search query string at all. Simply type the search query

from:amy OR to:amy

into the search box, then click the dropdown arrow to open the options, and click the link to "create filter with this search."

Alternatively, you can enter any query with search operators in the "has the words" field. Feel free to get complicated:

((from:amy -to:mom) OR (to:amy -from:me)) -subject:halloween
share|improve this answer
When I click "create filter with this search" with from:amy OR to:amy, the query gets messed up, and becomes something like this, from:amy to:amy OR. – iamcreasy May 7 '12 at 20:46
I agree with @Sarah. These steps work as described for me. The filter ends up in the "Has the words" box. If yours is changing for some reason in an odd way, try just typing "from:amy OR to:amy" into the "Has the words" box at that point in the Create Filter wizard. I think that may help. – Shannon Wagner May 8 '12 at 10:14

You don't need the OR at all: simply put the a@a.com into "Has the words" field and it returns them all, both to: and from:

share|improve this answer
Yes, that's another way. :) Thank you. – iamcreasy Jun 23 '13 at 3:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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