google-workspace

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

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/episvr/USTB-2026-SummerInternship --skill google-workspace-episvr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-workspace
Source: https://github.com/episvr/USTB-2026-SummerInternship/tree/main/hermes-config/skills/productivity/google-workspace
Command: npx skills add https://github.com/episvr/USTB-2026-SummerInternship --skill google-workspace-episvr

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Accessing Google Workspace services from an AI agent or terminal normally requires juggling multiple APIs, OAuth flows, and SDKs. This Skill provides a single authenticated CLI that covers Gmail, Calendar, Drive, Contacts, Sheets, and Docs with consistent JSON output. ## Core Features & Use Cases - Gmail Operations: Search with Gmail query syntax, read full messages, send plain or HTML email, reply in threads, and manage labels. - Calendar, Drive, Sheets, and Docs: List and create events, upload/download/share Drive files, read and write spreadsheet ranges, and create or append to Docs. - Non-Interactive OAuth Setup: A step-by-step setup script handles credential storage, PKCE authorization, token refresh, and revocation, designed to be driven by an agent on CLI, Telegram, or Discord. - Use Case: Ask your agent to find unread emails from your boss this week, summarize them, create a follow-up calendar event with attendees, and save the summary to a Google Doc — all through one authenticated interface. ## Quick Start Ask the agent to check Google Workspace authentication and then search Gmail for unread messages from the last day.

Frequently Asked Questions about google-workspace

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

FAQPage Schema
How do I search Gmail from the command line?▼

Run the google_api.py script with the gmail search subcommand and a Gmail query string, such as "is:unread newer_than:1d". Results return as a JSON array with id, from, subject, date, snippet, and labels for each message.

How to send email with the Gmail API using Python?▼

Use the gmail send subcommand with --to, --subject, and --body arguments, adding --html for HTML content. The script builds a MIME message, base64-encodes it, and sends it through the Gmail API using your stored OAuth token.

Does this work without the gws CLI installed?▼

Yes. The google_api.py wrapper prefers the gws binary when available but falls back to the google-api-python-client library for all operations. Drive upload and download always use the Python client because gws lacks multipart upload support.

Why does Google OAuth setup fail with access_denied 403?▼

Error 403 access_denied means your Google account is not listed as a test user for the OAuth app while it is in Testing mode. Add your account under Audience → Test users in the Google Cloud Console, then retry the authorization URL.

What should I use for Gmail-only access without a Google Cloud project?▼

For email-only needs, use the himalaya skill with a Gmail App Password instead of this skill. It takes about two minutes to set up and requires no OAuth client or Google Cloud project.

Why does the token report missing scopes after authentication?▼

The token stores only the scopes actually granted during consent, so deselecting permissions or using an older token leaves gaps. Revoke access with setup.py --revoke and repeat the authorization steps to grant the full scope set.