This article originally appeared in TidBITS on 2011-03-16 at 1:32 p.m.
The permanent URL for this article is:
Include images: Off

Zen and the Art of Gmail, Part 2: Labels & Filters

by Adam C. Engst

After initially making the decision to try Gmail (see “Zen and the Art of Gmail, Part 1: Why I Switched [1]”), I put a lot of thought into what I wanted to get out of email. This required some soul searching, since I’m generally an organized person who likes hierarchical filing systems. Spotlight has never helped me in the Finder, since I know where all my files are stored, and in Eudora, I had hundreds of carefully organized mailboxes that made searching merely a matter of looking in the right place.

But on the downside, my saved search strategy in Eudora was failing me (see “A New Way to Use Eudora [2],” 20 December 2004). The problem was that I had to do too much, in filing messages that couldn’t be filtered and marking messages that required later action in some way. The marked messages were the crux of the matter — labeling them Act On in Eudora was the kiss of death — I was almost guaranteed never to see them again. For a while I merely marked such messages as unread, so they’d nag me every day, but I quickly became capable of ignoring those as well, though their mere presence in my Unread Mail saved search made dealing with new messages all the more awkward.

After much consideration, I decided go for a Zen approach, and to see email as a river, where my goal was to do as little as possible to any given message as it flowed by. The first step in my journey was to set up labels and filters that would help manage much of my mail automatically.

Labels Are Searches -- Labels are one of the most powerful and subtle aspects of Gmail. Most people think of Gmail’s labels as being like folders in a traditional email program, but that’s missing two key points:

If you think deeply about these two points, you realize that most filing that’s necessary in traditional email programs is a waste of time in Gmail. In those programs, you must file messages, because they have to live somewhere, and because searching isn’t fast enough or good enough to assemble a collection of related messages quickly. Neither of those problems exists in Gmail.

In contrast, you need to create a label for only three reasons in Gmail:

It may not seem as though this lets you create many fewer labels than you had mailboxes, but in my experience, it really does. In particular, I seldom create project-based labels, because I’m confident that I can find any message I need via a search for a sender or list address.

For instance, I could create a label to track messages related to my iPhoto Visual QuickStart Guide book for Peachpit, but that would basically entail collecting messages from my colleagues at Peachpit with or email addresses, along with messages from the indexer, whose name I know. So there’s no significant win from labeling these messages; I don’t need to deal with them as a group, and if I did, a search would give me exactly the same results.

That’s not to say that other people don’t have the need to maintain project-based groupings of messages, and Gmail can handle that, just not any better than any other email program. You’d need to collect messages via filter (messages from a client’s domain, for instance) and via manual labeling (messages from a colleague about that particular project).

Labels have one small advantage over searches: message count. For unknown reasons, Gmail only estimates the number of results from a search, but displays the exact number of messages that have a certain label.

Sometimes, I’ll pass up a label in favor of a Quick Link, which is a Gmail Labs widget that puts a list of links in the left sidebar. I’ll talk more about Gmail Labs later in this series, but I like Quick Links a lot because it gives me fast access to a group of messages without making a label. Just like labels, Quick Links are saved searches, and can encapsulate anything you can search for, but they don’t apply any metadata to found messages. For instance, one Quick Link I use finds messages in TidBITS Talk or to our internal press release list that have also been marked as spam so I can identify any false positives.

Filters Are Searches -- Gmail has no lock on the concept that filters are searches — that’s how all email programs work. But it’s such an important point that I want to emphasize it.

Filters let you search for messages that match certain criteria: from a certain address, with a certain word or phrase in the Subject line, and so on. Once a message is caught by a filter, the filter can perform certain actions on it, the most important of which is to apply a label.

To be specific, filters can look for text in the From, To, and Subject lines, and anywhere else in the message, though Gmail unfortunately lacks the capability to search any arbitrary header line, like Content-Type or X-Sender. When looking for text in the body of the message, you can match messages that both contain certain words and don’t contain others, but there’s no grep searching or partial-word searches. You can also filter messages based on their attachments.

Once you’ve defined your criteria, the actions you can perform on a message are:

Gmail’s filter capabilities are limited in comparison with traditional email programs, not surprisingly, since there’s less manipulation that can be done with messages on the Web — you can’t execute an AppleScript, for instance. (For that, you’d need to let a Macintosh email program access your Gmail messages via IMAP, which is totally possible.)

Where Gmail’s filter interface shines, though, is in showing you the results of a filter you’re creating on your current archive of email (with the Test Search button), and giving you the option of applying it to existing messages as well as future ones (with the “Also apply filter to X conversations below” checkbox in the final filter creation screen). That’s huge, because it means you can use filters for one-off actions like finding and deleting all the messages associated with a mailing list you’ve decided you don’t like.

[image link] [3]

Forget Inbox Zero -- Now that you understand how labels and filters work, let’s return to how I suggest you use them. The main use is to manage the flow of incoming messages, reducing the number that hit your Inbox to just those that you need to see as they arrive.

My goal with my Inbox is to read everything that comes into it, replying to those messages that require replies and labeling manually those very few messages that only I can identify. Thanks to the hundreds of email messages I receive each day, I need to filter non-essential mailing lists and various automated messages (Twitter follower notifications, Netflix shipping alerts, and so on, all of which receive an Automated Messages label) out of my Inbox. These filters apply the appropriate label and include the option to Skip the Inbox.

But I do want messages from key mailing lists, like the TidBITS staff list and the Take Control authors list, to appear in my Inbox, since they’re equally as important as messages sent only to me, and often more so. The filters that set labels for these mailing lists simply don’t use Skip the Inbox, so every message from the lists gets both the list label and the Inbox label.

Finally, of course, there are the messages sent directly to me from random people all over the globe. There’s no effective way to filter these messages in any way, and although I could label them after the fact, my Zen approach to email discourages that. The simple fact is that in over a year of use, I have yet to need such an arbitrary collection; a search has always produced the message I need.

The astute reader will note that most of my mail will continue to live in my Inbox, or, rather, will continue to keep the Inbox label. In other words, forget Inbox Zero. I have over 40,000 messages with the Inbox label, and you know what? It makes absolutely no difference in my usage, because Inbox is just another label, and there’s no reason to perform an additional action for every message to remove it. This bothers many people who want to simulate the email programs of yesteryear, so Google added an Archive button that, when clicked, removes the Inbox label. That’s all it does, and thus qualifies as entirely unnecessary work, since there’s no liability to leaving the Inbox label in place.

Not only do I file hardly any messages manually, I almost never delete messages. Gmail automatically deletes messages marked as spam after 30 days, but the only other messages I delete are test messages (TidBITS issues, Take Control orders, notifications from the TidBITS Commenting System) that I don’t need and that could confuse future searches.

You might think this is folly, since it would seem easy to lose unread messages among everything else in the Inbox — especially since Gmail cannot sort messages in any way other than by date. But in fact, there are two reasons this works: the search “is:unread is:inbox” and Google’s new Priority Inbox feature.

The “is:unread is:inbox” search shows all the messages with the Inbox label that are unread, ensuring that I can at any moment focus on just those messages. And remember the Quick Link widget I mentioned earlier? I’ve encapsulated that search into an Unread Inbox Quick Link that has become my default view on my Inbox.

I relied heavily on that search until Gmail gained Priority Inbox; now I use the search only to find messages that both Priority Inbox and I have failed to see when they were new.

Priority Inbox to the Rescue -- Priority Inbox is a relatively new feature for Gmail, and another example of how Gmail is rethinking email. You’re probably familiar with how spam filters can analyze messages and decide if they look like spam, based on other messages that you’ve marked as spam? Well, Priority Inbox works the same way, but instead of identifying spam, it identifies messages that are important to you.

How? Gmail just starts guessing as to what’s important and what’s not, and you correct it as it goes. Within a remarkably short time, you’ll find that the messages you most care about appear in your Priority Inbox, and the rest show up in an Everything Else list at the bottom of the Gmail window. If you ever want to see why Gmail thought something was important, just hover over the little yellow icon that indicates the message is important, or, if you’re in the message, click the Show Details link.

Priority Inbox is fairly malleable, in fact, providing up to four sections, the first three of which are configurable. For each of these, you can set Gmail to show messages in the Inbox that are Important and Unread, Important, Unread, or Starred, or you can have Gmail display the contents of a label in the section. For all four sections, you can choose how many messages should display.

[image link] [4]

I’ve configured Priority Inbox’s sections as follows. The first one shows Important and Unread messages, the second shows Starred messages (things I need to come back to), the third shows my Press Releases label (messages I want to scan, but don’t want cluttering my Inbox), and the fourth is Everything Else. I actually spend a fair amount of time in Everything Else, since new messages that aren’t deemed important appear there, as do important messages once I’ve read them.

What I’d really like to see from Priority Inbox is the capability to have Gmail automatically label messages based on previously labeled messages. That way I could train it to collect messages about certain topics or projects and have those added to automatically over time.

Shortly after I wrote that last paragraph, Google introduced a new Gmail Labs feature called Smart Labels [5] that promises roughly what I want. Unfortunately, Smart Labels can assign only three hard-coded labels to messages: Bulk, Forums, and Notifications. Since my filters are far more specific, they’re more useful to me. If you were entirely new to Gmail, I could see trying Smart Labels for a while to see if it proved to be sufficient.

My Email Flowchart -- To summarize then, here’s how my email works. Messages come into Gmail. Filters assign labels to incoming messages from mailing lists, along with a few other predictable types of messages. Important mailing list messages retain the Inbox label so I see them sooner; secondary mailing lists lose the Inbox label. That all happens without me even noticing (unlike in traditional mail programs, which are always checking for mail and showing filtering status and whatnot).

To start reading mail, I just look at the top of my Gmail window, where the Priority Inbox’s Important and Unread section lists the most recent messages. I then click the first unread message and read it. From that point, there are only seven actions I might take on that message (listed in order of how often I perform them):

Because the Report Spam and Delete buttons remove the Inbox label and apply the Spam and Trash labels, respectively, thus-labeled messages disappear entirely (since they no longer match the search), switching me to the list of unread messages again. Marking a message as unread also has the effect of switching back to the message list, which makes sense.

With all other actions — replying, starring, applying a label, and doing nothing — I follow that by pressing the keyboard shortcut — the k key — to move on to the next message, where I once again go through the simple steps. For most messages, I have only to decide if I wish to pretend I haven’t read the message yet, or if I need to reply. And in only a few situations, I also have to think about if I should mark the message for later dealing in some way, and if it needs additional labeling.

Every so often, I use my Unread Inbox Quick Link to display all the unread messages in my Inbox, regardless of their importance. That’s useful because every now and then an unimportant unread message can fall off the bottom of the chronologically sorted Everything Else list, and without this explicit check, I’d likely never see it.

That’s it for reading and replying. Composing messages is easy too, but the overall task is so simple that Gmail doesn’t have much room to improve on what traditional email programs do. It does an awfully good auto-complete as you type a few characters in someone’s name, and presents the list of possible matches sorted by how often you write to them. And of course, there are some useful enhancements available from Gmail Labs that help prevent addressing mistakes. That’s where we’ll turn in the next article (see “Zen and the Art of Gmail, Part 3: Gmail Labs [6]”), after which we’ll look at Mailplane, the Mac application that breaks Gmail out of the browser (see “Zen and the Art of Gmail, Part 4: Mailplane”).