google-workspace

Manage Gmail, Calendar, Drive, Sheets, and Docs through OAuth-authenticated CLI commands.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill google-workspace-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-workspace
Source: https://github.com/CHENHUI-X/toolbox/tree/main/official-skills/productivity/google-workspace
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill google-workspace-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-api-python-client, google-auth, google-auth-oauthlib, google-auth-httplib2, httplib2, pyasn1, and includes scripts (resource) and references (resource) components.

What problem does it solve? Accessing Gmail, Calendar, Drive, Contacts, Sheets, and Docs programmatically requires juggling OAuth2 setup, token refresh, and multiple Google API clients. This Skill provides a single non-interactive setup flow and one JSON-output CLI covering all six services, so an agent can read mail, schedule events, and edit documents without manual API plumbing. ## Core Features & Use Cases - Gmail operations: Search with full Gmail query syntax, read full message bodies, send plain or HTML email, reply with proper threading headers, and manage labels. - Calendar, Drive, Sheets, and Docs: List and create timezone-aware events, upload/download/share/trash Drive files, read and write spreadsheet ranges, and create or append to Docs including multi-tab documents. - Guided OAuth setup: A step-by-step non-interactive flow (client secret, auth URL, code exchange, verification) that works over CLI, Telegram, or Discord, with automatic token refresh and scope-triaging. - Use Case: Ask for a morning brief and the agent loads the daily-brief reference to combine your Calendar schedule, conflicts, and urgent unread Gmail into one action-oriented summary. ## Quick Start Check my unread Gmail from the last 24 hours and list my calendar events for the rest of this week.

Frequently Asked Questions about google-workspace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search and read Gmail messages from the command line?

Run the google_api.py script with gmail search followed by a Gmail query like "is:unread newer_than:1d" to get a JSON array of matching messages. Then use gmail get with a message ID to retrieve the full body, headers, and labels.

How do I set up Google OAuth for Gmail and Calendar API access?

Create a Desktop OAuth client in Google Cloud Console, enable the needed APIs, then run setup.py with --client-secret, --auth-url, and --auth-code in sequence. The flow is non-interactive and stores a self-refreshing token at ~/.hermes/google_token.json.

Can I upload and share Google Drive files programmatically?

Yes, the drive upload command sends a local file with auto-detected MIME type, and drive share grants reader or writer access to a user, domain, or anyone with a link. Downloads export Google-native files to sensible defaults like PDF or CSV.

Why does Google API authentication fail with insufficient permission errors?

HttpError 403 Insufficient Permission means the stored token lacks the required OAuth scope for that operation. Revoke the token with setup.py --revoke and redo the authorization flow to grant the upgraded scopes.

When should I use an app password instead of full Google Workspace OAuth?

If you only need email, a Gmail App Password with an IMAP-based tool is simpler and takes minutes with no Google Cloud project. OAuth setup is only worth it when you also need Calendar, Drive, Sheets, or Docs access.