google-workspace
Skill10 starsChanged 7 months agoMITView on GitHub
Set up the gws CLI to give your agent access to Gmail, Calendar, Drive, Sheets, Docs, Chat, Tasks, and every Google Workspace API. Foundation skill that enables all Google-powered communication, business ops, and automation skills.
- Reads credentials
- Installs packages
We split this skill into the rules it gives an agent
14 rules. 0 are common, 5 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 43 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 87
Create a project (or use an existing one)
- Distinctive: line 91
Add your email under Test users
- Distinctive: line 92
Create an OAuth client (type: Desktop app)
- Very specific: line 117
Recommended for SMBs: Start with gmail,calendar,drive,sheets — this covers 90% of small business needs.
- Very specific: line 141
If another tool (e.g., gcloud) already manages tokens:
- Distinctive: line 149
After auth, test each service you enabled:
- Very specific: line 244
Prefer --dry-run for destructive operations
- Very specific: line 245
Use --format json for programmatic processing — don't parse table output
- Very specific: line 267
Use -s service1,service2 to select only what you need
- Very specific: line 271
Ensure Node.js 18+ is installed: node --version
- Very specific: line 273
Check your PATH includes npm global bin: npm config get prefix
- Very specific: line 276
Use --page-delay <MS> to slow down pagination
- Very specific: line 277
Use --page-limit <N> to cap pages
- Distinctive: line 282
After setup, install the skills that match your needs:
“Common” is measured: kept by at least 6 in 10 of the 43 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Workspace
Give your agent access to all of Google Workspace through one CLI.
This skill sets up gws — a command-line tool that wraps every Google Workspace API (Gmail, Calendar, Drive, Sheets, Docs, Chat, Tasks, Meet, Forms, and more). It outputs structured JSON, making it ideal for AI agents.
Attribution: The
gwsCLI was created by Justin Poehnelt, Developer Relations Engineer at Google. It's the foundation that makes the entire Google Workspace skill tier possible.
gwsdoesn't ship a static list of commands. It reads Google's Discovery Service at runtime and builds its command surface dynamically. When Google adds an API endpoint,gwspicks it up automatically.
Triggers
- "set up google workspace"
- "connect gmail / calendar / drive / sheets"
- "install gws"
- "I need to read my email"
- "I need to manage my calendar"
- Any request that requires Google Workspace access and
gwsisn't installed yet
What This Enables
Once gws is set up, these skills become available:
| Tier | Skill | What It Does |
| 2 | gmail | Send, read, triage, reply, forward email |
| 2 | google-calendar | Manage events, check availability, meeting prep |
| 2 | google-chat | Send messages to Google Chat spaces |
| 3 | google-drive | Manage files, folders, shared drives |
| 3 | google-sheets | Read, write, create spreadsheets |
| 3 | google-docs | Create and edit documents |
| 3 | google-tasks | Manage task lists and to-dos |
| 5 | morning-briefing | Daily digest combining email, calendar, and business data |
Prerequisites
- Node.js 18+ — check with
node --version - A Google Cloud project —
gws auth setupcan create one, or use an existing project - A Google account with access to Google Workspace (works with personal Gmail too)
Installation
Option 1: npm (recommended)
npm install -g @googleworkspace/cliOption 2: Pre-built binary
Download from GitHub Releases.
Option 3: Build from source
cargo install --git https://github.com/googleworkspace/cli --lockedVerify installation
gws --versionAuthentication
Fastest Path (if you have gcloud)
gws auth setup # Creates Cloud project, enables APIs, logs you inThis is the recommended path. It handles everything in one command.
If you don't have gcloud
- Go to Google Cloud Console
- Create a project (or use an existing one)
- Go to APIs & Services → Credentials
- Configure OAuth consent screen:
- App type: External (testing mode is fine)
- Add your email under Test users
- Create an OAuth client (type: Desktop app)
- Download the client JSON → save as
~/.config/gws/client_secret.json - Run:
gws auth login
Scope Selection
Google limits unverified apps to ~25 scopes. Don't select all — pick what you need:
# Just email
gws auth login -s gmail
# Email + calendar
gws auth login -s gmail,calendar
# Email + calendar + drive + sheets
gws auth login -s gmail,calendar,drive,sheets
# Common SMB setup (email, calendar, drive, sheets, docs, tasks, chat)
gws auth login -s gmail,calendar,drive,sheets,docs,tasks,chatRecommended for SMBs: Start with gmail,calendar,drive,sheets — this covers 90% of small business needs. Add more services later with another gws auth login -s <additional-services>.
Headless / Server / CI
- Complete interactive auth on a machine with a browser
- Export credentials:
gws auth export --unmasked > credentials.json - On the headless machine:
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/credentials.json gws drive files list # just works
Service Account (server-to-server)
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/service-account.json
gws drive files listUsing an existing token
If another tool (e.g., gcloud) already manages tokens:
export GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)Verify Everything Works
After auth, test each service you enabled:
# Gmail — show unread count
gws gmail +triage --max 3
# Calendar — today's events
gws calendar +agenda
# Drive — list recent files
gws drive files list --params '{"pageSize": 5}'
# Sheets — list spreadsheets
gws drive files list --params '{"q": "mimeType=\"application/vnd.google-apps.spreadsheet\"", "pageSize": 5}'CLI Patterns
Global Flags
| Flag | Description |
--format <FORMAT> | json (default), table, yaml, csv |
--dry-run | Preview without calling the API |
--page-all | Auto-paginate (NDJSON output) |
--page-limit <N> | Max pages (default: 10) |
Command Structure
gws <service> <resource> <method> [flags]
gws <service> +<helper-command> [flags]Discovering Commands
# What services are available?
gws --help
# What can I do with gmail?
gws gmail --help
# What parameters does this method take?
gws schema gmail.users.messages.list
# Preview a request without executing
gws gmail users messages list --params '{"maxResults": 5}' --dry-runHelper Commands (shortcuts)
gws includes high-level helper commands prefixed with + that simplify common tasks:
gws gmail +triage # Unread inbox summary
gws gmail +send # Send an email
gws gmail +reply # Reply to a message
gws calendar +agenda # Today's events
gws calendar +insert # Create an event
gws drive +upload # Upload a file
gws sheets +read # Read spreadsheet values
gws sheets +append # Append a row
gws workflow +standup-report # Today's meetings + tasks
gws workflow +meeting-prep # Prep for next meeting
gws workflow +weekly-digest # Week summaryBuilt-in Workflows
gws includes cross-service workflows that combine multiple APIs:
gws workflow +standup-report # Calendar agenda + open tasks
gws workflow +meeting-prep # Attendees + agenda + linked docs
gws workflow +weekly-digest # Week's meetings + unread count
gws workflow +email-to-task # Convert email → task
gws workflow +file-announce # Share Drive file in ChatBuilt-in Recipes (40+)
For common multi-step operations:
# See all available recipes
gws --help | grep recipeExamples: batch-invite-to-event, create-gmail-filter, find-large-files, save-email-attachments, create-doc-from-template, sync-contacts-to-sheet, and many more.
Security Rules
- Never output secrets (API keys, tokens) directly
- Always confirm with the user before executing write/delete commands
- Prefer
--dry-runfor destructive operations - Use
--format jsonfor programmatic processing — don't parse table output - Credentials are encrypted at rest (AES-256-GCM) with OS keyring
Credential Storage
| Method | Where Stored | Best For |
| Interactive OAuth | ~/.config/gws/ (encrypted) | Local development, personal use |
| Service Account | Wherever you put the JSON key | Servers, CI/CD, automation |
| Environment variable | GOOGLE_WORKSPACE_CLI_TOKEN | Short-lived sessions |
| Exported credentials | Your chosen path | Headless servers |
For production/server use, consider storing the service account key or exported credentials in your secrets manager (see secrets-manager skill).
Troubleshooting
"Access blocked" on login
- You need to add your email as a Test user in the OAuth consent screen
- Go to: Google Cloud Console → APIs & Services → OAuth consent screen → Test users → Add
Scope errors
- Your app may be in testing mode with limited scopes
- Use
-s service1,service2to select only what you need - Or publish the app for broader scope access
"gws: command not found"
- Ensure Node.js 18+ is installed:
node --version - Try:
npx @googleworkspace/cli --version - Check your PATH includes npm global bin:
npm config get prefix
Rate limits
- Use
--page-delay <MS>to slow down pagination - Use
--page-limit <N>to cap pages - For bulk operations, add delays between calls
What's Next
After setup, install the skills that match your needs:
- Need email management? →
gmailskill - Need scheduling? →
google-calendarskill - Need file management? →
google-driveskill - Need reporting/tracking? →
google-sheetsskill - Want a daily briefing? →
morning-briefingskill
Related Skills
secrets-manager— Storegwscredentials securely for server deploymentsgmail— Email management for SMBsgoogle-calendar— Calendar management for SMBsgoogle-drive— File management for SMBsgoogle-sheets— Spreadsheet operations for SMBsmorning-briefing— Daily digest combining all Google Workspace data
Powered by gws by Justin Poehnelt — one CLI for all of Google Workspace.
Other versions47 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 47
- NousResearch/hermes-agent★ 259ksame name
- google/adk-recipes★ 11ksame name
- google/adk-samples★ 11ksame name
- mitsuhiko/agent-commands★ 3.2ksame name
- mitsuhiko/agent-stuff★ 3.2ksame name
- math-inc/OpenGauss★ 1.3ksame name
- Tommy-yw/RunbookHermes★ 546same name
- aivrar/portable-hermes-agent★ 239same name
- RedWoodOG/Hermes-Desktop★ 177same name
- HybridAIOne/hybridclaw★ 159same name
37 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use heartmula, jupyter-live-kernel and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
math-incSkillheartmula
Set up and run HeartMuLa, the open-source music generation model family (Suno-like). Generates full songs from lyrics + tags with multilingual support.
Also in 6 projects that use this
math-incSkilljupyter-live-kernel
Use a live Jupyter kernel for stateful, iterative Python execution via hamelnb. Load this skill when the task involves exploration, iteration, or inspecting intermediate results — data science, ML experimentation, API exploration, or building up complex code step-by-step. Uses terminal to run CLI commands against a live Jupyter kernel. No new tools required.
Also in 5 projects that use this
Tommy-ywSkillsongwriting-and-ai-music
Songwriting craft, AI music generation prompts (Suno focus), parody/adaptation techniques, phonetic tricks, and lessons learned. These are tools and ideas, not rules. Break any of them when the art calls for it.
Also in 7 projects that use this
john-data-chenSkillteams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
Also in 5 projects that use this
Tommy-ywSkillmaps
Location intelligence — geocode a place, reverse-geocode coordinates, find nearby places (46 POI categories), driving/walking/cycling distance + time, turn-by-turn directions, timezone lookup, bounding box + area for a named place, and POI search within a rectangle. Uses OpenStreetMap + Overpass + OSRM. Free, no API key.
Also in 8 projects that use this
emanueleieloSkillimessage
Send and read iMessage/SMS via Messages.app using the imsg CLI. List chats, view history, send messages to phone numbers or Apple IDs.
Also in 11 projects that use this
- +5 more from math-inc
In this repository23 other files it gives its agents.
- data-lake-starterSkill
- mcp-guideSkill
- secrets-managerSkill
- semantic-layer-auditSkill
- gmailSkill
- google-calendarSkill
- google-chatSkill
- slack-directorySkill
- slackSkill
- google-docsSkill
- google-driveSkill
- google-sheetsSkill
- google-tasksSkill
- brand-identitySkill
- creative-matrixSkill
- google-adsSkill
- nano-bananaSkill
- autoresearchSkill
- long-running-agentSkill
- morning-briefingSkill
- playbook-discoverySkill
- revenue-forecasterSkill
- patent-figureSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

