Recipe Sync Contacts To Sheet

作者 googleworkspacea3768d0e82ad无许可证31K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Export Google Contacts directory to a Google Sheets spreadsheet.

AI 生成的概览

将 Google 通讯录目录导出到 Google 表格,生成包含姓名、邮箱和电话的行。

功能
该配方描述了一个三步流程,用于把 Google 通讯录中的联系人数据迁移到 Google 表格。它先按姓名、邮箱地址和电话号码的读取掩码列出目录人员,再创建带有 Name、Email、Phone 表头的表格,然后为每位联系人追加一行。最终产物是一份包含目录清单的表格。
适用场景
当你需要一份 Google Workspace 目录清单的表格副本时使用,例如在通讯录界面之外查看、共享或处理联系人信息。它适合对目录资料进行一次性或重复导出,而非个人联系人管理。
运行要求
需要 gws 命令行工具以及 gws-people 和 gws-sheets 技能,并需具备访问 Google 通讯录和 Google 表格的已认证权限。还需要目标表格 ID。该技能不附带脚本,仅为操作说明。

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", "[email protected]", "+1-555-0100"]'

来源与署名

来源:googleworkspace/cli位于skills/recipe-sync-contacts-to-sheet提交a3768d0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架