gws-people
googleworkspace/cli
Manage Google Workspace contacts, groups, and profiles via CLI.
What is gws-people?
Access Google People API to create, update, search, and organize contacts and contact groups in Google Workspace. Use this when you need to programmatically manage user contacts, sync contact data, or perform batch contact operations.
- Create, update, and delete individual contacts and batch operations
- Manage contact groups and group membership
- Search contacts by name, email, and phone number
- List and sync contacts including "Other contacts" and directory profiles
- Update and delete contact photos
- Copy contacts between groups and sources
How to install gws-people
npx skills add null --skill gws-people- Google Workspace account with People API enabled
- gws CLI installed and authenticated (see gws-shared SKILL.md)
- Appropriate OAuth scopes for contact read/write operations
How to use gws-people
- 1.Run `gws people --help` to browse available resources and methods
- 2.Use `gws schema people.<resource>.<method>` to inspect required parameters and types
- 3.Build your command with `gws people <resource> <method> [flags]` using the schema output
- 4.For search operations, send a warmup request with an empty query first to update the cache
- 5.Execute batch operations sequentially for the same user to avoid latency and failures
Use cases
- Bulk import or synchronize contacts from external systems into Google Workspace
- Search and retrieve contact information for integration with other applications
- Automate contact group management and membership updates
- Maintain contact photos and metadata across the organization
- Sync domain directory profiles and contacts with external databases
- Google Workspace administrators managing contacts at scale
- Integration developers syncing contact data between systems
- Automation engineers building contact management workflows
- IT teams maintaining contact directories and groups
gws-people FAQ
Contacts are in user-defined contact groups, while "Other contacts" are typically auto-created from interactions and not in any group. You can copy Other contacts to the myContacts group.
The People API requires a warmup request with an empty query to update the search cache before performing actual searches. This improves performance and reliability.
Yes, use batchCreateContacts and batchUpdateContacts methods to create or update multiple contacts in a single request.
Use the resource name `people/me` to refer to the authenticated user in get, list, and other operations.
The API returns an HTTP 409 error. Contact group names must be unique within a user's contact groups.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: gws-people description: "Google People: Manage contacts and profiles." metadata: version: 0.22.5 openclaw: category: "productivity" requires: bins: - gws cliHelp: "gws people --help"
people (v1)
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
gws people <resource> <method> [flags]
API Resources
contactGroups
batchGet— Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.create— Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.delete— Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.get— Get a specific contact group owned by the authenticated user by specifying a contact group resource name.list— List all contact groups owned by the authenticated user. Members of the contact groups are not populated.update— Update the name of an existing contact group owned by the authenticated user. Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.members— Operations on the 'members' resource
otherContacts
copyOtherContactToMyContactsGroup— Copies an "Other contact" to a new contact in the user's "myContacts" group Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.list— List all "Other contacts", that is contacts that are not in a contact group. "Other contacts" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason "EXPIRED_SYNC_TOKEN". In the case of such an error clients should make a full sync request without async_token.search— Provides a list of contacts in the authenticated user's other contacts that matches the search query. The query matches on a contact'snames,emailAddresses, andphoneNumbersfields that are from the OTHER_CONTACT source. IMPORTANT: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/other-contacts#search_the_users_other_contacts
people
batchCreateContacts— Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.batchUpdateContacts— Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.createContact— Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.deleteContactPhoto— Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.get— Provides information about a person by specifying a resource name. Usepeople/meto indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.getBatchGet— Provides information about a list of specific people by specifying a list of requested resource names. Usepeople/meto indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.listDirectoryPeople— Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. When thesync_tokenis specified, resources deleted since the last sync will be returned as a person withPersonMetadata.deletedset to true. When thepage_tokenorsync_tokenis specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases.searchContacts— Provides a list of contacts in the authenticated user's grouped contacts that matches the search query. The query matches on a contact'snames,nickNames,emailAddresses,phoneNumbers, andorganizationsfields that are from the CONTACT source. IMPORTANT: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/contacts#search_the_users_contactssearchDirectoryPeople— Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.updateContact— Update contact data for an existing contact person. Any non-contact data will not be modified. Any non-contact data in the person to update will be ignored. All fields specified in theupdate_maskwill be replaced. The server returns a 400 error ifperson.metadata.sourcesis not specified for the contact to be updated or if there is no contact source.updateContactPhoto— Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.connections— Operations on the 'connections' resource
Discovering Commands
Before calling any API method, inspect it:
# Browse resources and methods
gws people --help
# Inspect a method's required params, types, and defaults
gws schema people.<resource>.<method>
Use gws schema output to build your --params and --json flags.
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.