google-admin-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Workspace Admin Automation via Rube MCP

通过Rube MCP实现Google Workspace Admin自动化

Manage Google Workspace users, groups, memberships, and organizational settings programmatically using Rube MCP (Composio).
使用Rube MCP(Composio)以编程方式管理Google Workspace用户、群组、成员身份和组织设置。

Prerequisites

前提条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    google_admin
  • Google Workspace admin privileges for the authenticated account
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 必须已连接Rube MCP(需提供RUBE_SEARCH_TOOLS)
  • 通过
    RUBE_MANAGE_CONNECTIONS
    与工具包
    google_admin
    建立有效连接
  • 已认证账户需拥有Google Workspace管理员权限
  • 请始终先调用
    RUBE_SEARCH_TOOLS
    以获取当前工具架构

Setup

设置步骤

Get Rube MCP: Add
https://rube.app/mcp
as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
  1. Verify Rube MCP is available by confirming
    RUBE_SEARCH_TOOLS
    responds
  2. Call
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    google_admin
  3. If connection is not ACTIVE, follow the returned auth link to complete setup
  4. Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加
https://rube.app/mcp
作为MCP服务器。无需API密钥 — 只需添加端点即可使用。
  1. 确认
    RUBE_SEARCH_TOOLS
    可响应,以此验证Rube MCP是否可用
  2. 调用
    RUBE_MANAGE_CONNECTIONS
    并指定工具包
    google_admin
  3. 如果连接状态未显示为ACTIVE,请按照返回的认证链接完成设置
  4. 在运行任何工作流之前,确认连接状态显示为ACTIVE

Core Workflows

核心工作流

1. List All Users

1. 列出所有用户

Use
GOOGLE_ADMIN_LIST_USERS
to retrieve Google Workspace users with optional filtering and pagination.
Tool: GOOGLE_ADMIN_LIST_USERS
Parameters:
  - customer: Customer ID or "my_customer" (default)
  - domain: Domain to list users from
  - query: Filter string (e.g., "orgName=Engineering", "isSuspended=false")
  - max_results: Maximum results (1-500, default 100)
  - order_by: Sort by "email", "givenName", or "familyName"
  - sort_order: "ASCENDING" or "DESCENDING"
  - page_token: Pagination token
使用
GOOGLE_ADMIN_LIST_USERS
检索Google Workspace用户,支持可选过滤和分页。
Tool: GOOGLE_ADMIN_LIST_USERS
Parameters:
  - customer: 客户ID或"my_customer"(默认值)
  - domain: 要列出用户的域名
  - query: 过滤字符串(例如:"orgName=Engineering", "isSuspended=false")
  - max_results: 最大结果数(1-500,默认值100)
  - order_by: 排序依据,可选"email", "givenName", 或"familyName"
  - sort_order: "ASCENDING"或"DESCENDING"
  - page_token: 分页令牌

2. Create a New User

2. 创建新用户

Use
GOOGLE_ADMIN_CREATE_USER
to provision a new Google Workspace account.
Tool: GOOGLE_ADMIN_CREATE_USER
Parameters:
  - primary_email (required): User's email (e.g., "john.doe@company.com")
  - given_name (required): First name
  - family_name (required): Last name
  - password (required): Password meeting domain requirements
  - org_unit_path: Organizational unit (default: "/")
  - change_password_at_next_login: Force password change (default: true)
  - recovery_email: Recovery email address
  - recovery_phone: Recovery phone number
  - suspended: Whether account starts suspended (default: false)
使用
GOOGLE_ADMIN_CREATE_USER
创建新的Google Workspace账户。
Tool: GOOGLE_ADMIN_CREATE_USER
Parameters:
  - primary_email (必填): 用户邮箱(例如:"john.doe@company.com")
  - given_name (必填): 名字
  - family_name (必填): 姓氏
  - password (必填): 符合域名要求的密码
  - org_unit_path: 组织单元(默认值:"/")
  - change_password_at_next_login: 强制下次登录时修改密码(默认值:true)
  - recovery_email: 恢复邮箱地址
  - recovery_phone: 恢复电话号码
  - suspended: 账户是否初始为暂停状态(默认值:false)

3. List and Manage Groups

3. 列出和管理群组

Use
GOOGLE_ADMIN_LIST_GROUPS
to list groups, and
GOOGLE_ADMIN_CREATE_GROUP
to create new ones.
Tool: GOOGLE_ADMIN_LIST_GROUPS
Parameters:
  - customer: "my_customer" (default)
  - domain: Filter by domain
  - query: Filter (e.g., "name=Engineering*")
  - max_results: Max results (1-200)
  - order_by: Sort by "email"
  - page_token: Pagination token

Tool: GOOGLE_ADMIN_CREATE_GROUP
Parameters:
  - email (required): Group email address (e.g., "engineering@company.com")
  - name (required): Display name (e.g., "Engineering Team")
  - description: Group purpose description
使用
GOOGLE_ADMIN_LIST_GROUPS
列出群组,使用
GOOGLE_ADMIN_CREATE_GROUP
创建新群组。
Tool: GOOGLE_ADMIN_LIST_GROUPS
Parameters:
  - customer: "my_customer"(默认值)
  - domain: 按域名过滤
  - query: 过滤条件(例如:"name=Engineering*")
  - max_results: 最大结果数(1-200)
  - order_by: 按"email"排序
  - page_token: 分页令牌

Tool: GOOGLE_ADMIN_CREATE_GROUP
Parameters:
  - email (必填): 群组邮箱地址(例如:"engineering@company.com")
  - name (必填): 显示名称(例如:"Engineering Team")
  - description: 群组用途说明

4. Add Users to Groups

4. 添加用户至群组

Use
GOOGLE_ADMIN_ADD_USER_TO_GROUP
to manage group membership.
Tool: GOOGLE_ADMIN_ADD_USER_TO_GROUP
Parameters:
  - group_key (required): Group email or ID
  - user_key (required): User email or ID to add
  - role: "MEMBER" (default), "MANAGER", or "OWNER"
使用
GOOGLE_ADMIN_ADD_USER_TO_GROUP
管理群组成员身份。
Tool: GOOGLE_ADMIN_ADD_USER_TO_GROUP
Parameters:
  - group_key (必填): 群组邮箱或ID
  - user_key (必填): 要添加的用户邮箱或ID
  - role: "MEMBER"(默认值), "MANAGER", 或"OWNER"

5. Suspend or Unsuspend Users

5. 暂停或恢复用户

Use
GOOGLE_ADMIN_SUSPEND_USER
to toggle user account suspension.
Tool: GOOGLE_ADMIN_SUSPEND_USER
Parameters:
  - user_key (required): User's email or unique ID
  - suspended: true to suspend, false to unsuspend (default: true)
  - suspension_reason: Reason for suspension (optional)
使用
GOOGLE_ADMIN_SUSPEND_USER
切换用户账户的暂停状态。
Tool: GOOGLE_ADMIN_SUSPEND_USER
Parameters:
  - user_key (必填): 用户的邮箱或唯一ID
  - suspended: true表示暂停,false表示恢复(默认值:true)
  - suspension_reason: 暂停原因(可选)

6. Get User or Group Details

6. 获取用户或群组详情

Use
GOOGLE_ADMIN_GET_USER
or
GOOGLE_ADMIN_GET_GROUP
to retrieve detailed information.
Tool: GOOGLE_ADMIN_GET_USER
Parameters:
  - user_key (required): User's email or unique ID

Tool: GOOGLE_ADMIN_GET_GROUP
Parameters:
  - group_key (required): Group's email or unique ID
使用
GOOGLE_ADMIN_GET_USER
GOOGLE_ADMIN_GET_GROUP
检索详细信息。
Tool: GOOGLE_ADMIN_GET_USER
Parameters:
  - user_key (必填): 用户的邮箱或唯一ID

Tool: GOOGLE_ADMIN_GET_GROUP
Parameters:
  - group_key (必填): 群组的邮箱或唯一ID

Common Patterns

常见模式

  • Onboarding workflow: Use
    GOOGLE_ADMIN_CREATE_USER
    to provision the account, then
    GOOGLE_ADMIN_ADD_USER_TO_GROUP
    to add them to relevant groups.
  • Offboarding workflow: Use
    GOOGLE_ADMIN_SUSPEND_USER
    to disable access, or
    GOOGLE_ADMIN_DELETE_USER
    for permanent removal.
  • Audit group membership: Use
    GOOGLE_ADMIN_LIST_GROUPS
    to find groups, then
    GOOGLE_ADMIN_LIST_GROUP_MEMBERS
    to review members.
  • Bulk user management: List users with
    GOOGLE_ADMIN_LIST_USERS
    and filter queries, then iterate for updates.
  • Add email aliases: Use
    GOOGLE_ADMIN_ADD_USER_ALIAS
    to add alternative email addresses for a user.
  • Look up user details: Use
    GOOGLE_ADMIN_GET_USER
    to retrieve full profile information before making changes.
  • 入职工作流:使用
    GOOGLE_ADMIN_CREATE_USER
    创建账户,然后使用
    GOOGLE_ADMIN_ADD_USER_TO_GROUP
    将用户添加至相关群组。
  • 离职工作流:使用
    GOOGLE_ADMIN_SUSPEND_USER
    禁用访问权限,或使用
    GOOGLE_ADMIN_DELETE_USER
    永久删除账户。
  • 群组成员审计:使用
    GOOGLE_ADMIN_LIST_GROUPS
    查找群组,然后使用
    GOOGLE_ADMIN_LIST_GROUP_MEMBERS
    查看成员列表。
  • 批量用户管理:使用
    GOOGLE_ADMIN_LIST_USERS
    列出用户并过滤查询结果,然后迭代进行更新。
  • 添加邮箱别名:使用
    GOOGLE_ADMIN_ADD_USER_ALIAS
    为用户添加备用邮箱地址。
  • 查询用户详情:在进行更改之前,使用
    GOOGLE_ADMIN_GET_USER
    检索完整的用户资料信息。

Known Pitfalls

常见陷阱

  • Admin privileges required: All tools require the authenticated user to have Google Workspace administrator privileges. Non-admin accounts will receive permission errors.
  • Delete is permanent:
    GOOGLE_ADMIN_DELETE_USER
    permanently removes a user account. This action cannot be undone.
  • user_key accepts email or ID: The
    user_key
    parameter accepts both the user's primary email address and their unique numeric user ID.
  • Group membership replaces: When adding to groups, the
    role
    parameter controls the member's role. There is no "update role" -- remove and re-add to change roles.
  • Customer ID: Use
    "my_customer"
    as the
    customer
    parameter for the authenticated user's organization. Specific customer IDs look like
    C01abc123
    .
  • Pagination: Both user and group list endpoints may return paginated results. Always check for
    page_token
    in responses for complete results.
  • Password requirements:
    GOOGLE_ADMIN_CREATE_USER
    requires a password that meets the domain's password policy. Weak passwords will be rejected.
  • 需管理员权限:所有工具要求已认证用户拥有Google Workspace管理员权限。非管理员账户会收到权限错误。
  • 删除操作不可恢复
    GOOGLE_ADMIN_DELETE_USER
    会永久删除用户账户,此操作无法撤销。
  • user_key支持邮箱或ID
    user_key
    参数既支持用户的主邮箱地址,也支持其唯一数字用户ID。
  • 群组身份需重新添加:添加用户至群组时,
    role
    参数控制成员的角色。没有“更新角色”的操作 — 需先移除再重新添加以更改角色。
  • 客户ID:对于已认证用户所在的组织,使用
    "my_customer"
    作为
    customer
    参数。特定客户ID格式类似
    C01abc123
  • 分页处理:用户和群组列表端点可能返回分页结果。请始终检查响应中的
    page_token
    以获取完整结果。
  • 密码要求
    GOOGLE_ADMIN_CREATE_USER
    要求密码符合域名的密码策略。弱密码会被拒绝。

Quick Reference

快速参考

ActionToolKey Parameters
List users
GOOGLE_ADMIN_LIST_USERS
customer
,
domain
,
query
,
max_results
Get user details
GOOGLE_ADMIN_GET_USER
user_key
Create user
GOOGLE_ADMIN_CREATE_USER
primary_email
,
given_name
,
family_name
,
password
Delete user
GOOGLE_ADMIN_DELETE_USER
user_key
Suspend user
GOOGLE_ADMIN_SUSPEND_USER
user_key
,
suspended
Add user alias
GOOGLE_ADMIN_ADD_USER_ALIAS
(see full schema via RUBE_SEARCH_TOOLS)
List groups
GOOGLE_ADMIN_LIST_GROUPS
customer
,
domain
,
query
Get group details
GOOGLE_ADMIN_GET_GROUP
group_key
Create group
GOOGLE_ADMIN_CREATE_GROUP
email
,
name
,
description
Add to group
GOOGLE_ADMIN_ADD_USER_TO_GROUP
group_key
,
user_key
,
role
List group members
GOOGLE_ADMIN_LIST_GROUP_MEMBERS
(see full schema via RUBE_SEARCH_TOOLS)

Powered by Composio
操作工具关键参数
列出用户
GOOGLE_ADMIN_LIST_USERS
customer
,
domain
,
query
,
max_results
获取用户详情
GOOGLE_ADMIN_GET_USER
user_key
创建用户
GOOGLE_ADMIN_CREATE_USER
primary_email
,
given_name
,
family_name
,
password
删除用户
GOOGLE_ADMIN_DELETE_USER
user_key
暂停用户
GOOGLE_ADMIN_SUSPEND_USER
user_key
,
suspended
添加用户别名
GOOGLE_ADMIN_ADD_USER_ALIAS
(请通过RUBE_SEARCH_TOOLS查看完整架构)
列出群组
GOOGLE_ADMIN_LIST_GROUPS
customer
,
domain
,
query
获取群组详情
GOOGLE_ADMIN_GET_GROUP
group_key
创建群组
GOOGLE_ADMIN_CREATE_GROUP
email
,
name
,
description
添加至群组
GOOGLE_ADMIN_ADD_USER_TO_GROUP
group_key
,
user_key
,
role
列出群组成员
GOOGLE_ADMIN_LIST_GROUP_MEMBERS
(请通过RUBE_SEARCH_TOOLS查看完整架构)

Composio提供支持