How to get Gmail Categories in macOS Mail app?
Unfortunately, Gmail doesn’t expose its “Categories” to IMAP. I'm using Mail.app as my email client, and I had the same desire to have my mail categorized with Gmail’s bayesian-or-whatever classifiers, so I found a fix.

This workaround uses filters to automatically apply labels to categories. Once labeled the old fashioned way, they can then be exposed to IMAP.


Go to Gmail/Settings/Filters
Using a search operator enter category:[chosen category] in the “Has the words” field and click “Create filter with this search.“
Check “Apply the label:” and select or create new label
(optional) Check “Also apply filter to matching conversations.“
Create filter
Go to Gmail/Settings/Labels and show the label in IMAP
(optional) Hide the label from label and message lists


This will link up your Gmail categories to your Mail.app.