Gmail is not a simple email client. The web application has dozens of functions that allow us to automate certain actions through key combinations or filter emails based on search commands. Thanks to these commands we can see at a glance all the emails of a certain contact or the emails sent during a period of time defined by ourselves. The possibilities in this regard are practically endless. And for this very reason we have compiled several of the most useful search commands for Gmail.
index of contents
- Search emails in Gmail by recipient
- Search emails by recipients included in the Cc or Bcc fields
- Find emails delivered to a specific email address
- Search emails in Gmail by category
- Filter emails in Gmail by sender
- Search emails by words in the subject
- Filter emails by labels in Gmail
- Search for emails with some kind of attachment
- Filter emails by type of attachments
- Filter emails by file format or names
- Find emails with YouTube videos attached
- Filter emails that come from a distribution list
- Search emails by words close to each other in the body
- Search emails in Gmail by exact words or phrases in the body
- Search emails by keyword
- Filter emails that do not include a keyword
- Find messages or emails marked as important in Gmail
- Search messages by color icon
- Filter emails saved in any folder (including Spam and Trash)
- Filter emails by date in Gmail
- Search emails in Gmail by size
- Filter postponed, unread, read, or starred emails in Gmail
- Filter Gmail chat messages
- Find emails that meet concatenated conditions
Search emails in Gmail by recipient
To filter emails by recipient we will have to apply the following command in the Gmail search box:
- from: email address
Thus, the resulting command would be similar to the following:
- from: [email protected]
Search emails by recipients included in the Cc or Bcc fields
The previous command will not help us to filter emails whose recipients have been included in the Cc or CCo fields. For this we will have to use a couple of different commands.
- cc: name or email address
- bcc: email addressname
For example:
- cc: maria
- bcc: [email protected]
Find emails delivered to a specific email address
If we want to search for an email sent to a specific email address outside of our usual contacts, we will have to use the following search command:
- deliveredto: email address
For example:
- deliveredto: [email protected]
Search emails in Gmail by category
Within Gmail we can create different categories to classify emails according to their nature or origin. To filter the results based on the category we can use the following command:
- category: categoryname
For example:
- category: updates
Filter emails in Gmail by sender
If we want to filter results by email addresses that send emails to our Gmail address, we will have to apply the following command:
- to: email address
The command would be as follows:
- from: [email protected]
Search emails by words in the subject
To filter emails based on the title indicated in the subject of the email (for example "Ana's birthday present"), we will have to execute the following command:
- subject: keyword
For example:
- subject: birthday
To nest search terms, we can use the following formula:
- subject: (keyword1 keyword2)
For example:
- subject: (Maria account)
Filter emails by labels in Gmail
If we use labels in our emails we can run a command to find results that match the entered label.
- label: keyword
Therefore, the result would be similar to the following:
- label: birthday
Search for emails with some kind of attachment
To find emails with some type of attachment in the body we can use a simple Gmail search command.
- has: attachment
Filter emails by type of attachments
Did you know that you can filter emails based on the type of item that has been added as an attachment? Unfortunately, this command is limited to files from Google Drive, Google Docs, Google Sheets, and Slides.
- Google Drive : has: drive
- Google documents : has: document
- Google Sheets : has: spreadsheet
- Google Presentations : has: presentation
Filter emails by file format or names
If we want to filter emails by file type (PDF, Word, MP3, WAV ...) we will have to use a different command. This command also allows us to filter by file names.
- f ilename: fileextension
- filename: filename
The commands would be as follows:
- ilename: mp3
- filename: safaera.mp3
Find emails with YouTube videos attached
Using the same type of commands used to filter files, we can filter emails with YouTube videos attached.
- has: youtube
Filter emails that come from a distribution list
Tired of receiving commercial emails from different distribution lists? You can find them all in one sitting through a simple command.
- list: [email protected]
For example:
- list: [email protected]
Search emails by words close to each other in the body
If we do not know the content of an email but we are sure that it includes at least two words in its body, we can use a very useful command that filters results based on the number of words between two search terms.
- "Keyword1 AROUND numberofwordbetween the two terms keyword2"
For example, between the terms “birthday” and “Maria” there must be a maximum of 25 characters. The formula to be entered is as follows:
- "AROUND 25th birthday Maria"
Search emails in Gmail by exact words or phrases in the body
Another way to filter emails is based on looking for a word or phrase that we have mentioned in the body of the email in question. It also serves to filter subjects.
- "Wordphrase search"
In this case, the search would be as follows:
- “Leaf Juan, how are you? I wonderfully. "
Search emails by keyword
The above command can be very useful to search for text strings, phrases or random words. However, if we want to filter results by a single keyword, we will have to enter a different command:
- + keyword
For example:
- + scam
Filter emails that do not include a keyword
The command to search for emails and messages that do not include a certain keyword is very similar to the previous one, except that this time we will have to use the “-” sign without the quotation marks.
- -keyword
For example:
- -fraud
Find messages or emails marked as important in Gmail
If we have saved an email in the Gmail Important folder we can use the following command to filter the messages within this folder:
- is: important
- label: important
Search messages by color icon
The latest updates to Gmail have included a new function that allows us to classify emails by colored icons. Yellow is intended for featured emails, while blue is for informational emails. If we want to filter the results based on the chosen color icon, we can use one of the following commands:
- Featured (yellow star) : has: yellow-star
- Informative (blue information icon) : has: blue-info
Filter emails saved in any folder (including Spam and Trash)
Within Gmail we can create different folders beyond the Sent, Received, Important, Trash and Spam folders. The problem is that Gmail does not index the emails present in the Spam and Trash folders. To filter the results by folders we can use the following command:
- in: anywhere keyword
The command would be as follows:
- in: anywhere scam
Filter emails by date in Gmail
Searching for emails within a specified period of time is possible thanks to a series of search commands.
- After : after: date in year / month / day format
- Before : before: date in month / day / year format
- Before : older: date in year / month / day format
- After : newer: date in month / day / year format
- Before : older_than: days (d), months (m) or years (y)
- After : newer_than: days (d), months (m) or years (y)
Substituting the commands for dates, the search would be as follows:
- After : after: 2005/07/19
- Before : before: 09/07/2020
- Before : older: 2005/07/19
- After : newer: 09/07/2020
- Before : older_than: 5d
- After : newer_than: 4y
Search emails in Gmail by size
If we want to clean the inbox of our email we can filter results by size. For example, that exceed a certain number of bytes, or that are larger than 1 GB, or smaller than 3 GB.
- Larger than : larger: sizeinbytes
- Smaller than : smaller: sizeinbytes
- Equal to or greater than : size: sizeinbytes
If we replace the text strings with real searches, the commands would be as follows:
- Larger than : larger: 10M
- Smaller than : smaller: 25M
- Equal to or greater than : size: 100,000M
Filter postponed, unread, read, or starred emails in Gmail
To be more accurate in our searches we can filter emails within the Postponed, Unread, Read and Featured folders within the web application through custom commands.
- Featured : is: starred
- Postponed : is: snoozed
- Unread : is: unread
- Read : is: read
Filter Gmail chat messages
Gmail chat also supports search for messages by command. To search for a specific word or phrase we can use the following command:
- is: chat wordphrase search
For example:
- is: chat hello Juan how are you
Find emails that meet concatenated conditions
And we come to the last Gmail search command. This command is especially useful if we are going to make use of one type of command and we want to concatenate different conditions. The way in which we will have to concatenate conditions is as follows:
- command1 OR command2
- {command1 command2}
For example, to indicate that we want to filter emails that come from María and Juan we will have to enter the following command:
- from: maria OR from: juan
- {from: maria from: juan}
This formula is valid for all other commands. For example, if we want to filter postponed and starred emails.
- is: starred OR is: snoozed