Transfer your Gmail messages to Google Workspace Group

Transfer your Gmail messages to Google Workspace Group
Photo by Joshua Sukoff / Unsplash


Google Groups is an online service provided by Google that allows people with shared interests or goals to communicate and collaborate in a group setting. It serves as a platform for discussions, email-based communication, file sharing, and organizing events within a group of individuals.

There are several reasons why you might consider using Google Groups:

  • Communication and Collaboration
  • Community Building
  • Email Distribution
  • Access Control and Privacy
  • Integration with other Google Services
  • Archiving and Searchability

What if you have an old Gmail mailbox and want to transfer all the content into a Google group? Let's solve it together.


Got Your Back (GYB) is a command line tool that backs up and restores your Gmail account. GYB also works with Google Workspace (formerly G Suite / Google Apps) accounts.


Windows Users:

Mac and Linux Users:
Open a terminal and run:

bash <(curl -s -S -L

this will download GYB, install it and start setup. Follow the instructions and complete the setup.

Backup Gmail

gyb --email [email protected] --action backup

This command will create a directory and clone all the messages into it.

Google Workspace Setup

  1. Go to the Google Developers Console
  2. Select Yes and click "Agree and continue". It will take a moment for the project to be created.
  3. Click "Go to credentials"
  4. Click "New credentials" and choose "Service account key".
  5. Click "Select..." and choose "New service account".
  6. Give your service account a name like "GYB Service account".
  7. Keep JSON as the key type. Click "Create".
  8. Agree to create the service account without a role. Copy the client ID.
  9. Your browser will download a .json file. Save the file with the name oauth2service.json and put it in the same folder as or gyb.exe.
  10. Go to Domain-wide Delegation in your Google Workspace Admin console
  11. Click "Add New".
  12. For Client ID, enter the Client ID from above.
  13. For API Scopes, enter exactly:,,

Click "Authorize". Now, your service account setup is complete.

Start Migration

gyb --local-folder [email protected]  --action restore-group --use-admin [email protected] --service-account --email [email protected]

This command syncs your local backup into a specified Google Group.


In this article, we learned how to move the messages in your Gmail account to the Google group using GYB.

See you in the next article. 👻