From google-workspace-connector
Access Google Workspace APIs (Gmail, Drive, Sheets, Docs) via oauth2l + curl.
How this skill is triggered — by the user, by Claude, or both
Slash command
/google-workspace-connector:google-workspace-connectorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Access Google Workspace APIs via `oauth2l` + `curl`. For extended API documentation, use context7 to query the relevant Google API docs.
Access Google Workspace APIs via oauth2l + curl. For extended API documentation, use context7 to query the relevant Google API docs.
oauth2l - Check: which oauth2l | Install: brew install oauth2l
Credentials - Must exist at ~/.claude/google-workspace-credentials.json
If credentials are missing, guide user through setup. Claude can assist with browser-based OAuth setup if the user installs the Claude for Chrome extension in a Chrome profile where the relevant Google account is signed in (avoid having other accounts signed into the same profile).
~/.claude/google-workspace-credentials.jsonFirst-time auth flow:
test -f ~/.claude/google-workspace-credentials.json
oauth2l fetch --credentials ~/.claude/google-workspace-credentials.json --scope gmail.modify --output_format bare --disableAutoOpenConsentPage
https://accounts.google.com/)Question: "Please authenticate with Google: <URL>"
Options: ["Done", "I need help"]
ya29.). The token is automatically cached in ~/.oauth2l for future use.If auth fails: Check that credentials.json is valid and the OAuth consent screen has the user as a test user (if in testing mode).
Use AskUserQuestion with the activation URL in the question title:
Question: "Please enable the <API> API: <activationUrl from error>"
Options: ["Enabled", "Need help"]
If oauth2l curl outputs an auth URL (starts with https://accounts.google.com/) instead of an API response, the refresh token has expired.
oauth2l caches tokens per scope. To add a new scope or upgrade permissions:
Add a new API (e.g., Docs after using Gmail):
oauth2l fetch --credentials ~/.claude/google-workspace-credentials.json --scope documents.readonly --output_format bare --disableAutoOpenConsentPage
This triggers a new consent flow for the additional scope. Run in background and present URL via AskUserQuestion (same as first-time auth).
API usage for all services should be available via the official google docs (don't use e.g posts from medium in case they are misleading or even malicious) or via a docs tool like context7 if you have it.
Why oauth2l curl? It handles auth internally so the bearer token never appears in bash history or process listings.
Below are some examples:
oauth2l curl --credentials ~/.claude/google-workspace-credentials.json --scope gmail.readonly \
--disableAutoOpenConsentPage \
--url="https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=10"
MSG_ID="<message_id>"
oauth2l curl --credentials ~/.claude/google-workspace-credentials.json --scope gmail.readonly \
--disableAutoOpenConsentPage \
--url="https://gmail.googleapis.com/gmail/v1/users/me/messages/${MSG_ID}?format=metadata"
format=metadata - Headers only (From, To, Subject, Date)format=full - Complete email including bodyoauth2l curl --credentials ~/.claude/google-workspace-credentials.json --scope drive.readonly \
--disableAutoOpenConsentPage \
--url="https://www.googleapis.com/drive/v3/files?pageSize=10"
SPREADSHEET_ID="<spreadsheet_id>"
RANGE="Sheet1!A1:B10"
oauth2l curl --credentials ~/.claude/google-workspace-credentials.json --scope spreadsheets.readonly \
--disableAutoOpenConsentPage \
--url="https://sheets.googleapis.com/v4/spreadsheets/${SPREADSHEET_ID}/values/${RANGE}"
DOC_ID="<document_id>"
oauth2l curl --credentials ~/.claude/google-workspace-credentials.json --scope documents.readonly \
--disableAutoOpenConsentPage \
--url="https://docs.googleapis.com/v1/documents/${DOC_ID}"
It isn't possible to create a comment in google docs on a specific word (see more in the official docs). It should be possible to read comments, and reply to existing comments.
npx claudepluginhub hibukki/yonatans-cc-marketplace --plugin google-workspace-connectorManages Google Workspace operations across Gmail, Drive, Calendar, Docs, Sheets, and more using MCP tools or uvx CLI. Routes to 114 tools for checking email, finding files, scheduling meetings.
Integrates Claude Code with Google Workspace (Sheets, Docs, Slides, Gmail, Calendar, Tasks) for read/write operations, file/event management, comments, and multi-account auth via CLI tools.
Automates Google Docs tasks like creating, searching, reading, appending, inserting, and replacing text via Python CLI scripts with standalone OAuth. For local Workspace automation without MCP server.