---
id: ssh2-recipe-sync-contacts-to-sheet
name: "recipe-sync-contacts-to-sheet"
url: https://skills.yangsir.net/skill/ssh2-recipe-sync-contacts-to-sheet
author: googleworkspace
domain: data-analysis
tags: ["google-contacts-api", "google-sheets", "contact-management", "data-synchronization", "crm-integration"]
install_count: 14400
rating: 4.50 (37 reviews)
github: https://github.com/googleworkspace/cli
---

# recipe-sync-contacts-to-sheet

> 将Google联系人目录导出并同步到Google表格中，便于数据分析和管理。

**Stats**: 14,400 installs · 4.5/5 (37 reviews)

## Before / After 对比

### 谷歌联系人数据一键同步至表格，大幅提升数据分析前的准备效率与准确性。

## Readme

# 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

1. List contacts: `gws people people listDirectoryPeople --params '{"readMask": "names,emailAddresses,phoneNumbers", "sources": ["DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"], "pageSize": 100}' --format json`
2. Create a sheet: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Name", "Email", "Phone"]'`
3. Append each contact row: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "jane@company.com", "+1-555-0100"]'`



---
*Source: https://skills.yangsir.net/skill/ssh2-recipe-sync-contacts-to-sheet*
*Markdown mirror: https://skills.yangsir.net/api/skill/ssh2-recipe-sync-contacts-to-sheet/markdown*