Gmail – Setup a Gmail filter to be applied to messages that do not contain a given text

gmailgmail-filters

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.

Best Answer

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