[Update 3: Apparently the solution in Update #1 is a bit flaky and there is a more reliable search to find unlabelled gmail messages:

-has:userlabels -in:sent -in:chat -in:draft -in:inbox

Thanks to Tony Franks for his comment on July 1 with this suggestion. For all the details on how these searches work, see the main article below.]

[Update 2: Danimal commented that finding unlabelled gmail messages works better if you turn off conversation mode, because often some messages in a conversation are not labelled so results get whacky]

[Update 1: see JonG's comment below. Supposedly you can now pretty much get this done with this search:

has:nouserlabels -in:Sent -in:Chat -in:Draft -in:Inbox

It does not work at all for me and others report the same thing, but many people seem to be able to get it to work, so start with that. It's a lot easier than the method I mention below so it's worth a try. If it gets you most of the way there, you can use the methods mentioned below to tweak it.]

I’ve been experimenting more with Gmail after my disappointing Zimbra experience. Anyway, aside from Gmail not having a decent way to delete a message without get kicked back to the message list (FIXED: this is now an option under Settings), there is also the annoying fact that in Gmail there’s no button to just view unlabeled messages. The Google people no doubt think that I’ll just search and find the messages I want and locate the relevant message. But as the great Donald Rumsfeld said, there are known unknowns (I can search for those) and unknown unknowns like the credit card bill that I totally forgot about and which I could search for if I knew I had forgotten about it, but then I wouldn’t have forgotten about it and wouldn’t need to search for it now would I?

Update: What I Do Now (2013)

Before I tell you how to find unlabeled email, I have to say that I eventually just gave up. It was too much of a hassle to keep my shortcut updated as I changed labels not to mention trying to make sure everything has a label. What I do now is try to be diligent about adding important items to my filters so they get automatically labelled. If it’s a bill or an essential business email, I filter it to add a label that makes sense. So everything sent to the email address for my vacation rental in Yosemite gets copied and forwarded to my GMail account. It also gets a label “Rental”. When I’m in a hurry and think I have to catch up on rental business, I just view email with the Rental label. Once it’s processed, it goes into one of the nested labels under Rental (Awaiting Reply, Booked, Non-Customer, Former Customer, Admin). That makes a sort of mini inbox for the rental that I can deal with effectively, without getting sidetracked by notifications from Facebook. Then when I need to find something, I just use search. Yes, I have been assimilated by the Gorg!

Shortcut for Finding Gmail Message with No Label

So the way you find emails that have fallen through the cracks in Gmail is simple, but oh so cumbersome. You have to do a negative search for every label you use. That is, you look for messages not labelled Labe1 and not labelled Label2 and so on. There’s no way around this.

If you do this more than once, typing in all your labels in the arcane syntax Gmail uses gets old. So what I’ve done is simply create a shortcut, which you can do quite easily and it works up until you add a new label, but then it’s just a simple matter of editing the bookmark.

So first, you have a full syntax and a compact syntax and, as far as I can tell, the compact syntax does not work with multi-word labels. So if you have Gmail labels with spaces in them, you have to use the full syntax and substitute hyphens for spaces.

So let’s say you have the following labels:

  1. Label1
  2. Label2
  3. Label Three
  4. Label Four

First, we want to exclude all messages that have those labels. To exclude a labeled message from your search, you use the -label: operator.

For the single-word labels, we’ll use the short syntax. This allows you to group terms within curly braces without repeating the “-label:” qualifier. So it looks like this in your Gmail search box

-label:{Label1 Label2}

Simple as that. Now for the multi-word labels, in theory as I read the instructions, I merely need to add quotes around the terms, and they should work within the curly braces. Not so for me. If you create a filter and look at the test search, that’s not how it does it either. So based on that, what I found worked for Label Three and Label Four was:

-label:Label-Three -label:Label-Four

So the entire search, with both single-word labels and multi-word labels, looks like this

-label:{Label1 Label2} -label:Label-Three -label:Label-Four

Now, that will create a URL that looks like this

http://mail.google.com/mail/#search/-label%3A%7BLabel1+Label2%7D+-label%3ALabel-Three+-label%3ALabel-Four

Now you can save this as a bookmark or shortcut and instantly access your unlabeled Gmail messages. Sometimes Gmail will add a zx parameter to your URL that looks like zx=afeoasdxou3swf that is just a random string so that if your ISP is caching data, it will see this as a unique URL and won’t give you cached data for Gmail. Since this effectively creates a single-use URL, if that appears in your URL when you do your search, you should edit it out before saving the bookmark.

Note that if a message has two labels and you are only excluding one of those, the message will still show up in your search. So if you have something labeled Label1 and Label5, and you use the search above, it will still show up in your results.

Also, sometimes a conversation that is labeled shows up unless you relabel the entire conversation, because one message is unlabeled or is still in the Inbox or whatever. If you select the whole conversation in the list view and label it, that takes care of that issue.

Labelling Your Backlog

As per Karen’s suggestion below (see comments), if you’re trying to identify your unlabelled email just once and go label your back log, then you can view All, apply a label like “NoLabel” to it (or move them all to the Inbox as Karen suggests, but my Inbox is always overfull to start with and it stresses me out to much to put processed mail back in the Inbox… makes me feel like I’m making negative progress!).

Now go into ever other label folder, select all and remove the “NoLabel” label. Now if you go to the NoLabel folder, you have all your unlabelled email. If you’re going to do this on any kind of regular basis, though, you’ll want a bookmark as described above, otherwise this will be pretty time-consuming.

Dealing with Child Labels and Labels with Special Characters

James asks, what happens if you have special characters like underscores or slashes in your Gmail labels? If you are using the Gmail sublabel feature, you will automatically have slashes, because Gmail separates parent and child labels with slashes (look at Gmail in the Basic HTML mode and you can readily see this). First off, most special characters are just entered as such. Slashes must be entered as hyphens.

So let’s say you have the following setup:

  • Main
    • test1
      • test2
    • test3/test4
    • test*,:-test-./test

In that case, your search syntax will be, respectively

  • -label:main
  • -label:main-test1-test2
  • -label:main-test3-test4
  • -label:main-test*,:-test-.-test

Note that a label called “test3/test4″ which is a single label, behaves exactly the same as test2 which is a child label of test1. And for anything except slashes and spaces, which are both replaced by hyphens, you just use the character as it appears in the label. That’s even true for the colon, even though it’s part of the search syntax.

Tagged with:

Filed under: Software and ComputingWeb Fun

Like this post? Subscribe to my RSS feed and get loads more!