Tuesday 22 December 2020

Bulk manage members of a Google Group - overview

The following Google Apps Script is designed to allow bulk management of members of a Google Group all from a Google Sheet. So with a list of email addresses and roles (owner, manager, member) you can add/remove/edit a large number of users with the click of a button. The tool provides an easier way of doing this as opposed to the web portal for managing members (www.groups.google.com).

Bulk manage a Google Group from a Google Sheet.
Screenshot of the tool in a Google Sheet.

Features of the tool

  • Overcomes some of the web portal limits on bulk adding members.
  • Checks that the person running the tool is at least a 'manager' of the group so they do not accidentally lose access.
  • Checks there is an 'owner' of the group present to prevent permanent loss of access to the group for everyone.
  • Creates a full log of all changes made in the Google Sheet so you have a record of actions.
  • Will stop if it encounters and issue with an email address (for example) but will not need to re-sync any members prior to that point.
  • Uses toast popups to inform you of the progress as it may take several minutes to run depending on how many members you have.
  • Uses an in-house API url to connect to Google Groups, for which the address has been removed from the Apps Script code (you will need to insert your own).

Bulk manage members of a Google Group - the code

Following on from the overview blog post here, I have included the code itself from which the tool is built.

Note: this is not a complete solution here - it relies on API authentication which was provided at an institutional level and is unavailable outside of this. The code still provides invaluable insights however and you may have your own authentication you can plug in.