Moving mail folders to gmail labels – sublabels and hierarchy is lost

emailgmailmail.app

I use Mail.app and iOS Mail to access 3 different gmail accounts. Currently I have all of my mail in folders "on my mac", but I'd like to be able to access them from my mobile devices (iphone, ipad) or when logging onto email from another computer (using the webapp). When I drag and drop folders into my gmail accounts (as per this answer), the nesting/sublabels/heirarchy is lost. How can I migrate preserving the proper structure?


My Folders looks something like:

Group/
|- SubGroup1/
|- SubGroup2/
   |- SubSubGroup/
   |- <some messages>
|- <some messages>

and the new gmail labels look like:

Group (messages)
Group/SubGroup1
Group/SubGroup2
Group/SubGroup2/SubSubGroup
Group/SubGroup2/SubSubGroup (messages)

Best Answer

The key is that this process doesn't seem to make the top-level folders appropriately.

1) In gmail settings add a label with the missing top level. For example, for my example above, If I create a label called Group then instantly the sub-labels get properly moved to it automatically.

i.e.

Group (messages)
Group
|- SubGroup1
|- SubGroup2
   |- SubSubGroup
   |- SubSubGroup (messages)

2) Manually move the (messages) emails to the new label (i.e. move everything in Group (messages) to Group and from SubSubGroup (messages) to SubSubGroup ). Repeat this for the missing labels further in the tree

You'll then be left with the appropriate

Group
|- SubGroup1
|- SubGroup2
   |- SubSubGroup