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. 

    43 comments:

    1. Hi Vishal, I als like both Apple's Mail and Google's categories.
      So I tried your solution and it works.
      But there's one big drawback for me and that is that the browser version of Gmail is pretty much useless: the categories tabs are emptied by the 'skip the inbox' action.
      Do you have a solution for that?
      Many thanks in advance for your reply.

      ReplyDelete
    2. Hi Onno,

      The tabs are empty but the collected emails are available in the corresponding folders on the left. I am afraid that's the best solution I have but then I rarely use the browser version to look for a better one.

      -Vishal

      ReplyDelete
    3. You can work around that problem by creating a primary label and not telling the filters to move from inbox. Then you just ignore the inbox on the phone and use the primary label instead. A filter of category:primary will populate a primary label.

      ReplyDelete
      Replies
      1. The problem with that is that if you have multiple accounts you cannot aggregate them all into one primary-label unified inbox.

        -Vishal

        Delete
    4. Hi Vishal,
      I like this solution! Nothing beats a native app! I am running into an issue that I thought you may have encountered as well. I want to be able to teach Gmail how to categorize my messages according to my preference (although it is usually spot on). When using Gmail from the browser with regular category tabs enabled, it seems that it can be trained by dragging individual messages to a preferred category tab.

      I am trying to accomplish this while using your filtering system. I don't mind opening Chrome every once in a while in order to retrain Gmail to categorize a particular email differently. The question is, does Gmail learn when an email is dragged on the left hand Bar from one category to another? (I know that it would not learn by manipulating the user created tags - ex. MyLabels/Promotions. You can display the built-in Gmail categories in the left hand column by setting it to display those labels in Gmail settings.

      Cheers --Daniel

      ReplyDelete
      Replies
      1. Hi Daniel,

        Glad you like my solution, native apps are more often than not the best.

        I have encountered the issue that you point out as well. As you said, gmail is usually 99% accurate but still there are these emails that you want gmail to learn to file differently.

        We can perhaps post the question at a gmail product forum
        and maybe a gmail product manager can respond?

        One idea would be to periodically uncheck the box in the filters that moves the emails out of the inbox, train gmail and then check the box again? It is a little clunky but can work.

        -Vishal

        Delete
      2. Hi Vishal,

        Thanks, I did try disabling the filters today and using Gmail in Chrome to teach it a little more of my preferences.

        I wonder if the solution above would help:

        >>“You can work around that problem by creating a primary label and not telling the filters to move from inbox. Then you just ignore the inbox on the phone and use the primary label instead. A filter of category:primary will populate a primary label”

        This way you could just jump to the browser to do some re-filing every once in a while without having to disable filters, dig up misfiled email, send it to inbox, drag it to desired tab, re-enable all filters. It would have the added benefit of making Gmail in the browser more useful when on the road. I know Mail.app has the ability to notify of new messages according to smart inboxes, which could be configured to correspond to the suggested ‘Primary Label’

        -Daniel

        Delete
      3. Hi Daniel,

        That solution does indeed work for Mail.app. It will not work as well for iOS devices but if that is not a concern then I think having a primary category label is good.

        -Vishal

        Delete
      4. 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.

        Delete
      5. Hi Cathy. I did read your comment several times, but I still can't get it.
        What filters did you create in your mail.app?
        Why if you move mail from Promotions, it ends up in 'promotions' tab later in gmail?

        Delete
    5. This comment has been removed by a blog administrator.

      ReplyDelete
    6. This is a very neat solution! Thanks Prof!

      ReplyDelete
    7. This worked perfectly!! Thanks so much for taking the time to type this up.

      ReplyDelete
    8. do you have a way to put things back?

      ReplyDelete
    9. This comment has been removed by a blog administrator.

      ReplyDelete
    10. This comment has been removed by a blog administrator.

      ReplyDelete
    11. This comment has been removed by a blog administrator.

      ReplyDelete
    12. Hi Vishal - An alternative in Mac mail once you have set up these filters is to 1) leave them in the Gmail inbox and 2) create Smart Mailboxes in Mac Mail filtering in only the Primary Inbox tab from your new label filter. Example: Create a Smart Mailbox for the Primary label in Gmail that your "category:primary" filter. It's an extra step but plays nicely without changing the way Gmail works.

      ReplyDelete
    13. This comment has been removed by a blog administrator.

      ReplyDelete
    14. This comment has been removed by a blog administrator.

      ReplyDelete
    15. This comment has been removed by a blog administrator.

      ReplyDelete
    16. This comment has been removed by a blog administrator.

      ReplyDelete
    17. This comment has been removed by the author.

      ReplyDelete
    18. This comment has been removed by a blog administrator.

      ReplyDelete
    19. It is sad that no native app has out of the box support for Inbox Tabs :(

      ReplyDelete
    20. This comment has been removed by a blog administrator.

      ReplyDelete
    21. This comment has been removed by a blog administrator.

      ReplyDelete
    22. This comment has been removed by a blog administrator.

      ReplyDelete
    23. Hi Vishal,
      Thanks for details, I am also fan off Apple Mail app but was facing challenges with too many unwanted emails to my gmail address. So was not able to quickly see important emails. This article has helped to achieve a clutter free inbox on my iPhone for gmail emails. Rgds Anil

      ReplyDelete
    24. Vishal,

      Thank you! This is absolutely life changing. I'm a dedicated mac mail user and a member of a couple heavy gmail forums: I had given up on using my primary gmail account for anything other than deleting messages...until today.

      ReplyDelete
    25. So I have now lost all of my emails from Primary, Social, Promotions.
      I tried this method but I didn't like it because it simply didn't do as described. In the AppleMail it wasn't showing emails exactly as gmail web client, some emails missing and some junk included. I didn't try smart mailboxes because at this point I couldn't be bothered and decided to switch back to gmail client.
      I deleted the labels and the filters but now...ALL of my emails have vanished from my 3 tabs. Now I have to click on All Mail to see my emails.
      How do I fix this please?

      ReplyDelete
    26. Things have changed a bit since you posted this great guide. Now you have to check additionally "Categorize as:" and choose appropriate category. Everything at the last filter config screen. Without that, all emails will land in "Inbox" as well.

      Best Regards!

      ReplyDelete
    27. This comment has been removed by the author.

      ReplyDelete
    28. This comment has been removed by the author.

      ReplyDelete
    29. Thank you so much, Vishal! This is exactly what I needed.

      ReplyDelete
    30. This comment has been removed by the author.

      ReplyDelete
    31. This comment has been removed by the author.

      ReplyDelete
    32. This comment has been removed by the author.

      ReplyDelete
    33. setup.office.com

      Before you plan to install the Office 2016 or Office 365 on your device be it a Computer, Laptop, Mobile Phone or a Tablet, you are required to take few important steps on of them is to remove any existing Office installations from your PC. Just like the previous Office products, Office 2016 & 365 will conflict with the previously installed versions. So, it becomes necessary to remove the previous office files properly.


      setup.office.com
      www.office.com/setup
      office.com

      ReplyDelete
    34. www.office.com/myaccount

      To Setup retail card please visit official website Www.Office.Com/Setup. Office Retail Cards allow you to download your security product from the internet instead of installing from a CD, ensuring recent versions.


      www.office.com/myaccount
      www.office.com/setup
      Microsoft Office product

      ReplyDelete
    35. download lagu dari Google play music ke iTunes
      http://zapplerepair.com/dari-iTunes-pindah-music-ke-Android-pakai-Google-play-music.html

      ReplyDelete