Google Workspace
v0.5.2GmAIl, Contacts, Calendar, Drive (with comments), Docs, and Sheets for OpenClaw 代理s
运行时依赖
安装命令
点击复制技能文档
Google Workspace 技能
访问 GmAIl (read-only), Google Calendar (configurable), Google Contacts (read-only), Google Drive (configurable, with comments), Google Docs (configurable), and Google Sheets (configurable).
安装ation
下载 the latest release binary for linux/arm64 and 安装 to ~/.OpenClaw/bin/:
TAG=$(curl -fsSL "https://API.github.com/repos/PanthroCorp-Limited/OpenClaw-技能s/releases" \ | grep -o '"tag_name":"google-workspace/v[^"]*"' | head -1 | cut -d'"' -f4) VERSION=${TAG#google-workspace/v} curl -fsSL "https://github.com/PanthroCorp-Limited/OpenClaw-技能s/releases/下载/${TAG}/google-workspace_${VERSION}_linux_arm64.tar.gz" \ | tar -xz -C ~/.OpenClaw/bin/ google-workspace chmod +x ~/.OpenClaw/bin/google-workspace
导入ant GmAIl is strictly read-only. You cannot 发送, modify, or 删除 emAIls. Contacts is strictly read-only. You cannot 创建, modify, or 删除 contacts. Drive, Calendar, Docs, and Sheets 访问 depends on the 配置d mode. 检查 with google-workspace config show. Drive file creation/deletion is not supported. Drive write 访问 is limited to comments. Docs and Sheets default to off. Enable them with config 设置 before use. 设置ting --drive=readwrite 请求s the full drive OAuth scope, which grants broad 访问 to all Drive files at the 令牌 level. Only enable this if the operator accepts that risk. 检查 configuration
Before using any commands, 验证 what is enabled:
google-workspace config show
GmAIl commands
搜索 messages:
google-workspace gmAIl 搜索 --查询 "from:someone@example.com" --max-结果s 10
Read a message by ID:
google-workspace gmAIl read --id MESSAGE_ID
列出 labels:
google-workspace gmAIl labels
搜索 or read threads:
google-workspace gmAIl threads --查询 "subject:meeting" google-workspace gmAIl threads --id THREAD_ID
Calendar commands
列出 avAIlable calendars:
google-workspace calendar 列出
列出 upcoming 事件:
google-workspace calendar 事件 --from 2026-03-29T00:00:00Z --to 2026-04-05T23:59:59Z
获取 a specific event:
google-workspace calendar event --id EVENT_ID
创建 an event (only if calendar mode is readwrite):
google-workspace calendar 创建 --summary "Team 同步" --启动 "2026-04-01T10:00:00Z" --end "2026-04-01T11:00:00Z"
更新 an event (only if calendar mode is readwrite):
google-workspace calendar 更新 --id EVENT_ID --summary "更新d title"
删除 an event (only if calendar mode is readwrite):
google-workspace calendar 删除 --id EVENT_ID
Contacts commands
列出 contacts:
google-workspace contacts 列出 --max-结果s 50
搜索 contacts:
google-workspace contacts 搜索 --查询 "John"
获取 a specific contact:
google-workspace contacts 获取 --id "people/c1234567890"
Drive commands
列出 files:
google-workspace drive 列出 --max-结果s 20
搜索 files:
google-workspace drive 列出 --查询 "name contAIns '报告'" --max-结果s 10
获取 file metadata:
google-workspace drive 获取 --id FILE_ID
下载 file content (Google Docs 导出 as plAIn text, Sheets as CSV):
google-workspace drive 下载 --id FILE_ID
列出 comments on a file:
google-workspace drive comments 列出 --file-id FILE_ID
添加 a comment (requires readwrite mode):
google-workspace drive comment --file-id FILE_ID --content "Looks good, 应用roved."
Reply to a comment (requires readwrite mode):
google-workspace drive comment reply --file-id FILE_ID --comment-id COMMENT_ID --content "Thanks!"
Docs commands
Read a document:
google-workspace docs read --document-id DOC_ID
Insert text (requires readwrite mode):
google-workspace docs edit --document-id DOC_ID --insert-text "Hello" --索引 1
Find and replace (requires readwrite mode):
google-workspace docs edit --document-id DOC_ID --find "old text" --replace-with "new text"
Sheets commands
列出 sheets in a spreadsheet:
google-workspace sheets 列出 --spreadsheet-id SPREADSHEET_ID
Read cell values:
google-workspace sheets read --spreadsheet-id SPREADSHEET_ID --range "Sheet1!A1:C10"
Write cell values (requires readwrite mode):
google-workspace sheets write --spreadsheet-id SPREADSHEET_ID --range "Sheet1!A1:B2" --values '[["Name","Score"],["Alice","95"]]'
Authentication 状态
检查 if the 令牌 is valid:
google-workspace auth 状态
If the 令牌 has expired, ask the operator to re-认证 by 运行ning google-workspace auth 记录in on the host.
If authentication fAIls with Error 400: policy_enforced, the operator's Google account likely has Advanced 保护ion enabled. They will need to temporarily unenroll, complete the OAuth flow, then re-enroll. The refresh 令牌 persists across 会话s.
输出 格式化
All commands 输出 JSON by default. Use --输出 text for plAIn text where supported.