
112 GOOGLE APPS HACKS
To make all of this possible, you can use Gmail lters, which are based on Gmail’s search syntax. A
basic search in Gmail looks for exact matches in the whole of an email; its subject, its “from” eld,
“to” eld, message body, and more. The following search returns all mails containing the words
“invitation” and “inquiry”:
invitation inquiry
If you want to nd emails containing either of each word, use the OR operator. Make sure to write the
operator in all uppercase—although keywords used in searches are not case-sensitive, this operator is:
invitation OR inquiry
In the following search, the pipe character “|” is a synonym for OR, and parentheses group the
terms together (this means that the | applies only to those two grouped terms). To exclude certain
words, use the minus operator, as before “join”:
(invitation | inquiry) -join
Quotes ensure that only the entire phrase is found:
subject:”partnership offer”
A slight variation of the previous query, shown here, searches for both words in the subject line but
not necessarily as a full phrase. Note that there’s no space after the colon:
subject:(partnership offer)
Use the from: or to: operators followed by a colon to search only among sender or recipients:
from:arthur OR from:tricia.mcmillian@example.com
Similarly, you can use the operators subject: to only search in email subjects, ...