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

I've a list of email addresses (let's give it a name Cool Email Addresses for understanding purpose)

Email A
Email B
Email C

The emails I've sent and received should be given a label Label XYZ if the email sent or received contains one or more than one email addresses from the list Cool Email Addresses.

How can I create a filter like this?

share|improve this question
Closely related: How to add filter and label to group in gmail contacts? – Al E. Oct 24 '13 at 12:30
up vote 3 down vote accepted

You can create a new filter in Gmail and put this query in the "Has the words" field:

(to:(emailA@example.com OR emailB@example.com OR emailC@example.com)) 
OR (from:(emailA@example.com OR emailB@example.com OR emailC@example.com))
share|improve this answer

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.