Table of contents:
- Codes to search for documents or files in Gmail
- Code to search emails with an attachment in Gmail
- Code to search YouTube videos in Gmail
- Code to search emails from broadcast lists in Gmail
- Codes to filter emails by dates in Gmail
- Codes to filter emails by size in Gmail
- Codes to search for emails with attached email addresses
- Codes to filter emails by labels, categories or color
- Codes to search emails by subject in Gmail
- Codes to filter emails by words or phrases in Gmail
Did you know that the Gmail application has dozens of hidden codes to narrow down searches? These codes, also known as search commands, are present in both the web application and the mobile version of Gmail. Its main function is to filter emails, messages and files through the integrated search engine.
The possibilities they offer us are practically endless, from filtering emails by size to finding documents in PDF format or songs in MP3 format. For this reason we have made a compilation of all the Gmail search codes for mobile. To make use of these codes we will have to paste the command in question in the Gmail search box as if it were a general search.
Codes to search for documents or files in Gmail
If we want to filter emails by type of attachment, we can use different search commands depending on whether they are simple documents or files with a different format.
To search for documents within the application we can use the following codes:
- Google Drive: has: drive
- Google Presentations: has: presentation
- Google documents : has: document
- Google Sheets: has: spreadsheet
If what we want is to filter results based on the type of file, we can use the following command:
- f ilename: file_extension
- f ilename: filename
For example:
- f ilename: mp4
- f ilename: foreveryoung.mp4
Code to search emails with an attachment in Gmail
If we simply want to filter all emails with some type of attachment in the body, we can use the command has: attachment . The application will show us a list with all the emails that have attachments.
Code to search YouTube videos in Gmail
Looking for a private YouTube video and can't remember the link? With the command has: youtube Gmail will show us all emails that contain a YouTube link in the body or header.
Code to search emails from broadcast lists in Gmail
The mailing lists are generally used by websites or companies to distribute information about products, offers or services. To find emails that come from a broadcast list we can use the following command:
- list:
- list: email_address
The first will show us all the emails regardless of the sender. The second is limited to the email address that we have indicated.
Codes to filter emails by dates in Gmail
Unlike Outlook, Gmail does not have options to filter emails by dates. For this we will have to make use of a series of codes depending on the search criteria. Before, after, after…
- Emails before: before: date in month / day / year format
- Emails before: older: date in year / month / day format
- Emails after: after: date in year / month / day format
- Emails after: newer: date in month / day / year format
- Emails before: older_than: days (d), months (m) or years (y)
- Emails after: newer_than: days (d), months (m) or years (y)
In this way, the commands would resemble the following format:
- Before: before: 05/11/2020
- Before: older: 2006/09/18
- After: after: 2012/06/20
- After: newer: 04/04/2019
- Before: older_than: 6d
- After: newer_than: 2y
Codes to filter emails by size in Gmail
We can also search for emails based on the size they occupy in our inbox. For example, to clean all the heavy emails or simply to search for large files.
- Smaller than: smaller: size_in_number_of_bytes
- Larger than: larger: size_in_number_of_bytes
- Equal to or greater than: size: size_in_number_of_bytes
The format would be similar to the following examples:
- Smaller than: smaller: 32M
- Larger than: larger: 14M
- Equal to or greater than: size: 100M
Codes to search for emails with attached email addresses
When an email is sent to two or more people, Gmail usually includes them in the Bcc: or Cc fields.
If we want to filter the emails based on an attached email address, we can use the following commands:
- cc: name_of: contact_or_ email_address
- bcc: name_of: contact_or_ email_address
Codes to filter emails by labels, categories or color
Since Google implemented labels and categories in Gmail to segment messages and email addresses, we can have a much more organized inbox. What you probably didn't know is that you can filter emails based on tags and categories.
For the categories we can use the following search command:
- category: category_name
If we want to search for emails by labels we will have to use this other command:
- label: label_name
We can also filter emails based on the color icon for emails marked as Featured (in yellow) or Informational (in blue). The commands that help us to filter results in this case are the following:
- Emails marked as Informative with a blue information icon: has: blue-info
- Emails marked as Featured with a yellow star: has: yellow-star
Codes to search emails by subject in Gmail
To search for emails based on the words that have been included in the subject, we can use the following search command:
- subject: word_in_the_subject
This command allows us to nest different search keywords:
- subject: (word1 word2)
Codes to filter emails by words or phrases in Gmail
The Gmail mobile application allows us to play with the search commands to filter results by words, phrases or approximations of phrases that have been included in the body of the emails. To filter by keyword we can write the word preceded by the '+' sign. For example:
- + word
If, on the contrary, we want to search for emails that do not include a certain word, we can use the same command preceded by the '-' sign. For example:
- -word
To search for phrases included in the body of the email we will have to surround the text with double quotes (“). For example:
- "Hello Maria, how are you?"
If we want to carry out an approximate search, for example, for an email that includes the words “scam” and “Wallapop”, we can use the following command:
- "AROUND 25 Wallapop scam"
The code AROUND 25 indicates the approximate number of characters that separate each word. We can include any number, regardless of the words used.