$npx -y skills add googleworkspace/cli --skill recipe-sync-contacts-to-sheetExport Google Contacts directory to a Google Sheets spreadsheet.
| 1 | # Export Google Contacts to Sheets |
| 2 | |
| 3 | > **PREREQUISITE:** Load the following skills to execute this recipe: `gws-people`, `gws-sheets` |
| 4 | |
| 5 | Export Google Contacts directory to a Google Sheets spreadsheet. |
| 6 | |
| 7 | ## Steps |
| 8 | |
| 9 | 1. List contacts: `gws people people listDirectoryPeople --params '{"readMask": "names,emailAddresses,phoneNumbers", "sources": ["DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"], "pageSize": 100}' --format json` |
| 10 | 2. Create a sheet: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Name", "Email", "Phone"]'` |
| 11 | 3. Append each contact row: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "jane@company.com", "+1-555-0100"]'` |