google-workspace

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

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

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? It gives an AI agent authenticated, scriptable access to Google Workspace services—Gmail, Calendar, Drive, Contacts, Sheets, and Docs—without requiring manual API integration or interactive browser-based OAuth flows. ## 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 & Docs: List and create calendar events, search/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 client credentials, PKCE auth URLs, code exchange, token refresh, and revocation—usable from CLI, Telegram, or Discord. - Use Case: Ask the agent to find unread emails from your manager this week, summarize them, create a follow-up calendar event, and save the summary to a new Google Doc. ## Quick Start Ask the agent to check your Google authentication status 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 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 list of matching messages. Use 'gmail get MESSAGE_ID' to retrieve the full body of a specific message.

How do I set up Google OAuth for a headless or CLI environment?

Run setup.py with --client-secret to store your OAuth client JSON, then --auth-url to get a consent URL. After authorizing in a browser, paste the redirect URL or code into --auth-code to complete the PKCE exchange and store the token.

Can I upload and download files to Google Drive with Python?

Yes, the drive upload command sends a local file with auto-detected MIME type, and drive download retrieves files by ID. Google-native files like Docs and Sheets are exported to sensible defaults such as PDF or CSV.

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

This happens when the stored token was granted fewer scopes than the skill requires, often after new write capabilities were added. Revoke the token with setup.py --revoke and redo the authorization flow to grant the upgraded scopes.

What is the difference between this skill and the himalaya email skill?

The himalaya skill handles email only using a Gmail App Password and takes minutes to set up. This skill covers the full Google Workspace suite—Calendar, Drive, Sheets, Docs, and Contacts—but requires creating a Google Cloud OAuth client.