GAM-team / got-your-back

Got Your Back (GYB) is a command line tool for backing up your Gmail messages to your computer using Gmail's API over HTTPS.
https://github.com/GAM-team/got-your-back/wiki
Apache License 2.0
2.56k stars 203 forks source link

label-restored not applying on restore-group action #417

Closed bfourgeaud closed 1 year ago

bfourgeaud commented 1 year ago

Labels are not created on restored emails for groups with the flag --label-restored and --action restore-group

Full steps to reproduce the issue:

  1. Create a folder /archives containing a .mbox file
  2. Run the backup command to backup these emails to a google group : gyb --email [group-email] --service-account --use-admin [admin-email] --action restore-group --local-folder ./archives --label-restored "ARCHIVE"

Expected outcome (what are you trying to do?): The imported emails should be labelled ARCHIVE

Actual outcome (what errors or bad behavior do you see instead?): No label is applied. I tried it with already existing labels and new Labels. Same outcome.

jay0lee commented 1 year ago

This is working as expected, the Google Groups Migration API does not support applying group labels to migrated messages, that can only be used when restoring to a Gmail mailbox.