Gmail: The ultimate guide for advanced search filters - 11 minutes read
Once you start signing up for apps and web services using your Gmail email address, you will soon end up with a crowded email inbox to manage. Even with Gmail's default inbox categorization and search bar, finding that exact email you are looking for can get difficult. Here's where Gmail's advanced search filters come to the rescue and let you sort thousands of messages exactly how you want, potentially saving you many hours of micro-managing your inbox.
In this guide, we'll go over the basics of Gmail search, then cover the more advanced filters. Whether you just want to find specific messages or set up long-term filters to help with overflowing inboxes, you've come to the right place.
Use the default Gmail search bar
Gmail has a large search bar at the top of the screen, typically used for searching by names or simple phrases. When you start typing something, the first few results appear below the bar, or you can press Enter (or click the search button) to see all available results. Pretty simple.
Gmail's regular text search includes results from an email's subject field, senders, and message contents. That means searching for common words and phrases can sometimes give you too many messages to look through. Going through dozens of search results isn't productive and can be time-consuming at times. That's where filters come in — they can trim the results down to more manageable sizes.
Once you click on the search bar at the top, you will notice the small buttons on search pages. These are called 'chips,' and they can help you filter results without opening the Advanced Search panel or typing your own filters. For example, clicking the 'Has attachment' chip will hide all messages that don't have an attached file. Similarly, you can select 'Last 7 days' and only glance over last week's emails.
Gmail chips aren't limited to the web version only. Google has made it available for mobile apps as well. Once you try to search for an email, chips will start showing up to narrow down search results on a small screen.
Google is cramming Chat and Spaces into the Gmail web to make it the one-stop productivity solution. You can use chips and search for messages in your Google Chat and Spaces conversations as well. From search results, simply select Chat spaces tab, and Gmail will find the same keywords in your messages.
You don't need to click on the search bar every time; you can use the '/' key and start searching for keywords. Read our dedicated post to level up your Gmail experience with keyboard shortcuts.
Simple words and phrases combined with Gmail's chips will usually help you find the exact messages you're looking for. But what if you want to set up permanent filters for a specific search? Gmail's advanced search functionality comes into play here.
Advanced search filters in Gmail
You might have noticed the 'Advanced search' link that appears below the search bar after you search for something — it's also accessible by clicking the 'Show search options' icon in the search bar. The advanced search is a popup with various fields to help you narrow down results. You can filter messages by the sent date, message size, sender name, subject phrase, and more.
The advanced search popup has two buttons at the bottom. The 'Search' button shows you the results for whatever you type in, but the 'Create filter' button will create a message filter with the options you've entered. Clicking the latter option will take you to a second screen, where you can define exactly what happens to messages that the filter catches.
Once you have everything set to how you want, you can click the 'Create filter' button to activate the filter. By default, filters don't do anything to existing messages, but you can change this by clicking the checkbox for 'Also apply filter to matching conversations.'
You can create as many filters as you prefer and manage them from Gmail settings.
From Gmail home, click on the settings in the top right corner (represented by a gear icon).
Select See all settings.
Move to Filters and Blocked Addresses tab.
Check all the created filters in action.
Click on the edit button to make changes or select delete to remove the filter.
If you wish to use the same filers in another Gmail account, enable the checkbox beside filers that you want to export and click on Export at the bottom.
Gmail will create an XML file which you can import into another Gmail account later (you can import filters from the same menu in another Gmail account).
Unlike chips, Gmail's advanced search filers aren't available on mobile apps. It's the only major omission from the rather feature-packed Gmail iOS and Android apps.
Let's go over a few practical examples of Gmail filters. Maybe you're subscribed to a few newsletters, but you don't want them mixed in with regular messages in your inbox. A simple way to do this is to create a filter with "Unsubscribe" in the "Has the words" field, then set it to skip the inbox and apply a label (e.g. make a new one called 'Newsletters'). Then you could check your newsletters at any time by clicking the proper label in the Gmail sidebar, instead of seeing them pile up in your inbox.
Sample Gmail filter for organizing newsletters
Alternatively, let's say a certain company keeps emailing you with spam, even though you've tried unsubscribing. Gmail allows you to block addresses, but automated messages sometimes use multiple addresses. You can create a filter with an asterisk (*) in parts of the field, which functions as a wildcard. For example, typing "*.com" in the From field would match all emails with the domain newegg.com. After you have a search set up, you can set the filter to delete all matching emails automatically.
Sample Gmail filter for deleting all emails coming from Newegg.com
Gmail's default search fields, combined with the filter options on the second screen, should be enough for most use cases. However, if you need layered searches (e.g. do this OR that if X is true) or a filter option that Gmail doesn't show in the popup, read on.
Multi-step filters and basic operators in Gmail
You might have noticed that Gmail's search/filter interface adds terms like "from:" or "to:" or "subject:" to the search field. These are called search operators, and they can be combined to trim down your results. Gmail types these for you when you use the search interface, but once you grasp how they work, you can make your own complex searches and filters by typing directly in the search bar.
Let's say you wanted to search for all your delivery emails from Amazon. You could type something like this in the search bar, which would show messages sent from any Amazon address with the word "delivery" in the email somewhere:
from:*.com "delivery" However, this might not catch all delivery emails. If your package wasn't delivered, the email might not say "delivery" exactly. Adding additional terms like "package" or "order" could give you better results. This is where Gmail's "OR" operator comes in. Here's an updated example:
from:*.com ("delivery" OR "package" OR "order") Now we're using parentheses to add nested logic to the filter. In the above example, two factors have to be true: the email has to be from Amazon, and it must contain either "delivery," "package," or "order." If you wanted to keep going and add more retail stores, you could do something like this:
from:(*.com OR *.com OR *.com) ("delivery" OR "package" OR "order") Now we have a search that looks for emails from Amazon, Target, and Walmart with the phrases specified in the second half. If it helps readability, you can also add "AND" to the middle (between the two sets of parentheses), and Gmail will still understand it.
Hidden operators and filters in Gmail
Gmail has many more operators and filter options than the advanced search popup shows. You can sort by attachments (even by file type), links to Google Drive files or YouTube videos, dates, messages from Google Chat, message size, and much more. Below is the full list of filters from the Gmail support website, as of May 2022.
What you can search by Search operator example
Specify the sender from: Example: from:amy
Specify a recipient to: Example: to:david
Specify a recipient who received a copy cc: bcc: Example: cc:david
Words in the subject line subject: Example: subject:dinner
Messages that match multiple terms OR or { } Example: from:amy OR from:david Example: {from:amy from:david}
Remove messages from your results - Example: dinner -movie
Find messages with words near each other. Use the number to say how many words apart the words can be Add quotes to find messages in which the word you put first stays first. AROUND Example: holiday AROUND 10 vacation Example: "secret AROUND 25 birthday"
Messages that have a certain label label: Example: label:friends
Messages that have an attachment has:attachment Example: has:attachment
Messages that have a Google Drive, Docs, Sheets, or Slides attachment or link has:drive has:document has:spreadsheet has:presentation
Messages that have a YouTube video has:youtube
Messages from a mailing list list: Example: list:info.com
Attachments with a certain name or file type filename: Example: filename:pdf Example: filename:homework.txt
Search for an exact word or phrase " " Example: "dinner and movie tonight"
Group multiple search terms together ( ) Example: subject:(dinner movie)
Messages in any folder, including Spam and Trash in:anywhere Example: in:anywhere movie
Search for messages that are marked as important is:important label:important
Starred, snoozed, unread, or read messages is:starred is:snoozed is:unread is:read
Messages that include an icon of a certain color has:yellow-star has:blue-info has:purple-star
Recipients in the cc or bcc field cc: bcc: Example: cc:david Note: You can't find messages that you received on bcc.
Search for messages sent during a certain time period after: before: older: newer: Example: after:2004/04/16 Example: after:04/16/2004
Search for messages older or newer than a time period using d (day), m (month), and y (year) older_than: newer_than: Example: newer_than:2d
Chat messages is:chat Example: is:chat movie
Search by email for delivered messages deliveredto: Example: deliveredto:username.com
Messages in a certain category category:primary category:social category:promotions category:updates category:forums category:reservations category:purchases
Messages larger than a certain size in bytes size: Example: size:1000000
Messages larger or smaller than a certain size in bytes larger: smaller: Example: larger:10M
Results that match a word exactly + Example: +unicorn
Messages with a certain message-id header Rfc822msgid: Example:
Messages that have or don't have a label has:userlabels has:nouserlabels Example: has:nouserlabels Note: Labels are only added to a message, and not an entire conversation.
Let's go over a few helpful examples that use the above operators. Maybe you're a student with a professor who sent out a message with an important document attached, but you can't find it. Something like the below search could help you out:
from:teacher.edu has:attachment Another helpful search is using the "size" operator to look for large messages that may be cutting into your Gmail/Google account storage. The below example would find all messages 5MB or larger:
size:5m In terms of filters, maybe your friends and family are constantly sending you videos, and you want to keep them all in one easy-to-access location. You can use a search like the one below, then create a filter with it that adds a label like 'Videos':
has:youtube OR "twitch.tv" OR "tiktok.com" OR "dailymotion.com" However, one issue affects filters like the one above — Gmail doesn't have a way to search by link URLs. For example, the above filter would only work for messages where the link's text was the URL. The filter would catch messages that spelled out "youtube.com" or "tiktok.com", but not messages where the link text said something different.
Fly through your Gmail inbox
Searching for relevant emails without advanced search filters can bog down your Gmail experience. Use the instructions above and find emails in a matter of seconds. Once you master advanced search filters in Gmail, go through the best Gmail apps and tools to keep your inbox in check.
Source: Android Police
Powered by NewsAPI.org
Gmail's search function has become more user-friendly thanks to the 'chip' feature, which allows users to filter results easily. Especially mail about the game Build Now GG