Gmail quick tip: How to search in your inbox Primary category only

Here's a quick and easy Gmail search tip that will help you narrow down your search to one tab only.
Written by David Gewirtz, Senior Contributing Editor

Gmail: Make the most of it with these secret tricks

One of Gmail's best features is its extensive search. While it can sift through tens of thousands of messages instantly, sometimes it's not obvious how to get it to narrow down the search to just the messages that are important to you.

In this quick tip, I'll show you how.

Let's start with an example. I get a ton of press releases. I've trained Gmail to put those press releases into my Promotions tab. That way, they're there to glance through, but they're not constantly binging my phone's alert notification or cluttering up my Primary tab.

I use my Primary tab for work communication only. Right now, I'm working on a blockchain-related project among a bunch of other topics. I wanted to find all the messages in my Primary tab that were just about the blockchain project.

I could have used the "in:inbox" search string, which would narrow Gmail's search to just my inbox. But since I get so many press releases, the results from that search didn't show just my team's threads, but all the press releases as well.

To narrow down the search, I added a category tag to my search string. Here's what that looks like. Just type it into the search box at the top of your Gmail.

in:inbox category:primary blockchain

The in:inbox parameter says search just my inbox. The category:primary parameter narrows the search to just my Primary tab. And, of course, "blockchain" is the string I'm searching for.

You can build on this in powerful ways. Let's say you want to search everything but Forums and Social tabs. You'd use this string:

in:inbox -category:{social forums} search string

(Image: Getty Images)

The -category says to find everything that's not in the categories Social and Forums. By placing "social" and "forums" in curly braces, you're creating a list object, telling Gmail to skip searching both categories.

There's some interesting search syntax here. If you think about it, the following two search strings do the identical thing:

in:inbox category:primary search string
in:inbox -category:{social promotions updates forums} search string

The first says only search the Primary category, while the second says only search categories that are not Social, Promotions, Updates, or Forums, which leaves only Primary.

Finally, let's add a date search. I started the current blockchain project on Sept. 1. Anything in my primary inbox about blockchain before September 1 is for projects that have been completed. To clean those out, I added a date parameter asking for results prior to September 1. Here's that string:

in:inbox category:primary before:2017/9/1 blockchain

Note that the date format is year, followed by month, followed by day. You could, of course, also add "after:2016/12/31" to narrow the search only to 2017 results.

What cool search string combinations have you uncovered in Gmail? Tell us about them in the comments below.

See also: Gmail quick tip: Use color coded labels to organize your inbox

You can follow my day-to-day project updates on social media. Be sure to follow me on Twitter at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, and on YouTube at YouTube.com/DavidGewirtzTV.

Editorial standards