google-workspace

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

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/swcstudiospace/aimeecodes --skill google-workspace-swcstudiospace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-workspace
Source: https://github.com/swcstudiospace/aimeecodes/tree/main/.aimee/skills/google-workspace
Command: npx skills add https://github.com/swcstudiospace/aimeecodes --skill google-workspace-swcstudiospace

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 Google Workspace services from an AI agent or terminal normally requires writing custom API integration code and handling OAuth flows manually. This Skill provides a ready-made, non-interactive OAuth setup and a unified JSON-output CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. ## 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 calendar events, search/upload/download/share Drive files, read and write spreadsheet ranges, and create or append to Docs. - Guided OAuth Setup: A step-by-step, agent-driven setup script handles client secrets, PKCE auth URLs, code exchange, token refresh, and revocation, working even on headless systems. - Use Case: Ask the agent to find unread emails from your manager this week, summarize them, create a follow-up calendar event, and log the action items into a Google Sheet — all through one authenticated CLI. ## Quick Start Ask the agent to check Google Workspace authentication and then search your 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 and send Gmail from the command line?▼

Use the google_api.py script with subcommands like gmail search "is:unread" to query messages and gmail send --to --subject --body to send mail. All results are returned as JSON, and standard Gmail search operators are supported.

How do I set up Google Workspace OAuth for a headless server?▼

Run setup.py --client-secret with your downloaded OAuth JSON, then --auth-url to get a consent URL, and --auth-code with the pasted redirect URL or code. The PKCE flow stores a pending session locally, so it works without a browser on the machine.

Can I use this with only Gmail and not the other Google APIs?▼

Yes, but for email-only needs the documentation recommends the himalaya skill with a Gmail App Password instead, which avoids creating a Google Cloud project. You can also limit consent scopes with --services email,calendar during setup.

Why does my Google token show AUTHENTICATED (partial) or missing scopes?▼

The token was authorized before newer scopes like Drive write or Docs create were added. Run setup.py --revoke, then repeat the auth-url and auth-code steps to grant the upgraded scope set.

What happens if the gws CLI is not installed?▼

The google_api.py wrapper automatically falls back to the Python google-api-python-client libraries while preserving the same JSON output contract. Drive upload and download always use the Python client because gws lacks multipart upload support.