
A straightforward recipe for dumping your Google Workspace directory into a spreadsheet when you need contact data in a more workable format. Pulls names, emails, and phone numbers from your domain's people directory and writes them to Google Sheets with proper headers. The three-step process is clean: fetch contacts with the People API, create the header row, then append each contact as a new row. Honestly, this feels like something you'd build yourself anyway when HR asks for a contact export, but having the exact API calls and parameters laid out saves you from digging through Google's documentation.
$ npx -y skills add googleworkspace/cli --skill recipe-sync-contacts-to-sheet --agent claude-codeInstalls into .claude/skills of the current project.
PREREQUISITE: Load the following skills to execute this recipe:
gws-people,gws-sheets
Export Google Contacts directory to a Google Sheets spreadsheet.
gws people people listDirectoryPeople --params '{"readMask": "names,emailAddresses,phoneNumbers", "sources": ["DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"], "pageSize": 100}' --format jsongws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Name", "Email", "Phone"]'gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "jane@company.com", "+1-555-0100"]'Sponsors