📄 SKILL.md

← Vault

name: google-workspace

description: Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration via gws CLI (googleworkspace/cli). Uses OAuth2 with automatic token refresh via bridge script. Requires gws binary.

version: 2.0.0

author: Nous Research

license: MIT

required_credential_files:

- path: google_token.json

description: Google OAuth2 token (created by setup script)

- path: google_client_secret.json

description: Google OAuth2 client credentials (downloaded from Google Cloud Console)

metadata:

hermes:

tags: [Google, Gmail, Calendar, Drive, Sheets, Docs, Contacts, Email, OAuth, gws]

homepage: https://github.com/NousResearch/hermes-agent

related_skills: [himalaya]


Google Workspace

Gmail, Calendar, Drive, Contacts, Sheets, and Docs — powered by gws (Google's official Rust CLI). The skill provides a backward-compatible Python wrapper that handles OAuth token refresh and delegates to gws.

Architecture

`

google_api.py → gws_bridge.py → gws CLI

(argparse compat) (token refresh) (Google APIs)

`

Parse output with jq or read JSON directly.

Rules

1. Never send email or create/delete events without confirming with the user first.

2. Check auth before first use — run setup.py --check.

3. Use the Gmail search syntax reference for complex queries.

4. Calendar times must include timezone — ISO 8601 with offset or UTC.

5. Respect rate limits — avoid rapid-fire sequential API calls.

Troubleshooting

ProblemFix
--------------
NOT_AUTHENTICATEDRun setup Steps 2-5
REFRESH_FAILEDToken revoked — redo Steps 3-5
gws: command not foundInstall: npm install -g @googleworkspace/cli
HttpError 403Missing scope — $GSETUP --revoke then redo Steps 3-5
HttpError 403: Access Not ConfiguredEnable API in Google Cloud Console
Advanced Protection blocks authAdmin must allowlist the OAuth client ID

Revoking Access

`bash

$GSETUP --revoke

`