title: How to sync a Google Groups membership with a Google Spreadsheet?
body: <p>G'day,</p>
  
  <p>I have several Google Groups under a Google Apps account that my nonprofit uses. Some of these groups are quite large and managing their membership with the web UI is pretty awful. </p>
  
  <p>I'm hoping someone can help me come up with a script that can synchronize a list that I maintain on a Google Docs Spreadsheet with a Group so that when I remove someone from the sheet, they get removed from the group -- and when someone gets added to the sheet, they get added to the group.</p>
  
  <p>I was taking a look at the <a href="https://developers.google.com/admin-sdk/directory/v1/guides/manage-group-members" rel="nofollow noreferrer">Directory API</a> but I'm not savvy enough to figure out how to build a script for what I need. Side note, I did play around with a <a href="https://stackoverflow.com/questions/25455649/using-directory-api-in-google-apps-script-how-to-get-groups-inside-a-group">different script</a> someone posted here that uses similar API methods, and I got that particular script to work -- so in other words, my account is now properly set up for API access.</p>
  
  <p>Perhaps the easiest way to do this programmatically would be to delete the group's membership entirely, then add each member again, each time the script runs?</p>
  
  <p>Thank you in advance for your assistance.</p>