recipe-sync-contacts-to-sheet
Installation
Summary
Export your Google Contacts directory to a Google Sheets spreadsheet in three steps.
- Requires
gws-peopleandgws-sheetsskills to be loaded before execution - Lists contacts from your domain directory with names, email addresses, and phone numbers
- Creates a new sheet with headers and appends each contact as a row for easy reference and sharing
SKILL.md
Export Google Contacts to Sheets
PREREQUISITE: Load the following skills to execute this recipe:
gws-people,gws-sheets
Export Google Contacts directory to a Google Sheets spreadsheet.
Steps
- List contacts:
gws people people listDirectoryPeople --params '{"readMask": "names,emailAddresses,phoneNumbers", "sources": ["DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"], "pageSize": 100}' --format json - Create a sheet:
gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Name", "Email", "Phone"]' - Append each contact row:
gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "jane@company.com", "+1-555-0100"]'
Related skills
More from googleworkspace/cli
gws-gmail
Gmail: Send, read, and manage email.
26.2Kgws-docs
Read and write Google Docs.
26.1Kgws-drive
Google Drive: Manage files, folders, and shared drives.
26.0Kgws-sheets
Google Sheets: Read and write spreadsheets.
24.7Kgws-calendar
Google Calendar: Manage calendars and events.
24.7Kgws-docs-write
Google Docs: Append text to a document.
21.8K