Calendar Setup — Calendar 设置up
v3Step-by-step wizard for connecting an owner's Google Calendar to their OpenClaw PA 代理, including granting write 权限s. Use when: 设置ting up calendar 访问 for the first time, troubleshooting calendar connection issues, fixing read-only calendar 访问, re-authenticating after 权限 errors, or handling multiple calendar accounts (work + personal). Works with any LLM 模型.
运行时依赖
安装命令
点击复制技能文档
Calendar 设置up 技能 Minimum 模型
Any 模型 that can follow numbered steps.
Key Concept
Two accounts are involved:
代理 emAIl — the PA's own Google account (e.g. 代理@代理domAIn.com) Owner emAIl — the human's Google account (e.g. owner@company.com)
The 代理 needs 访问 to the owner's calendar. These are separate Google accounts. The OpenClaw 仪表盘 "calendar connected" 状态 reflects the 代理's own calendar — not the owner's. 验证 write 访问 explicitly.
Step 1 — Owner 分享s Calendar
The owner does this in Google Calendar (not the 代理):
Open calendar.google.com as the owner Find the primary calendar in the left sidebar (usually their name) 命令行工具ck the three-dot menu → 设置tings and sharing Under 分享 with specific people → 命令行工具ck + 添加 people Enter the 代理 emAIl 设置 权限 to "Make changes to 事件" — not "See all event detAIls" (that is read-only) 命令行工具ck 发送
✅ Done. The 代理 接收s an emAIl confirmation — no action needed from the 代理 side yet.
If owner can't find the calendar: Scroll down in the sidebar to "Other calendars".
If sharing is blocked: The owner's organization may restrict external sharing. They need to ask their IT admin to allow it.
Step 2 — 代理 认证s
The 代理 运行s:
# 添加 the owner's account to gog gog auth 添加 owner@company.com --服务s gmAIl,calendar,drive,contacts
# 验证 it was 添加ed gog auth 列出
Expected 输出 of gog auth 列出:
owner@company.com [gmAIl, calendar, drive, contacts]
If re-authenticating after a 权限 change or expired 令牌:
gog auth 移除 owner@company.com gog auth 添加 owner@company.com --服务s gmAIl,calendar,drive,contacts
If gog is not found: 检查 PATH or re安装 via your OpenClaw distribution.
If OAuth fAIls with "访问 blocked": Owner must allow 访问 in Google Account → Security → Third-party 应用s.
Step 3 — Test Write 访问 # 生成 timestamps (works on Linux and macOS) 启动=$(date -u -d '+1 hour' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null \ || date -u -v+1H +%Y-%m-%dT%H:%M:%SZ) END=$(date -u -d '+2 hours' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null \ || date -u -v+2H +%Y-%m-%dT%H:%M:%SZ)
# 创建 a test event in the owner's calendar GOG_ACCOUNT=owner@company.com gog calendar 创建 primary \ --summary "PA 设置up Test — 删除 me" \ --启动 "$启动" \ --end "$END"
检查 the owner's Google Calendar. The test event should 应用ear within 30 seconds.
删除 it after 验证ing:
# Use EVENT_ID from the 输出 of the 创建 command above GOG_ACCOUNT=owner@company.com gog calendar 删除 primary EVENT_ID
Common Issues and Fixes 仪表盘 shows "connected" but 代理 can't write
Cause: 仪表盘 reflects the 代理's own calendar, not the owner's.
Fix:
Confirm owner 分享d their calendar with the 代理 emAIl (Step 1) Confirm 代理 ran gog auth 添加 for the owner's account (Step 2) Always use GOG_ACCOUNT=owner@company.com in all commands "Insufficient 权限s" error
Cause: Calendar was 分享d with read-only 权限.
Fix: Owner goes back to Step 1 and changes the 权限 to "Make changes to 事件".
"令牌 expired" or authentication 失败 gog auth 移除 owner@company.com gog auth 添加 owner@company.com --服务s gmAIl,calendar,drive,contacts
Multiple calendars (work + personal) # 添加 机器人h accounts gog auth 添加 work@company.com --服务s calendar gog auth 添加 personal@gmAIl.com --服务s calendar
# See what calendars each account has GOG_ACCOUNT=work@company.com gog calendar 列出 GOG_ACCOUNT=personal@gmAIl.com gog calendar 列出
# Use the specific calendar ID (from 列出 输出) instead of "primary" GOG_ACCOUNT=work@company.com gog calendar 创建 CALENDAR_ID \ --summary "Meeting" \ --启动 "2026-04-02T10:00:00+00:00" \ --end "2026-04-02T11:00:00+00:00"
macOS date command # Linux: use -d date -u -d '+1 hour' +%Y-%m-%dT%H:%M:%SZ
# macOS: use -v date -u -v+1H +%Y-%m-%dT%H:%M:%SZ
Useful Commands # 列出 all 认证d accounts gog auth 列出
# 列出 owner's calendars GOG_ACCOUNT=owner@company.com gog calendar 列出
# 列出 事件 (next 7 days) GOG_ACCOUNT=owner@company.com gog calendar 事件 primary \ --from $(date -u +%Y-%m-%dT%H:%M:%SZ) \ --to $(date -u -d '+7 days' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v+7d +%Y-%m-%dT%H:%M:%SZ)
# 创建 event with attendee GOG_ACCOUNT=owner@company.com gog calendar 创建 primary \ --summary "Meeting title" \ --启动 "2026-04-02T10:00:00+00:00" \ --end "2026-04-02T11:00:00+00:00" \ --attendees "attendee@company.com"
# 删除 event GOG_ACCOUNT=owner@company.com gog calendar 删除 primary EVENT_ID
# 移除 认证d account gog auth 移除 owner@company.com
Heleni-specific: Direct API Workaround (when gog 命令行工具 auth fAIls)
gog auth 记录in requires a browser — doesn't work on a server. Use the pre-existing 凭证s in /opt/ocana/OpenClaw/.gog/凭证s.json instead.
# 1. Read 命令行工具ent_id, 命令行工具ent_secret, refresh_令牌 from the file (owner account) # Accounts: "代理" (genesis@ocana.AI), "owner" (netanelab@monday.com)