SuperAPI AI 工具集

google-calendar

办公与效率

查看项目

更新于 10-15 10:28

技能介绍

用途

该技能用于自动化 Google Calendar 操作,包括列出事件、检查可用性、创建会议以及管理参会者。资料指出它特别适用于销售团队安排通话、寻找可向客户提议的可用时间段,以及管理周期性会议。

主要能力

支持的操作包括:

  • List(list_events):按条件列出即将到来的事件
  • Get(get_event):获取事件完整详情
  • Calendars(list_calendars):列出所有可访问的日历
  • Search(search_events):按关键词搜索事件
  • FreeBusy(get_freebusy):查询某时间段的空闲/忙碌状态
  • Find Slots(find_slots):寻找可用的会议时段
  • Create(create_event):创建新事件
  • Quick Add(quick_add):通过自然语言创建事件
  • Update(update_event):修改已有事件
  • Delete(delete_event):删除事件
  • Add Attendees(add_attendees):向事件添加人员
  • Remove Attendees(remove_attendees):从事件移除人员

支持使用 RRULE 格式设置重复规则,例如每日、每周、每周二、双周、每月、限制次数或截止日期。

使用方式

预检(始终首先运行)

python3 00-system/skills/google/google-master/scripts/google_auth.py --check --service calendar

退出码:0 表示可正常使用;1 表示需要登录,运行 --login;2 表示缺少凭据或依赖,参见 setup-guide。

常用命令示例

列出即将到来的事件:

python3 00-system/skills/google/google-calendar/scripts/calendar_operations.py list --max 10

列出今天的事件:

python3 00-system/skills/google/google-calendar/scripts/calendar_operations.py list --from "today" --to "tomorrow"

查询可用时段:

python3 00-system/skills/google/google-calendar/scripts/calendar_operations.py find-slots --duration 30 --from "2025-12-16" --to "2025-12-20" --hours "9-17"

创建事件:

python3 00-system/skills/google/google-calendar/scripts/calendar_operations.py create \
  --summary "Sales Call with Acme Corp" \
  --start "2025-12-16T14:00" \
  --end "2025-12-16T14:30" \
  --attendees "john@acme.com" \
  --reminder-popup 15

自然语言快速创建:

python3 00-system/skills/google/google-calendar/scripts/calendar_operations.py quick-add "Meeting with John tomorrow at 3pm"

也支持在 Python 中导入 calendar_operations 模块调用上述函数。默认操作主日历,可通过 --calendar 指定其他日历,日历 ID 可用 calendars 命令查询。

安全规则(强制)

资料强调以下规则必须遵守、不得绕过:

  1. 未经明确批准绝不创建事件:创建前始终展示完整事件详情,始终询问“Create this event? (yes/no)”,即使用户说“schedule a meeting”也不得自动创建,不得在循环中不经逐个确认就批量创建事件。
  2. 日历邀请会通知参会者:事件含参会者时,创建/更新/删除都会发送通知,须提醒用户“Attendees will receive a calendar invite!”。
  3. 重复事件需额外谨慎:修改可能影响所有实例,须警告用户并询问是修改单个实例还是全部。
  4. 删除需确认:删除前展示事件详情;若含参会者,提示“Attendees will be notified of cancellation”,并要求明确确认。
  5. 无需确认的安全操作:列出事件、获取事件详情、列出日历、搜索事件、检查可用性(freebusy)、寻找可用时段。

适用场景

资料给出的面向销售的常见工作流包括:查看今日日程并总结会议与空档、为客户寻找可用时段、安排销售通话、重新安排会议、设置周期性回访,以及查询某时间是否空闲。

设置与安全

首次设置需运行:pip install google-auth google-auth-oauthlib google-api-python-client,在 Google Cloud Console 创建 OAuth 凭据(启用 Google Calendar API,选择“Desktop app”),在 Nexus 根目录 .env 文件中配置 GOOGLE_CLIENT_ID、GOOGLE_CLIENT_SECRET、GOOGLE_PROJECT_ID,然后运行登录脚本。

权限范围包括读取所有日历和事件,以及创建、修改、删除事件。令牌本地存储在 01-memory/integrations/google-token.json;事件数据本地处理、不存储;令牌仅授予已认证用户自身日历的访问权限;分享该技能不会让他人访问你的日历;每位团队成员使用自己的 Google 账户认证。

关于收费、价格、平台支持范围等其他信息暂未提供。