Skip to content

Instantly share code, notes, and snippets.

@rdoursenaud
Created August 28, 2014 15:08
Show Gist options
  • Save rdoursenaud/abbf98ed5ea7208b335b to your computer and use it in GitHub Desktop.
Save rdoursenaud/abbf98ed5ea7208b335b to your computer and use it in GitHub Desktop.
Google Apps Script - Delete all contact groups
function deleteContactGroups() {
var groups = ContactsApp.getContactGroups();
Logger.log("total: " + groups.length);
for (var i = 0; i < groups.length; i++) {
if (!groups[i].isSystemGroup()){
groups[i].deleteGroup()
Logger.log("deleting: " + groups[i].getName() );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment