使用 Google Admin SDK API 管理 Google Workspace 用户、群组、域名、设备及管理员目录数据。当用户需要列出并管理这些资源时,可使用此技能。
Google Admin.是一项面向实际任务的技能,主要用于Access Google Workspace Admin SDK 通过Google Admin API,并具有OAuth认证. 管理用户,组,域,设备,和目录数据. 此技能使用ClawLink作为宿主.。它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;
涉及批量任务时,还应保存进度,避免中断后重复操作。该技能适合用于一次性任务,也可以接入自动化工作流,与其他技能或上层代理配合完成更完整的业务链路;在组合使用时,应明确每一步的输入输出关系,并避免不同步骤之间出现参数冲突。

通过 Google Admin API(使用 OAuth 认证)访问 Google Workspace Admin SDK,用于管理用户、群组、域名、设备及目录数据。
本技能使用 ClawLink 托管连接流程与凭据,您无需自行配置 Google Admin API 访问权限。
| 第 1 步:安装 | 第 2 步:绑定账号 | 第 3 步:连接 Google Admin |
|---|---|---|
| 应用专属连接动图即将上线 | ||
| 在 OpenClaw 中运行安装命令 | 登录并批准设备 | 打开控制台并连接 Google Admin |
┌─────────────────┐ ┌──────────────┐ ┌──────────────────┐
│ OpenClaw │────▶│ ClawLink │────▶│ Google Admin SDK │
│ (用户会话) │ │ (OAuth) │ │ (REST) │
└─────────────────┘ └──────────────┘ └──────────────────┘
│ │ │
│ 1. 安装插件 │ │
│ 2. 绑定设备 │ │
│ 3. 连接 Google Admin │
│ │ 4. 获取安全令牌 │
│ │ 5. 代理请求 │
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ SKILL │ │ 控制台 │ │ Google │
│ 文件 │ │ 认证 │ │ Workspace│
└──────────┘ └──────────┘ └──────────┘
从 ClawHub 安装已验证的 ClawLink 插件。用户确认后,请完成全部设置,使 ClawLink 工具在下一次 OpenClaw 会话中可见。
openclaw plugins install clawhub:clawlink-plugin openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json openclaw gateway restart
然后告知用户:“OpenClaw 已重启。请单独发送 /new 消息以开启全新会话,再重新请求 Google Admin 功能。”
# 列出域内所有用户
clawlink_call_tool --tool "google_admin_list_all_users" --params '{}'
# 获取指定用户信息
clawlink_call_tool --tool "google_admin_get_a_user" --params '{"user_key": "user@example.com"}'
# 列出所有群组
clawlink_call_tool --tool "google_admin_list_all_groups" --params '{}'
所有 Google Admin 工具调用均由 ClawLink 自动完成认证,使用的是用户已连接的 Google Workspace 管理员账号。
会话中无需提供 API 密钥。 ClawLink 安全存储 OAuth 令牌,并代表用户将该令牌注入每一次 Google Admin API 请求中。
clawlink_begin_pairing 启动配对流程。clawlink_list_integrations 验证连接是否已激活。clawlink_list_integrations
响应:返回所有已连接的集成项。请在列表中查找 google-admin。
clawlink_list_tools --integration google-admin
响应:返回 Google Admin 的实时工具目录。
若 Google Admin 工具缺失或连接显示错误,请执行以下操作:
clawlink_list_integrations 验证连接状态clawlink_list_tools --integration google-admin| 工具 | 说明 | 模式 |
|---|---|---|
google_admin_list_all_users |
列出域内所有用户 | 读取 |
google_admin_get_a_user |
根据邮箱或 ID 获取用户详情 | 读取 |
google_admin_create_user |
创建新用户账号 | 写入 |
google_admin_update_user |
更新用户字段(姓名、部门等) | 写入 |
google_admin_delete_user |
删除用户账号 | 写入 |
google_admin_add_user_alias |
为用户添加邮箱别名 | 写入 |
google_admin_turn_off_2_step_verification |
为用户禁用两步验证(仅限管理员) | 写入 |
| 工具 | 说明 | 模式 |
|---|---|---|
google_admin_list_all_groups |
列出域内所有群组 | 读取 |
google_admin_get_group |
获取群组详情 | 读取 |
google_admin_create_group |
创建新群组 | 写入 |
google_admin_delete_group |
删除群组 | 写入 |
google_admin_add_user_to_group |
将用户加入群组 | 写入 |
google_admin_remove_user_from_group |
将用户从群组中移除 | 写入 |
| 工具 | 说明 | 模式 |
|---|---|---|
google_admin_list_all_organization_units |
列出所有组织单位 | 读取 |
google_admin_get_organization_unit |
获取组织单位详情 | 读取 |
google_admin_move_users_and_printers_to_ou |
将用户或打印机移至指定组织单位 | 写入 |
| 工具 | 说明 | 模式 |
|---|---|---|
google_admin_list_all_devices |
列出域内所有设备 | 读取 |
google_admin_get_device |
获取设备详情 | 读取 |
google_admin_update_device |
更新设备状态或属性 | 写入 |
| 工具 | 说明 | 模式 |
|---|---|---|
google_admin_get_domain_info |
获取域名信息 | 读取 |
google_admin_list_domains |
列出账号下的所有域名 | 读取 |
clawlink_call_tool --tool "google_admin_list_all_users"
--params '{
"customer": "my_customer",
"max_results": 100
}'
clawlink_call_tool --tool "google_admin_create_user"
--params '{
"primary_email": "newuser@example.com",
"name": {
"given_name": "New",
"family_name": "User"
},
"password": "secure-password-here"
}'
clawlink_call_tool --tool "google_admin_add_user_to_group"
--params '{
"group_email": "engineering@example.com",
"user_email": "newuser@example.com",
"role": "MEMBER"
}'
clawlink_call_tool --tool "google_admin_list_all_groups"
--params '{}'
clawlink_list_integrations 确认 Google Admin 是否已连接。clawlink_list_tools --integration google-admin 查看实时工具目录。google-admin 调用 clawlink_search_tools。┌─────────────────────────────────────────────────────────────┐
│ 读取操作(安全) │
│ list → get → search → describe → call │
│ │
│ 示例:列出用户 → 获取用户 → 展示详情 │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 写入操作(需用户确认) │
│ list → get → describe → preview → confirm → call │
│ │
│ 示例:描述工具 → 预览用户创建操作 │
│ → 用户批准 → 执行创建 │
└─────────────────────────────────────────────────────────────┘
clawlink_describe_tool。whenToUse、askBefore、safeDefaults、examples 及 followups 构建调用请求。clawlink_preview_tool。clawlink_call_tool 执行最终调用;仅当预览结果与用户意图完全一致时,才传入确认参数。customer 参数可设为 my_customer 或具体的客户 ID。| 状态 / 错误 | 含义 |
|---|---|
| 工具未找到 | 工具名称在当前目录中不存在。请使用 clawlink_list_tools --integration google-admin 核实。 |
| 缺少连接 | Google Admin 尚未连接。请引导用户访问 https://claw-link.dev/dashboard?add=google-admin。 |
404 Not Found |
用户、群组或资源在域中不存在。 |
403 Forbidden |
所连接账号不是 Workspace 管理员,或不具备执行该操作的权限。 |
| 写入被拒绝 | 用户未确认写入操作。执行写入前务必获得用户确认。 |
openclaw plugins list
/new 消息以重新加载工具目录。openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json openclaw gateway restart
/new 并重试。google-admin。clawlink_describe_tool 核实参数名称与类型。clawlink_preview_tool。由 ClawLink 提供支持 — OpenClaw 的集成中心
