跳到正文
Skillpedia
自动化260k · #607

google-workspace

它能做什么

这项技能把你的 AI 连接到你的 Google 账户,使其能够读取和管理 Gmail、日历、云端硬盘、通讯录、文档和表格。适合通过 Google 服务处理工作和生活事务的人。

适用场景

  • ✓你让 AI 检查或管理你的 Gmail、日历或云端硬盘的时候。
  • ✓你想每天获得一份日历和需要关注的邮件简报的时候。
  • ✓你想创建或修改 Google 文档或表格的时候。

技能链接

https://github.com/NousResearch/hermes-agent/blob/main/skills/productivity/google-workspace/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/NousResearch/hermes-agent/blob/main/skills/productivity/google-workspace/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请查看我明天的日历,并告诉我今天有哪些客户的邮件需要回复。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能使用一次性的 Google 登录授权,以及一个命令行包装器。它为每个请求运行 Google 工具,并以结构化的格式返回结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Google Workspace

Gmail, Calendar, Drive, Contacts, Sheets, and Docs — through Hermes-managed OAuth and a thin CLI wrapper. When gws is installed, the skill uses it as the execution backend for broader Google Workspace coverage; otherwise it falls back to the bundled Python client implementation.

References

  • references/gmail-search-syntax.md — Gmail search operators (is:unread, from:, newer_than:, etc.)
  • references/daily-brief.md — daily/morning brief procedure: schedule + conflicts + meeting prep + urgent mail from Gmail and Calendar. Load it when the user asks for a morning brief, meeting preparation, or "what's on my calendar and what email needs attention."

Scripts

  • scripts/setup.py — OAuth2 setup (run once to authorize)
  • scripts/google_api.py — compatibility wrapper CLI. It prefers gws for operations when available, while preserving Hermes' existing JSON output contract.

First-Time Setup

The setup is fully non-interactive — you drive it step by step so it works on CLI, Telegram, Discord, or any platform.

Run the setup script with Python from the Hermes environment, not an unrelated system Python. --install-deps syncs Hermes' declared Google extra through PM; after syncing, restart Hermes and rerun the OAuth command. If Hermes is not importable, use hermes setup first rather than installing packages with pip.

Define a shorthand first:

GSETUP="python ${HERMES_HOME:-$HOME/.hermes}/skills/productivity/google-workspace/scripts/setup.py"

Step 0: Check if already set up

$GSETUP --check

If it prints AUTHENTICATED, skip to Usage — setup is already done.

Step 1: Triage — ask the user what they need

Before starting OAuth setup, ask the user TWO questions:

Question 1: "What Google services do you need? Just email, or also Calendar/Drive/Sheets/Docs?"

  • Email only → They don't need this skill at all. Use the himalaya skill instead — it works with a Gmail App Password (Settings → Security → App Passwords) and takes 2 minutes to set up. No Google Cloud project needed. Load the himalaya skill and follow its setup instructions.

  • Email + Calendar → Continue with this skill, but use --services email,calendar during auth so the consent screen only asks for the scopes they actually need.

  • Calendar/Drive/Sheets/Docs only → Continue with this skill and use a narrower --services set like calendar,drive,sheets,docs.

  • Full Workspace access → Continue with this skill and use the default all service set.

Question 2: "Does your Google account use Advanced Protection (hardware security keys required to sign in)? If you're not sure, you probably don't — it's something you would have explicitly enrolled in."

  • No / Not sure → Normal setup. Continue below.
  • Yes → Their Workspace admin must add the OAuth client ID to the org's allowed apps list before Step 4 will work. Let them know upfront.

Step 2: Create OAuth credentials (one-time, ~5 minutes)

Tell the user:

You need a Google Cloud OAuth client. This is a one-time setup:

  1. Create or select a project: https://console.cloud.google.com/projectselector2/home/dashboard
  2. Enable the required APIs from the API Library: https://console.cloud.google.com/apis/library Enable: Gmail API, Google Calendar API, Google Drive API, Google Sheets API, Google Docs API, People API
  3. Create the OAuth client here: https://console.cloud.google.com/apis/credentials Credentials → Create Credentials → OAuth 2.0 Client ID
  4. Application type: "Desktop app" → Create
  5. If the app is still in Testing, add the user's Google account as a test user here: https://console.cloud.google.com/auth/audience Audience → Test users → Add users
  6. Download the JSON file and tell me the file path

Important Hermes CLI note: if the file path starts with /, do NOT send only the bare path as its own message in the CLI, because it can be mistaken for a slash command. Send it in a sentence instead, like: The JSON file path is: ~/Downloads/client_secret_....json

Once they provide the path:

$GSETUP --client-secret /path/to/client_secret.json

If they paste the raw client ID / client secret values instead of a file path, write a valid Desktop OAuth JSON file for them yourself, save it somewhere explicit (for example ~/Downloads/hermes-google-client-secret.json), then run --client-secret against that file.

常见问题

如何连接我的账户?

技能说明只需运行一次设置脚本,在浏览器中批准访问,之后 AI 就可以使用这些服务。

需要额外的软件包吗?

技能说明应通过 Hermes 的包管理器同步 Google 扩展,而不是直接使用普通的 pip install。

它能帮助搜索吗?

能。技能包含 Gmail 的搜索运算符,例如 is:unread 和 newer_than。

详情

作者的原始描述

Gmail, Calendar, Drive, Docs, Sheets via gws CLI or Python.

repo: NousResearch/hermes-agent

热度

GitHub 星标
260k
排名
#607
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能