Hey! Thanks for reporting this - unfortunately Gmail doesn’t provide an API for it’s tabs / categories (Promotions, etc.) It’d definitely be a nice feature to have - I sometimes go back to the Gmail UI to quickly clear all of my “Promotions” tab, but we’ll have to wait for them to expose it via IMAP.
EDIT: I see Polymail supports them - will check this out a bit and see what they’re doing
I’ve been trying to crack this problem for a little while now, but I just can’t seem to get the understanding of the program in order to fix it myself.
I think you might find this useful for implementing the gmail tabs/categories system.
The above link explains that they are simply an extension to the IMAP standard, and implemented with similar API to IMAP folders. Should be possible to add to Mailspring and I would certainly love to see it supported.
you can set up a filter in gmail settings that attaches the label.
If the email matches category:primary you can set the filter to attach the label “primary”. Then create the label in mailspring and it works perfectly.
It also works for category:updates, category:social and so on
Airmail is able to do this, so it is possible. It looks for Category = Promotions or Category = Social, for example, to recreate those folders in the Mac client. I don’t know which API or field they are getting those from, but they are definitely available from Gmail via IMAP somehow.