google-workspace

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

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill google-workspace-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-workspace
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/skills/productivity/google-workspace
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill google-workspace-chensihakniroth

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 programmatically requires juggling OAuth2 setup, multiple API clients, and inconsistent tooling. This Skill provides a single JSON-output CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs with a guided, non-interactive OAuth flow that works from any chat platform. ## 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. - Guided OAuth Setup: A step-by-step setup script handles client credentials, PKCE authorization, token refresh, and revocation, with automatic fallback to the gws CLI when installed. - Use Case: Ask the 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 new Google Doc. ## Quick Start Ask the agent to check your Google authentication status and then list your unread emails from the last 24 hours.

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, and snippet fields.

How do I set up Google OAuth2 for CLI access?▼

Create a Desktop OAuth client in Google Cloud Console, download the JSON, then run setup.py with --client-secret, --auth-url, and --auth-code in sequence. The token is stored at ~/.anakot/google_token.json and refreshes automatically.

Can I use Gmail with an app password instead of OAuth?▼

Yes, for email-only needs the himalaya skill works with a Gmail App Password and takes about two minutes to set up. OAuth with this skill is only needed for Calendar, Drive, Sheets, or Docs access.

Why does Google OAuth fail with Error 403 access_denied?▼

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

Does this work on headless servers without a browser?▼

Yes, the OAuth flow is fully non-interactive and PKCE-based. The script prints an authorization URL, the user approves in any browser, and pastes back the redirected localhost URL or code for exchange.

What happens when the Google token is missing scopes?▼

The setup check reports AUTHENTICATED (partial) and lists the missing scopes. Revoke the token with setup.py --revoke and redo the authorization steps to grant the upgraded scopes.