Google Groups for Gsuite is a product that allows admins to create mailing lists for their domain. It is different than the public-facing Google Groups forums. Each group has several settings that can only be changed via the Admin Group Settings API, but not anywhere in the Admin Console.
In order to make our Admin's lives easier, I created this script. It simply creates a new Google Group, gets an existing Google Group's settings, and updates the new one's settings to match the existing one. This allows our admins to do some simple templating.
Note: This project must be initially created by a domain administrator account
- Log in as a domain administrator and create a new Google Apps Script project in Google Drive.
- Copy and paste the code from
code.gs
intocode.gs
in the Apps Script project - Create a new html file with File → New → Html file, name it
index.html
, and copy the code fromindex.html
into it. - Go into Resources → Advanced Google services..., and turn on the Admin Directory API and Groups Settings API. Also follow the Developer Console link on this same screen and enable access to the Admin SDK and Groups Settings API for this project (more information).
- Go into the
code.gs
file and change thedomain
variable online 3
to be your domain. - Go into the
index.html
file and change the domain placeholder online 42
, and the domain regex online 161
- Go into Publish → Deploy as web app.... Choose the level of access that you want to have on the panel (Under Who has access to the app:), and click Deploy.
You're done! Navigate to that web app URL to see your groups and modify each one's setting.
When updates are released here on Github, simply copy and paste the newer code.gs
and index.html
files to your project, and go to Publish → Deploy as web app.... Increment the version number (Pick "New" under the Project Version dropdown) and click Deploy. You should be good to go!
Feel free to take a look at the source and adapt as you please. I would love to see some pull requests for improvements to the Javascript.
This source is licensed as follows:
Google Group Duplicator is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.