skills/tier-1-foundation/google-workspace/SKILL.md
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.
npx skillsauth add pbc-os/agent-skills-public google-workspaceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
gws isn't installed yetOnce 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 |
node --versiongws auth setup can create one, or use an existing projectnpm install -g @googleworkspace/cli
Download from GitHub Releases.
cargo install --git https://github.com/googleworkspace/cli --locked
gws --version
gcloud)gws auth setup # Creates Cloud project, enables APIs, logs you in
This is the recommended path. It handles everything in one command.
gcloud~/.config/gws/client_secret.jsongws auth login
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,chat
Recommended 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>.
gws auth export --unmasked > credentials.json
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/credentials.json
gws drive files list # just works
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/service-account.json
gws drive files list
If another tool (e.g., gcloud) already manages tokens:
export GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)
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}'
| 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) |
gws <service> <resource> <method> [flags]
gws <service> +<helper-command> [flags]
# 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-run
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 summary
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 Chat
For common multi-step operations:
# See all available recipes
gws --help | grep recipe
Examples: batch-invite-to-event, create-gmail-filter, find-large-files, save-email-attachments, create-doc-from-template, sync-contacts-to-sheet, and many more.
--dry-run for destructive operations--format json for programmatic processing — don't parse table output| 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).
-s service1,service2 to select only what you neednode --versionnpx @googleworkspace/cli --versionnpm config get prefix--page-delay <MS> to slow down pagination--page-limit <N> to cap pagesAfter setup, install the skills that match your needs:
gmail skillgoogle-calendar skillgoogle-drive skillgoogle-sheets skillmorning-briefing skillsecrets-manager — Store gws credentials 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 dataPowered by gws by Justin Poehnelt — one CLI for all of Google Workspace.
tools
Generate and iteratively refine USPTO-style patent figure drawings from provisional patent application markdown files, using nano-banana for v1 generation and targeted single-fix edits for v2+ iteration.
data-ai
Weekly revenue / sales forecasting for small businesses with multiple locations or product lines. Blends recent trend + seasonal baseline + YoY growth with per-entity holiday multipliers and week-of-month adjustments. Ships autoresearch-compatible eval and parameters so you can tune it on your own historical data.
data-ai
Analyze email, calendar, and file patterns to discover repeatable workflows that AI agents can automate.
testing
Automated daily digest for small business owners. Combines email triage, calendar agenda, open tasks, and business KPIs into a single morning briefing. Composable — works with whatever data sources are available. Urgent emails require body inspection and explicit escalation signals — never classified from sender/timing metadata alone.