google-calendar-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Calendar Automation via Rube MCP

通过Rube MCP实现Google Calendar自动化

Automate Google Calendar workflows including event creation, scheduling, availability checks, attendee management, and calendar browsing through Composio's Google Calendar toolkit.
借助Composio的Google Calendar工具包,自动化Google Calendar工作流,包括事件创建、日程安排、可用性检查、参会人管理以及日历浏览。

Prerequisites

前提条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active Google Calendar connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    googlecalendar
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 必须已连接Rube MCP(需具备RUBE_SEARCH_TOOLS权限)
  • 通过
    RUBE_MANAGE_CONNECTIONS
    连接活跃的Google Calendar,工具包为
    googlecalendar
  • 始终先调用
    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
    googlecalendar
  3. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth
  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
    ,指定工具包为
    googlecalendar
  3. 如果连接状态未显示为ACTIVE,请按照返回的授权链接完成Google OAuth认证
  4. 在运行任何工作流之前,确认连接状态为ACTIVE

Core Workflows

核心工作流

1. Create and Manage Events

1. 创建与管理事件

When to use: User wants to create, update, or delete calendar events
Tool sequence:
  1. GOOGLECALENDAR_LIST_CALENDARS
    - Identify target calendar ID [Prerequisite]
  2. GOOGLECALENDAR_GET_CURRENT_DATE_TIME
    - Get current time with proper timezone [Optional]
  3. GOOGLECALENDAR_FIND_FREE_SLOTS
    - Check availability before booking [Optional]
  4. GOOGLECALENDAR_CREATE_EVENT
    - Create the event [Required]
  5. GOOGLECALENDAR_PATCH_EVENT
    - Update specific fields of an existing event [Alternative]
  6. GOOGLECALENDAR_UPDATE_EVENT
    - Full replacement update of an event [Alternative]
  7. GOOGLECALENDAR_DELETE_EVENT
    - Delete an event [Optional]
Key parameters:
  • calendar_id
    : Use 'primary' for main calendar, or specific calendar ID
  • start_datetime
    : ISO 8601 format 'YYYY-MM-DDTHH:MM:SS' (NOT natural language)
  • timezone
    : IANA timezone name (e.g., 'America/New_York', NOT 'EST' or 'PST')
  • event_duration_hour
    : Hours (0+)
  • event_duration_minutes
    : Minutes (0-59 only; NEVER use 60+)
  • summary
    : Event title
  • attendees
    : Array of email addresses (NOT names)
  • location
    : Free-form text for event location
Pitfalls:
  • start_datetime
    must be ISO 8601; natural language like 'tomorrow' is rejected
  • event_duration_minutes
    max is 59; use
    event_duration_hour=1
    instead of
    event_duration_minutes=60
  • timezone
    must be IANA identifier; abbreviations like 'EST', 'PST' are NOT valid
  • attendees
    only accepts email addresses, not names; resolve names first
  • Google Meet link creation defaults to true; may fail on personal Gmail accounts (graceful fallback)
  • Organizer is auto-added as attendee unless
    exclude_organizer=true
适用场景:用户需要创建、更新或删除日历事件
工具执行顺序
  1. GOOGLECALENDAR_LIST_CALENDARS
    - 确定目标日历ID [前提步骤]
  2. GOOGLECALENDAR_GET_CURRENT_DATE_TIME
    - 获取带正确时区的当前时间 [可选]
  3. GOOGLECALENDAR_FIND_FREE_SLOTS
    - 预订前检查可用性 [可选]
  4. GOOGLECALENDAR_CREATE_EVENT
    - 创建事件 [必填]
  5. GOOGLECALENDAR_PATCH_EVENT
    - 更新现有事件的特定字段 [替代方案]
  6. GOOGLECALENDAR_UPDATE_EVENT
    - 完全替换更新事件内容 [替代方案]
  7. GOOGLECALENDAR_DELETE_EVENT
    - 删除事件 [可选]
关键参数
  • calendar_id
    :主日历使用'primary',或指定具体日历ID
  • start_datetime
    :ISO 8601格式'YYYY-MM-DDTHH:MM:SS'(不支持自然语言)
  • timezone
    :IANA时区名称(例如'America/New_York',不支持'EST'或'PST')
  • event_duration_hour
    :时长(小时,0及以上)
  • event_duration_minutes
    :时长(分钟,仅0-59;请勿使用60及以上)
  • summary
    :事件标题
  • attendees
    :邮箱地址数组(不支持姓名)
  • location
    :事件地点的自由文本
注意事项
  • start_datetime
    必须为ISO 8601格式;像'tomorrow'这样的自然语言会被拒绝
  • event_duration_minutes
    最大值为59;如需1小时,请使用
    event_duration_hour=1
    而非
    event_duration_minutes=60
  • timezone
    必须为IANA标识符;'EST'、'PST'等缩写无效
  • attendees
    仅接受邮箱地址,不支持姓名;需先解析姓名对应的邮箱
  • Google Meet链接创建默认开启;在个人Gmail账户上可能失败(需优雅降级)
  • 除非设置
    exclude_organizer=true
    ,否则组织者会自动被添加为参会人

2. List and Search Events

2. 列出与搜索事件

When to use: User wants to find or browse events on their calendar
Tool sequence:
  1. GOOGLECALENDAR_LIST_CALENDARS
    - Get available calendars [Prerequisite]
  2. GOOGLECALENDAR_FIND_EVENT
    - Search by title/keyword with time bounds [Required]
  3. GOOGLECALENDAR_EVENTS_LIST
    - List events in a time range [Alternative]
  4. GOOGLECALENDAR_EVENTS_INSTANCES
    - List instances of a recurring event [Optional]
Key parameters:
  • query
    /
    q
    : Free-text search (matches summary, description, location, attendees)
  • timeMin
    : Lower bound (RFC3339 with timezone offset, e.g., '2024-01-01T00:00:00-08:00')
  • timeMax
    : Upper bound (RFC3339 with timezone offset)
  • singleEvents
    : true to expand recurring events into instances
  • orderBy
    : 'startTime' (requires singleEvents=true) or 'updated'
  • maxResults
    : Results per page (max 2500)
Pitfalls:
  • Timezone warning: UTC timestamps (ending in 'Z') don't align with local dates; use local timezone offsets instead
  • Example: '2026-01-19T00:00:00Z' covers 2026-01-18 4pm to 2026-01-19 4pm in PST
  • Omitting
    timeMin
    /
    timeMax
    scans the full calendar and can be slow
  • pageToken
    in response means more results; paginate until absent
  • orderBy='startTime'
    requires
    singleEvents=true
适用场景:用户需要查找或浏览日历上的事件
工具执行顺序
  1. GOOGLECALENDAR_LIST_CALENDARS
    - 获取可用日历 [前提步骤]
  2. GOOGLECALENDAR_FIND_EVENT
    - 按标题/关键词结合时间范围搜索 [必填]
  3. GOOGLECALENDAR_EVENTS_LIST
    - 列出指定时间范围内的事件 [替代方案]
  4. GOOGLECALENDAR_EVENTS_INSTANCES
    - 列出重复事件的所有实例 [可选]
关键参数
  • query
    /
    q
    :自由文本搜索(匹配标题、描述、地点、参会人)
  • timeMin
    :时间下限(带时区偏移的RFC3339格式,例如'2024-01-01T00:00:00-08:00')
  • timeMax
    :时间上限(带时区偏移的RFC3339格式)
  • singleEvents
    :设为true可将重复事件展开为单独实例
  • orderBy
    :'startTime'(需配合singleEvents=true)或'updated'
  • maxResults
    :每页结果数(最多2500条)
注意事项
  • 时区警告:UTC时间戳(以'Z'结尾)与本地日期不匹配;请使用带本地时区偏移的时间戳
  • 示例:'2026-01-19T00:00:00Z'对应PST时区的2026-01-18 16:00至2026-01-19 16:00
  • 省略
    timeMin
    /
    timeMax
    会扫描整个日历,速度可能很慢
  • 响应中若包含
    pageToken
    ,表示还有更多结果;需分页查询直到该字段不存在
  • orderBy='startTime'
    必须配合
    singleEvents=true
    使用

3. Manage Attendees and Invitations

3. 管理参会人与邀请

When to use: User wants to add, remove, or update event attendees
Tool sequence:
  1. GOOGLECALENDAR_FIND_EVENT
    or
    GOOGLECALENDAR_EVENTS_LIST
    - Find the event [Prerequisite]
  2. GOOGLECALENDAR_PATCH_EVENT
    - Add attendees (replaces entire attendees list) [Required]
  3. GOOGLECALENDAR_REMOVE_ATTENDEE
    - Remove a specific attendee by email [Required]
Key parameters:
  • event_id
    : Unique event identifier (opaque string, NOT the event title)
  • attendees
    : Full list of attendee emails (PATCH replaces entire list)
  • attendee_email
    : Email to remove
  • send_updates
    : 'all', 'externalOnly', or 'none'
Pitfalls:
  • event_id
    is a technical identifier, NOT the event title; always search first to get the ID
  • PATCH_EVENT
    attendees field replaces the entire list; include existing attendees to avoid removing them
  • Attendee names cannot be resolved; always use email addresses
  • Use
    GMAIL_SEARCH_PEOPLE
    to resolve names to emails before managing attendees
适用场景:用户需要添加、删除或更新事件参会人
工具执行顺序
  1. GOOGLECALENDAR_FIND_EVENT
    GOOGLECALENDAR_EVENTS_LIST
    - 查找目标事件 [前提步骤]
  2. GOOGLECALENDAR_PATCH_EVENT
    - 添加参会人(会替换整个参会人列表) [必填]
  3. GOOGLECALENDAR_REMOVE_ATTENDEE
    - 通过邮箱删除特定参会人 [必填]
关键参数
  • event_id
    :事件唯一标识符(不透明字符串,而非事件标题)
  • attendees
    :完整的参会人邮箱列表(PATCH操作会替换整个列表)
  • attendee_email
    :要删除的参会人邮箱
  • send_updates
    :'all'、'externalOnly'或'none'
注意事项
  • event_id
    是技术标识符,而非事件标题;必须先搜索获取ID
  • PATCH_EVENT
    的参会人字段会替换整个列表;需包含现有参会人以避免误删
  • 无法解析参会人姓名;始终使用邮箱地址
  • 管理参会人前,可使用
    GMAIL_SEARCH_PEOPLE
    将姓名解析为邮箱

4. Check Availability and Free/Busy Status

4. 检查可用性与忙闲状态

When to use: User wants to find available time slots or check busy periods
Tool sequence:
  1. GOOGLECALENDAR_LIST_CALENDARS
    - Identify calendars to check [Prerequisite]
  2. GOOGLECALENDAR_GET_CURRENT_DATE_TIME
    - Get current time with timezone [Optional]
  3. GOOGLECALENDAR_FIND_FREE_SLOTS
    - Find free intervals across calendars [Required]
  4. GOOGLECALENDAR_FREE_BUSY_QUERY
    - Get raw busy periods for computing gaps [Fallback]
  5. GOOGLECALENDAR_CREATE_EVENT
    - Book a confirmed slot [Required]
Key parameters:
  • items
    : List of calendar IDs to check (e.g., ['primary'])
  • time_min
    /
    time_max
    : Query interval (defaults to current day if omitted)
  • timezone
    : IANA timezone for interpreting naive timestamps
  • calendarExpansionMax
    : Max calendars (1-50)
  • groupExpansionMax
    : Max members per group (1-100)
Pitfalls:
  • Maximum span ~90 days per Google Calendar freeBusy API limit
  • Very long ranges or inaccessible calendars yield empty/invalid results
  • Only calendars with at least freeBusyReader access are visible
  • Free slots responses may normalize to UTC ('Z'); check offsets
  • GOOGLECALENDAR_FREE_BUSY_QUERY
    requires RFC3339 timestamps with timezone
适用场景:用户需要查找空闲时段或检查忙碌时段
工具执行顺序
  1. GOOGLECALENDAR_LIST_CALENDARS
    - 确定要检查的日历 [前提步骤]
  2. GOOGLECALENDAR_GET_CURRENT_DATE_TIME
    - 获取带时区的当前时间 [可选]
  3. GOOGLECALENDAR_FIND_FREE_SLOTS
    - 查找跨日历的空闲时段 [必填]
  4. GOOGLECALENDAR_FREE_BUSY_QUERY
    - 获取原始忙碌时段以计算空闲间隔 [备选方案]
  5. GOOGLECALENDAR_CREATE_EVENT
    - 预订确认后的空闲时段 [必填]
关键参数
  • items
    :要检查的日历ID列表(例如['primary'])
  • time_min
    /
    time_max
    :查询时间范围(若省略则默认查询当天)
  • timezone
    :用于解析无时区时间戳的IANA时区
  • calendarExpansionMax
    :最多可检查的日历数(1-50)
  • groupExpansionMax
    :每个群组最多可展开的成员数(1-100)
注意事项
  • Google Calendar freeBusy API的最大查询跨度约为90天
  • 过长的时间范围或无法访问的日历会返回空或无效结果
  • 只有具备freeBusyReader权限的日历才可见
  • 空闲时段响应可能会被标准化为UTC(以'Z'结尾);需检查时区偏移
  • GOOGLECALENDAR_FREE_BUSY_QUERY
    需要带时区的RFC3339时间戳

Common Patterns

常见模式

ID Resolution

ID解析

  • Calendar name -> calendar_id:
    GOOGLECALENDAR_LIST_CALENDARS
    to enumerate all calendars
  • Event title -> event_id:
    GOOGLECALENDAR_FIND_EVENT
    or
    GOOGLECALENDAR_EVENTS_LIST
  • Attendee name -> email:
    GMAIL_SEARCH_PEOPLE
  • 日历名称 -> calendar_id:使用
    GOOGLECALENDAR_LIST_CALENDARS
    枚举所有日历
  • 事件标题 -> event_id:使用
    GOOGLECALENDAR_FIND_EVENT
    GOOGLECALENDAR_EVENTS_LIST
  • 参会人姓名 -> 邮箱:使用
    GMAIL_SEARCH_PEOPLE

Timezone Handling

时区处理

  • Always use IANA timezone identifiers (e.g., 'America/Los_Angeles')
  • Use
    GOOGLECALENDAR_GET_CURRENT_DATE_TIME
    to get current time in user's timezone
  • When querying events for a local date, use timestamps with local offset, NOT UTC
  • Example: '2026-01-19T00:00:00-08:00' for PST, NOT '2026-01-19T00:00:00Z'
  • 始终使用IANA时区标识符(例如'America/Los_Angeles')
  • 使用
    GOOGLECALENDAR_GET_CURRENT_DATE_TIME
    获取用户时区的当前时间
  • 查询本地日期的事件时,请使用带本地时区偏移的时间戳,而非UTC时间戳
  • 示例:PST时区使用'2026-01-19T00:00:00-08:00',而非'2026-01-19T00:00:00Z'

Pagination

分页处理

  • GOOGLECALENDAR_EVENTS_LIST
    returns
    nextPageToken
    ; iterate until absent
  • GOOGLECALENDAR_LIST_CALENDARS
    also paginates; use
    page_token
  • GOOGLECALENDAR_EVENTS_LIST
    会返回
    nextPageToken
    ;需循环查询直到该字段不存在
  • GOOGLECALENDAR_LIST_CALENDARS
    也支持分页;需使用
    page_token
    参数

Known Pitfalls

已知注意事项

  • Natural language dates: NOT supported; all dates must be ISO 8601 or RFC3339
  • Timezone mismatch: UTC timestamps don't align with local dates for filtering
  • Duration limits:
    event_duration_minutes
    max 59; use hours for longer durations
  • IANA timezones only: 'EST', 'PST', etc. are NOT valid; use 'America/New_York'
  • Event IDs are opaque: Always search to get event_id; never guess or construct
  • Attendees as emails: Names cannot be used; resolve with GMAIL_SEARCH_PEOPLE
  • PATCH replaces attendees: Include all desired attendees in the array, not just new ones
  • Conference limitations: Google Meet may fail on personal accounts (graceful fallback)
  • Rate limits: High-volume searches can trigger 403/429; throttle between calls
  • 自然语言日期:不支持;所有日期必须为ISO 8601或RFC3339格式
  • 时区不匹配:UTC时间戳与用于筛选的本地日期不匹配
  • 时长限制
    event_duration_minutes
    最大值为59;更长时长请使用小时参数
  • 仅支持IANA时区:'EST'、'PST'等缩写无效;请使用'America/New_York'
  • 事件ID为不透明字符串:必须通过搜索获取event_id;切勿猜测或构造
  • 参会人需使用邮箱:不支持姓名;需通过GMAIL_SEARCH_PEOPLE解析
  • PATCH操作会替换参会人列表:数组中需包含所有需要保留的参会人,而非仅新增的
  • 会议限制:Google Meet在个人账户上可能失败(需优雅降级)
  • 速率限制:高频率搜索可能触发403/429错误;需在调用间添加节流

Quick Reference

快速参考

TaskTool SlugKey Params
List calendars
GOOGLECALENDAR_LIST_CALENDARS
max_results
Create event
GOOGLECALENDAR_CREATE_EVENT
start_datetime
,
timezone
,
summary
Update event
GOOGLECALENDAR_PATCH_EVENT
calendar_id
,
event_id
, fields to update
Delete event
GOOGLECALENDAR_DELETE_EVENT
calendar_id
,
event_id
Search events
GOOGLECALENDAR_FIND_EVENT
query
,
timeMin
,
timeMax
List events
GOOGLECALENDAR_EVENTS_LIST
calendarId
,
timeMin
,
timeMax
Recurring instances
GOOGLECALENDAR_EVENTS_INSTANCES
calendarId
,
eventId
Find free slots
GOOGLECALENDAR_FIND_FREE_SLOTS
items
,
time_min
,
time_max
,
timezone
Free/busy query
GOOGLECALENDAR_FREE_BUSY_QUERY
timeMin
,
timeMax
,
items
Remove attendee
GOOGLECALENDAR_REMOVE_ATTENDEE
event_id
,
attendee_email
Get current time
GOOGLECALENDAR_GET_CURRENT_DATE_TIME
timezone
Get calendar
GOOGLECALENDAR_GET_CALENDAR
calendar_id

Powered by Composio
任务工具标识关键参数
列出日历
GOOGLECALENDAR_LIST_CALENDARS
max_results
创建事件
GOOGLECALENDAR_CREATE_EVENT
start_datetime
,
timezone
,
summary
更新事件
GOOGLECALENDAR_PATCH_EVENT
calendar_id
,
event_id
, 要更新的字段
删除事件
GOOGLECALENDAR_DELETE_EVENT
calendar_id
,
event_id
搜索事件
GOOGLECALENDAR_FIND_EVENT
query
,
timeMin
,
timeMax
列出事件
GOOGLECALENDAR_EVENTS_LIST
calendarId
,
timeMin
,
timeMax
重复事件实例
GOOGLECALENDAR_EVENTS_INSTANCES
calendarId
,
eventId
查找空闲时段
GOOGLECALENDAR_FIND_FREE_SLOTS
items
,
time_min
,
time_max
,
timezone
忙闲查询
GOOGLECALENDAR_FREE_BUSY_QUERY
timeMin
,
timeMax
,
items
删除参会人
GOOGLECALENDAR_REMOVE_ATTENDEE
event_id
,
attendee_email
获取当前时间
GOOGLECALENDAR_GET_CURRENT_DATE_TIME
timezone
获取日历信息
GOOGLECALENDAR_GET_CALENDAR
calendar_id

Composio提供支持