Sunday, April 20, 2014

Make Apple Mail on Mac OS and iOS play nice with gmail category filtering



Columbia Email System Moves to gmail


A couple of months ago, the Columbia University email system was moved over to Google Apps for faculty and it significantly affected my email workflow. The move meant I now have three gmail accounts,  the other two being my personal email account, and one associated with the company I founded, Infinio. My Columbia email account has been my primary email ID for over 12 years now though, and I receive the bulk of my email on it. And I really mean bulk. 

Inbox Tabs: A fantastic feature


I had heard about this gmail feature called inbox tabs, but never used it since my other gmail accounts did not receive all the social media/promotion/forum emails etc. Once the Columbia email moved to gmail, I decided to turn it on. I woke up the next day and discovered that I was neither that popular nor particularly important - and it was great! My primary inbox tab had only one email in it, whereas normally my ritual after opening my email client the first thing in the morning was to sort through about 50 messages which fall into the aforementioned inbox tabs. Note that these are not spam emails, but emails I am mildly interested in and occasionally useful. Google seemed to be doing a very good job of filing the messages appropriately and only occasionally I needed to refile a message back to by primary tab.

Switching Clients and missing Mail.app


I liked the inbox tabs feature so much that I immediately switched over to using the gmail web client on both my Mac as well as my iOS devices. I searched around for other email clients that used the inbox tabs feature offered by gmail but found nothing aside from MailPlane which is essentially a wrapper around the gmail web client, though very nicely done. While getting a clutter free inbox was great, there are features in the Apple Mail client that I started to miss.

I have been an Apple Mail user for over a decade now, and while it has many faults there are many things to like about it, especially compared to web based gmail clients. This applies to both the Mac OS client as well as the iOS one. Some of the features that I like in Mail that are missing from the gmail clients are:
  • Unified Inbox. Switching between my 3 accounts to download and check email is annoying. I know that it helps some people to context switch and enforce discipline but it's just not for me.
  • Smart data parsing. I like the feature where the Apple Mail clients automatically parse contact details, dates, phone numbers and addresses and make them useful to add calendar entries, make phone calls, open up the maps app etc.
  • PDF signing. This is very important for me. The Mac OS Preview App has a very nice feature for easy PDF signing.  I get several PDF documents that require my signature, wearing both my Professor hat as well as the Infinio Board member hat. What makes the Preview feature even more useful is that you can invoke the app from within an email, sign the document and when you are done signing Preview is intelligent enough to ask you if I want it to be emailed back to the sender. This feature is enormously useful to me.
  • Much better HTML rendering on iOS. The Apple Mail client renders HTML emails much better than the gmail client. I almost never have to go into an email and manually zoom with the Apple Mail client, whereas I frequently need to do it using the gmail client.
  • Other email IDs. I have an iCloud email ID that occasionally gets something useful. Having another email client just for that seemed wasteful.
  • Inline display of attachments. The Apple apps display/play/preview all sorts of attachments very nicely, including PDFs, Office documents and voicemail sound files. With the gmail client the process is cumbersome.
I kept searching for solutions that would let me use the category tabs with Mail.app but found nothing. Until yesterday where I chanced upon this post by the helpful people over at AirMail.

Labels, Filters and getting the goodness of gmail categories with Mail.app


The process you need to follow is pretty straightforward. It has been described in detail, including screenshots in the AirMail blog post I mention above, but the steps are below:

  • Go into every gmail account that you use and setup labels. You can find the labels tab when you click the "settings" option in the gears icon you see on the top right right corner of the gmail web client.
  • Setup a label for every gmail category tab that you want to use, i.e., social, forums, updates, promotions. You can setup the labels directly or create a top-level label called "MyLabels" or something and nest them under that.
  • From the same settings page, click on filters and setup filters for every category tab that you want to use.
  • Click on "create new filter" and in the "Has the words" field add the text "category:promotions" etc. like the screenshot below (note the first time you create a filter you won't see the "category:promotions" on top of the screen like below, don't worry about it).

  • Click continue, and on the next screen check the option "Skip the inbox (Archive it)", "Apply the label" - select MyLabels/Promotions and check "Also apply filter to matching conversations" if you want the filter to apply for your previously received emails.

  • Do it for every category in every gmail account that you want to filter.
  • Your email accounts on Mail.app on MacOS and iOS will now show folders under the individual gmail accounts that are MyLabels/Promotions etc.
  • Optionally, on Mail.app on the Mac, create smart folders that collects all your "promotions", "social" etc. folders into one unified folder.
  • You now have a clutter free Mail client on your Mac and iOS with all the benefits of category filtering from gmail. 

    So far the system is working great for me and I am back to using Mail on the Mac as well as my iOS devices and have a relatively quiet, clutter free and unified inbox.

    Update: A comment by Cathy Kapanadze below adds an important improvement to the setup, that of the occasional mislabeling of emails by gmail and retraining the system. I am reproducing the comment here:


    Hi Daniel,

    I found a solution to this. What I did was create smart mailboxes in my mail app for filtering. Then if I notice something in Promotions, for example, that I want to have in inbox, I drag and drop it to my "inbox" mailbox. Then I go on gmail.com and click on "promotions" tab, which ONLY has the mail i wanted to move to inbox. I then move it to the primary tab and say I want to do the same for other emails from this sender.
    Hope it works for you.

    -Cathy.