google-contacts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoogle Contacts
Google Contacts
Independent, unofficial connector for Google Contacts. Not affiliated with, endorsed by, or sponsored by Google Contacts. "Google Contacts" is a trademark of its owner, used only to identify the service this connector works with.
Agent-callable tools for Google Contacts, wrapping the Google People API. Create, read, update, and delete a person's contacts; search contacts by name, email, or phone; set or remove contact photos; create and manage contact groups (labels) and their membership; and browse the auto-saved "other contacts" surface. Every tool uses a single OAuth connection; capability is gated by the granted scope.
独立的非官方Google Contacts连接器。与Google Contacts无关联、未获其认可或赞助。"Google Contacts"是其所有者的商标,仅用于标识本连接器所适配的服务。
可由Agent调用的Google Contacts工具,封装了Google People API。支持创建、读取、更新和删除个人联系人;按姓名、邮箱或电话搜索联系人;设置或移除联系人照片;创建和管理联系人组(标签)及其成员;浏览自动保存的“其他联系人”模块。所有工具均使用单一OAuth连接,功能权限由授予的范围决定。
When to use this
适用场景
- Saving, finding, updating, or deleting a person's Google Contacts ("add Jane to my contacts", "what's Bob's email", "remove this contact").
- Organizing contacts into groups/labels and adding or removing members.
- Setting or removing a contact's photo.
- Finding someone the user has interacted with (e.g. emailed) but never explicitly saved — the "other contacts" surface — and promoting them into saved contacts.
- 保存、查找、更新或删除个人Google Contacts(例如“把Jane添加到我的联系人”“Bob的邮箱是什么”“删除这个联系人”)。
- 将联系人整理到组/标签中,添加或移除成员。
- 设置或移除联系人照片。
- 查找用户曾互动过(例如通过邮件)但未明确保存的联系人——即“其他联系人”模块,并将其转为已保存联系人。
Setup
设置步骤
This is an agentskills.io skill.
If the connector has not been installed as a skill yet, install it first with (or your harness's own skill-install mechanism), then continue here.
npx skills add zapier/connectors --skill google-contactsThe connector runs on Node.js 22.18+. Pick the reference that matches how you're running it, and load it before doing anything else:
| You have... | Load |
|---|---|
An MCP-aware client — tools may already be loaded (e.g. | |
Terminal / subprocess access (you can run | |
| Only your own code, importing this package as a dependency | |
这是一款agentskills.io skill。
如果该连接器尚未作为skill安装,请先使用(或你的工具链自带的skill安装机制)进行安装,然后继续以下操作。
npx skills add zapier/connectors --skill google-contacts该连接器运行于**Node.js 22.18+**环境。根据你的运行方式选择对应的参考文档,并在操作前加载:
| 你的环境... | 加载方式 |
|---|---|
支持MCP的客户端——工具可能已加载(例如 | |
具备终端/子进程访问权限(可运行 | |
| 仅使用自有代码,将此包作为依赖导入 | |
Scripts
脚本
All scripts use the single connection.
google-contacts| Script | Script name | Connections | Description |
|---|---|---|---|
| | | Create a contact from structured name, email, phone, address, and organization fields. |
| | | Retrieve a single contact by resource name, with full field detail. |
| | | Update a contact; each array sent replaces that whole field, omitted fields are untouched. |
| | | Delete a contact from the account. |
| | | List the account's contacts, paginated — the primary resourceName resolver. |
| | | Search contacts by name, nickname, email, phone, or organization (prefix match). |
| | | Set or replace a contact's photo from a base64-encoded image. |
| | | Remove a contact's photo, reverting to the default avatar. |
| | | List contact groups (labels), user and system — the contactGroupResourceName resolver. |
| | | Get a single contact group, optionally with its member contact resource names. |
| | | Create a new user contact group (label). |
| | | Rename a user contact group (system groups cannot be renamed). |
| | | Delete a user contact group (label), optionally with its member contacts. |
| | | Add and/or remove contacts in a group without disturbing other memberships. |
| | | List auto-saved "other contacts" (people interacted with but never saved). |
| | | Search "other contacts" by name, email, or phone (prefix match). |
| | | Promote an "other contact" into saved contacts, returning an editable contact. |
所有脚本均使用单一连接。
google-contacts| 脚本 | 脚本名称 | 连接名称 | 描述 |
|---|---|---|---|
| | | 根据结构化的姓名、邮箱、电话、地址和组织字段创建联系人。 |
| | | 通过资源名称检索单个联系人,包含完整字段详情。 |
| | | 更新联系人;传入的每个数组会替换对应字段的全部内容,未传入的字段保持不变。 |
| | | 从账户中删除联系人。 |
| | | 分页列出账户中的联系人——主要的resourceName解析器。 |
| | | 按姓名、昵称、邮箱、电话或组织(前缀匹配)搜索联系人。 |
| | | 通过Base64编码的图片设置或替换联系人照片。 |
| | | 移除联系人照片,恢复为默认头像。 |
| | | 列出联系人组(标签),包括用户自定义和系统默认组——contactGroupResourceName解析器。 |
| | | 获取单个联系人组,可选择包含其成员联系人的资源名称。 |
| | | 创建新的用户自定义联系人组(标签)。 |
| | | 重命名用户自定义联系人组(系统组无法重命名)。 |
| | | 删除用户自定义联系人组(标签),可选择同时删除其成员联系人。 |
| | | 在组中添加和/或移除联系人,不影响其他成员关系。 |
| | | 列出自动保存的“其他联系人”(曾互动但未保存的联系人)。 |
| | | 按姓名、邮箱或电话(前缀匹配)搜索“其他联系人”。 |
| | | 将“其他联系人”转为已保存联系人,返回可编辑的联系人信息。 |
Auth
认证
Every shape passes auth as one connection selector, not the secret — a string. Every connector accepts (Zapier-managed auth — routes through Zapier's auth, retries, and governance layer); some also accept one or more direct-token resolvers (naming and count vary per connector) — check this connector's own resolvers rather than assuming. The prefix is optional; a bare value goes to the first resolver that claims it. Each script declares the connections it needs and the resolvers each accepts. The exact syntax for passing a connection (and how to see this connector's resolver list) differs by shape — see the reference you loaded above.
[<resolver>:]<value>zapier:<connection-id><resolver>:Google Contacts uses OAuth 2.0. The connector needs Google "contacts" access (read/write); the other-contacts tools additionally need "other contacts" read access. On a , reconnect with contacts access granted.
403- (recommended) — route through a Zapier-managed Google Contacts connection (
zapier:<connection-id>); Zapier holds the OAuth credential and refreshes it automatically. Find the id withGOOGLE_CONTACTS_ZAPIER_CONNECTION_ID.npx zapier-sdk list-connections GoogleContactsCLIAPI - (direct) — a Google OAuth access token sent as a bearer. Good for short-lived/testing use: Google access tokens expire ~1 hour after issue and this path does not refresh them, so the Zapier-managed connection is the durable choice.
env:GOOGLE_CONTACTS_ACCESS_TOKEN
所有操作均通过单个连接选择器传递认证信息,而非密钥——格式为的字符串。所有连接器均支持(由Zapier管理的认证——通过Zapier的认证、重试和治理层路由);部分连接器还支持一种或多种直接令牌解析器(名称和数量因连接器而异)——请查看本连接器的专属解析器,不要假设通用。前缀为可选;若仅传入值,则会交由第一个匹配的解析器处理。每个脚本都会声明所需的连接及支持的解析器。传递连接的具体语法(以及查看本连接器解析器列表的方式)因环境而异——请参考你之前加载的文档。
[<resolver>:]<value>zapier:<connection-id><resolver>:Google Contacts采用OAuth 2.0认证。连接器需要Google的“联系人”访问权限(读写);“其他联系人”工具还需要“其他联系人”的读取权限。若返回错误,请重新连接并授予联系人访问权限。
403- (推荐) —— 通过Zapier管理的Google Contacts连接(
zapier:<connection-id>)路由;Zapier会保存OAuth凭证并自动刷新。可通过GOOGLE_CONTACTS_ZAPIER_CONNECTION_ID获取连接ID。npx zapier-sdk list-connections GoogleContactsCLIAPI - (直接模式) —— 作为Bearer令牌发送的Google OAuth访问令牌。适用于短期/测试场景:Google访问令牌在颁发后约1小时过期,且此方式不会自动刷新令牌,因此Zapier管理的连接是更持久的选择。
env:GOOGLE_CONTACTS_ACCESS_TOKEN
Output format
输出格式
Every script returns a envelope:
{ data, meta }- — the script's result (the shape its
datadeclares; see the reference you loaded above for how to inspect a script's exact schema in your shape).outputSchema - — what validating
meta.outputDataValidationdid:data- — validated, nothing removed.
{ skipped: false, droppedPaths: null } - — validated, but those paths were stripped from
{ skipped: false, droppedPaths: [...], instruction }: fields the script returned from the API that thedatadoesn't declare. If you need them, re-run with output validation skipped.outputSchema - — validation was bypassed;
{ skipped: true }is the raw, unchecked script output.data
Reading dropped fields / . To receive the raw, unvalidated result, opt out of output validation (the exact syntax differs by shape — see the reference you loaded above). Input validation is never skipped.
skipOutputDataValidationTrimming the result / . To shrink a large result down to the fields you need, pass a jq expression that post-processes (again, exact syntax per shape). The jq runs against only, NOT the envelope, so write it rooted at (run the script's — or your shape's equivalent — to see its output schema). The transformed value replaces , is preserved, and the result is NOT re-validated against the output schema.
filterOutputDatadatadata{ data, meta }data--helpdatameta每个脚本都会返回一个结构:
{ data, meta }- —— 脚本的执行结果(其
data定义的结构;请参考你加载的文档,了解如何在你的环境中查看脚本的具体输出 schema)。outputSchema - —— 对
meta.outputDataValidation的验证结果:data- —— 已验证,未移除任何内容。
{ skipped: false, droppedPaths: null } - —— 已验证,但这些路径已从
{ skipped: false, droppedPaths: [...], instruction }中移除:脚本从API返回的字段未在data中声明。若需要这些字段,请跳过输出验证后重新运行。outputSchema - —— 已绕过验证;
{ skipped: true }为原始的、未经过检查的脚本输出。data
读取被丢弃的字段 / 。若要接收原始的未验证结果,请禁用输出验证(具体语法因环境而异——请参考你加载的文档)。输入验证永远不会被跳过。
skipOutputDataValidation精简结果 / 。若要将大型结果精简为你需要的字段,请传入一个jq表达式对进行后处理(同样,具体语法因环境而异)。jq仅针对运行,而非结构,因此表达式需以为根(运行脚本的命令——或你的环境中的等效命令——查看其输出schema)。转换后的值将替换,保持不变,且结果不会重新根据输出schema进行验证。
filterOutputDatadatadata{ data, meta }data--helpdatametaDisambiguation & refusals
歧义处理与拒绝规则
- Resolve names before writing. Before /
updateContact/deleteContacton a contact identified by name, callmodifyContactGroupMembers(orsearchContacts) and count exact, case-insensitive name matches. One match → act on it; don't over-ask. Two or more that tie → stop, list the candidates with a distinguishing field (email or phone), and ask which one — never silently pick. The same rule applies to groups vialistContacts.listContactGroups - Editing a list field replaces it. replaces each array you send (e.g.
updateContact) wholesale. To add a value without dropping the others,emailAddressesfirst, append, then send the full array. For group membership, prefergetContact(element-level) overmodifyContactGroupMembers.updateContact - Out of scope — decline, don't substitute. This connector does not do bulk/batch contact create-update-delete, Google Workspace directory lookups, or contact merge/dedupe. If asked for one of these, say it isn't supported and stop — do not call another tool and report it as done.
- No bulk operations — never loop to fake one. There is no batch endpoint. If asked to change, add, or delete a field across many or all contacts at once (e.g. "set everyone's company to Acme"), decline and explain it isn't supported — do not loop /
updateContact/deleteContactover multiple contacts to simulate a bulk operation. Acting on a single, explicitly-identified contact is fine; fanning out across the address book is not.modifyContactGroupMembers
- 写入前解析名称。在对通过姓名标识的联系人执行/
updateContact/deleteContact操作前,请调用modifyContactGroupMembers(或searchContacts)并统计完全匹配(不区分大小写)的姓名结果。若仅有一个匹配项,则执行操作;无需额外询问。若有两个或多个匹配项,则停止操作,列出带有区分字段(邮箱或电话)的候选者,并询问用户选择哪一个——切勿静默选择。此规则同样适用于通过listContacts处理组的场景。listContactGroups - 编辑列表字段会替换整个字段。会完全替换你传入的每个数组(例如
updateContact)。若要在不删除原有值的情况下添加新值,请先调用emailAddresses,追加新值,然后发送完整数组。对于组成员管理,优先使用getContact(元素级操作)而非modifyContactGroupMembers。updateContact - 超出范围的请求——拒绝,不要替代。本连接器不支持批量创建/更新/删除联系人、Google Workspace目录查询或联系人合并/去重。若收到此类请求,请告知用户不支持该功能并停止操作——切勿调用其他工具并谎称已完成。
- 不支持批量操作——切勿通过循环模拟。本连接器无批量端点。若用户要求一次性修改、添加或删除多个或全部联系人的某个字段(例如“将所有人的公司设置为Acme”),请拒绝并说明不支持该功能——切勿通过循环调用/
updateContact/deleteContact来模拟批量操作。对单个明确标识的联系人执行操作是允许的;但遍历整个通讯录进行操作是不允许的。modifyContactGroupMembers
References
参考文档
Load the matching reference file before working in that area:
| Reference | Covers | Load it when |
|---|---|---|
| Error codes, update replacement semantics, etag concurrency, search prefix matching + warmup, write propagation delay, resource name formats, contact group types, membership limits, other-contacts field restrictions, and pagination. | Before any tool call. |
在对应场景下工作前,请加载匹配的参考文档:
| 参考文档 | 涵盖内容 | 加载时机 |
|---|---|---|
| 错误代码、更新替换语义、etag并发、搜索前缀匹配与预热、写入传播延迟、资源名称格式、联系人组类型、成员限制、其他联系人字段限制及分页。 | 调用任何工具前。 |