Returns a contact group by its name or ID.
class ContactsApp method .getContactGroup()
ContactsApp is the Apps Script service.
.getContactGroup() is the method name you will see after a dot in your code.
What it does
Why it's used
- Target a label group like Vendors or Conference 2024.
- Email or export just one segment of your contacts.
Common errors
- Forgetting parentheses on getContactGroup. Write ContactsApp.getContactGroup(), not ContactsApp.getContactGroup or getContactGroup by itself.
- Skipping dots between chained calls. Each step needs a dot, like ContactsApp.getContactGroup().
- Adding spaces where they do not belong. Write ContactsApp.getContactGroup(), not ContactsApp .getContactGroup(), ContactsApp.getContactGroup (), or ContactsApp . getContactGroup().
- Wrong capitalization. Use ContactsApp and getContactGroup, not contactsapp or getcontactgroup.
Explore
Related methods
-
.getContacts()
Returns contacts from the user's Google Contacts.
-
.findByEmailAddress()
Looks up a contact by email address.
-
.createContact()
Adds a new person to Google Contacts.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.