Monday, May 13, 2013

Gmail search: find email that is not in a specified label

I recently updated my Android from 3.2 to 4.2.2 and with this change came "Actionable Notifications" like the ability to archive an incoming email without having to open the Gmail app. This is extremely convenient, but has left me with a lot of unread email going to the archive. Most people know about the is:unread search query, thanks to Google's handy list of gmail operators. This list also includes ways to search only in specific labels like in:inbox or in:afolderofmine but no mention of how to search for mail that is not in a specified label. I tried the usual things like -in:inbox and notin:inbox and !=inbox and even !=in:inbox but none of those worked.

Finally I tried !in:inbox and it worked*.

In practical use, we could search for is:unread to find all of our unread mail, and visually distinguish between messages with and without the "inbox" label, and only check the conversations not in the inbox, and mark those as read, but why should we do the work of comparison when we could have our robot slaves do that for us?
Instead, search for something like is:unread has:nouserlabels !in:inbox !in:drafts and select all items that match and mark them as read.

Now we just need to implement some automation, and have these archived messages automatically marked as read after a few days. This is where I come up empty. IFTTT.com can search your Gmail for the string I gave above, but it can't do anything with it afterwards. I remember using a service before IFTTT existed that was specific to Gmail and advertised itself as adding features that were (and still are to this day) missing from Gmail, like time-based actions. I've long since lost the link and I only vaguely remember a silver logo and a name that started with an 's'. I also remember it not working well or all the time, but it was a free service, and they didn't seem to be stealing my information, so I didn't hold it against them.



*. It should be mentioned that you can have one message in a conversation in your archive and the rest of the conversation in your inbox, but when you search for things not in your inbox, the entire conversation will show up in your search results. Regrettably, this means we're not completely free from reading the list before apply an action to all of the items on that list.

No comments:

Post a Comment