跳到主要内容
哒哒星球DADA PLANET

Skill · 已公开版本

recipe-sync-contacts-to-sheet · Google 通讯录导出到表格

通过 gws 命令行把 Google 通讯录目录中的姓名、邮箱与电话导出,写入指定 Google Sheets 表格的联系人工作表。

先看看示例

作者提供的示例,实际效果取决于你的输入和使用工具。

输入

把公司目录中的 100 位同事姓名、邮箱和电话导出到指定表格的 Contacts 工作表,便于核对。

输出

预期交付:Google Sheets 中名为 Contacts 的工作表,含表头与逐条联系人记录。(编辑说明,非实际运行结果)

方法说明

---
name: recipe-sync-contacts-to-sheet
description: "Export Google Contacts directory to a Google Sheets spreadsheet."
metadata:
  version: 0.22.5
  openclaw:
    category: "recipe"
    domain: "productivity"
    requires:
      bins:
        - gws
      skills:
        - gws-people
        - gws-sheets
---

# 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"]'`