12

I really need to setup filter in Gmail but it is not working. Where and how I have to enter the words which will be in the message I want to receive, and if the message do not contain those words to be deleted or archived. So far I was doing this:

Example:
In the field 'Doesn't have' I enter the words which should be in the message I want to receive like ( football -germany OR basketball -NBA OR handball -austria etc.). And for example if the message contain "football -spain"-(not mentioned in Doesn't have) should be archived in this case right?

I don't understand the rules I have to use, what do I have to enter in 'has the words' and 'doesn't have'? What I have now does not work.

2
  • 1
    Can you edit your question to describe one kind of message you're trying to filter on? Don't do it in terms of the filter; just describe it in normal terms. Like: "I'm trying to filter on messages that contain the word 'football' but do not contain the word 'germany'."
    – ale
    Mar 25, 2016 at 18:03
  • 1
    Note that Gmail filters work best with positive matches: "Do something if a message matches these things". It's harder to do negative matches: "Do something unless a message matches these things".
    – ale
    Mar 25, 2016 at 18:05

3 Answers 3

9

As said in the comments, Gmail filters work best when you tell it what to look for, not what not to look for. This being said, if you would like to filter out all mail besides mail containing "football" and "germany" or "basketball" and "NBA", you should enter (football germany) OR (basketball NBA) in the "Doesn't have" field. (See attached screenshot for example)

gmailFilterExample.jpg

Source: Gmail Help: Advanced Search

4
  • In the latest version, google move everything to "Has the words" section: So you have to put: from:([email protected]) -{(noin[email protected])} subject:(something) -{(avoid)} and so on
    – Tito Leiva
    Sep 21 at 14:09
  • @TitoLeiva I'm not sure what you mean by your comment "Google move everything to "Has the words". See this screenshot from Gmail taken a few moments ago
    – Blind Spots
    Sep 21 at 17:45
  • @BlindSpots I tried to use the "Doesn't have" but the only thing that it works was a complex query in the "Has the words" like this: from:([email protected]) -{(mentioned you)} subject:-{(Cristóbal Leiva)}
    – Tito Leiva
    Sep 25 at 20:34
  • 1
    @TitoLeiva If you want to open a question asking how to use the "Doesn't have" section instead of the "Has the words" section with your search I'd be happy to explain further.
    – Blind Spots
    Sep 25 at 21:05
2

Since Gmail works best when telling it what to look for you can try the following.

  1. create a a series of filters:

    • one finding German football and adding an appropriate label, and archiving it
    • one finding austrian handball and adding an appropriate label, and archiving it
    • one finding ome and adding an appropriate label, and archiving it

Note: more than one filter can add the same label; and more than one filter could apply.

  1. enable multiple inboxes via labs.

  2. set the configuration for multiple inboxes to put the "Extra panels positioning: above the inbox"

  3. for up to 5 extra inboxes you can define a rule for what will show in the inbox. It can be as simple as "label:x" or more complex such as "label:germanfootball or label:NBA"

Now all the conversations you care about will be in the extra inboxes at the top, and everything else will be in the normal inbox at the bottom.

note: using priority inbox can mess up this arrangement, so I just use the default inbox under settings/inbox.

Example: In the field 'Doesn't have' I enter the words which should be in the message I want to receive like ( football -germany OR basketball -NBA OR handball -austria etc.). And for example if the message contain "football -spain"-(not mentioned in Doesn't have) should be archived in this case right?

2

You need to specify where the 'doesn't have' is to look.

Instead of:
(football germany)
enter:
Subject: (football germany)
or
Body: (football germany)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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