AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

google-workspace-cli

Use for Google Workspace admin or automation from the gws CLI (Gmail, Drive, Sheets, Calendar, Docs, Chat, Tasks). Sets up auth with auth_setup_guide.py, diagnoses with gws_doctor.py, runs recipes with gws_recipe_runner.py and audits security with workspace_audit.py.

Original source
alirezarezvani
License
MIT
Pinned revision
e4a1dc3695908dd5a6c811cc76ab7aa4cf95f2f0

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read alirezarezvani--google-workspace-cli at revision e4a1dc3695908dd5a6c811cc76ab7aa4cf95f2f0, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 5

references/recipes-cookbook.md

Google Workspace CLI Recipes Cookbook

Catalog of 43 recipe command templates (a local catalog shipped with this skill, not built into the gws CLI) organized by category, with command sequences and persona mapping.

These are command templates, not verified invocations. The gws CLI (github.com/googleworkspace/cli) generates its command surface dynamically from Google's Discovery Service and is pre-v1.0. Before running any command below, verify its exact syntax with gws --help, gws <service> --help, or gws schema <service>.<resource>.<method>. Verified upstream patterns: discovery commands are gws <service> <resource> <method> --params '{...}' --json '{...}'; helpers are +-prefixed (gws gmail +send, gws calendar +agenda, gws workflow +standup-report).


Recipe Categories

| Category | Count | Description | |----------|-------|-------------| | Email | 8 | Gmail operations — send, search, label, filter | | Files | 7 | Drive file management — upload, share, export | | Calendar | 6 | Events, scheduling, meeting prep | | Reporting | 5 | Activity summaries and analytics | | Collaboration | 5 | Chat, Docs, Tasks teamwork | | Data | 4 | Sheets read/write and contacts | | Admin | 4 | User and group management | | Cross-Service | 4 | Multi-service workflows |


Email Recipes (8)

send-email

Send an email with optional attachments.

gws gmail users.messages send me --to "[email protected]" \
  --subject "Subject" --body "Body text" [--attachment file.pdf]

reply-to-thread

Reply to an existing email thread.

gws gmail users.messages reply me --thread-id <THREAD_ID> --body "Reply text"

forward-email

Forward an email to another recipient.

gws gmail users.messages forward me --message-id <MSG_ID> --to "[email protected]"

search-emails

Search emails using Gmail query syntax.

gws gmail users.messages list me --query "from:[email protected] after:2025/01/01" --json

Query examples: is:unread, has:attachment, label:important, newer_than:7d

archive-old

Archive read emails older than N days.

gws gmail users.messages list me --query "is:read older_than:30d" --json
# Extract IDs, then batch modify to remove INBOX label

label-manager

Create and organize Gmail labels.

gws gmail users.labels list me --json
gws gmail users.labels create me --name "Projects/Alpha"

filter-setup

Create auto-labeling filters.

gws gmail users.settings.filters create me \
  --criteria '{"from":"[email protected]"}' \
  --action '{"addLabelIds":["Label_123"],"removeLabelIds":["INBOX"]}'

unread-digest

Get digest of unread emails.

gws gmail users.messages list me --query "is:unread" --limit 20 --json

Files Recipes (7)

upload-file

Upload a file to Google Drive.

gws drive files create --name "Report Q1" --upload report.pdf --parents <FOLDER_ID>

create-sheet

Create a new Google Spreadsheet.

gws sheets spreadsheets create --title "Budget 2026" --json

share-file

Share a Drive file with a user or domain.

gws drive permissions create <FILE_ID> --type user --role writer --emailAddress "[email protected]"

export-file

Export a Google Doc/Sheet as PDF.

gws drive files export <FILE_ID> --mime "application/pdf" --output report.pdf

list-files

List files in a Drive folder.

gws drive files list --parents <FOLDER_ID> --json

find-large-files

Find the largest files in Drive.

gws drive files list --orderBy "quotaBytesUsed desc" --limit 20 --json

cleanup-trash

Empty Drive trash.

gws drive files emptyTrash

Calendar Recipes (6)

create-event

Create a calendar event with attendees.

gws calendar events insert primary \
  --summary "Sprint Planning" \
  --start "2026-03-15T10:00:00" --end "2026-03-15T11:00:00" \
  --attendees "[email protected]" --location "Room A"

quick-event

Create event from natural language.

gws calendar +insert ...   # see: gws calendar +insert --help

find-time

Find available time slots for a meeting.

gws calendar freebusy query --json '{"timeMin": "...", "timeMax": "...", "items": [{"id": "[email protected]"}]}'  # verify: gws schema calendar.freebusy.query

today-schedule

Show today's calendar events.

gws calendar events list primary \
  --timeMin "$(date -u +%Y-%m-%dT00:00:00Z)" \
  --timeMax "$(date -u +%Y-%m-%dT23:59:59Z)" --json

meeting-prep

Prepare for an upcoming meeting.

gws workflow +meeting-prep

Output: Agenda, attendee list, related Drive files, previous meeting notes.

reschedule

Move an event to a new time.

gws calendar events patch primary <EVENT_ID> \
  --start "2026-03-16T14:00:00" --end "2026-03-16T15:00:00"

Reporting Recipes (5)

standup-report

Generate daily standup from calendar and tasks.

gws workflow +standup-report

Output: Yesterday's events, today's schedule, pending tasks, blockers.

weekly-summary

Summarize week's emails, events, and tasks.

gws workflow +weekly-digest

drive-activity

Report on Drive file activity.

gws drive activities list --json

email-stats

Email volume statistics for the past 7 days.

gws gmail users.messages list me --query "newer_than:7d" --json | python3 output_analyzer.py --count

task-progress

Report on task completion.

gws tasks tasks list <TASKLIST_ID> --json | python3 output_analyzer.py --group-by "status"

Collaboration Recipes (5)

share-folder

Share a Drive folder with a team.

gws drive permissions create <FOLDER_ID> --type group --role writer --emailAddress "[email protected]"

create-doc

Create a Google Doc with initial content.

gws docs documents create --title "Meeting Notes - March 15" --json

chat-message

Send a message to a Google Chat space.

gws chat spaces.messages create <SPACE_NAME> --text "Deployment complete!"

list-spaces

List Google Chat spaces.

gws chat spaces list --json

task-create

Create a task in Google Tasks.

gws tasks tasks insert <TASKLIST_ID> --title "Review PR #42" --due "2026-03-16"

Data Recipes (4)

sheet-read

Read data from a spreadsheet range.

gws sheets spreadsheets.values get <SHEET_ID> --range "Sheet1!A1:D10" --json

sheet-write

Write data to a spreadsheet.

gws sheets spreadsheets.values update <SHEET_ID> --range "Sheet1!A1" \
  --values '[["Name","Score"],["Alice",95],["Bob",87]]'

sheet-append

Append rows to a spreadsheet.

gws sheets spreadsheets.values append <SHEET_ID> --range "Sheet1!A1" \
  --values '[["Charlie",92]]'

export-contacts

Export contacts list.

gws people people.connections list me --personFields names,emailAddresses --json

Admin Recipes (4)

list-users

List all users in the Workspace domain.

gws admin users list --domain company.com --json

Prerequisites: Admin SDK API enabled, admin.directory.user.readonly scope.

list-groups

List all groups in the domain.

gws admin groups list --domain company.com --json

user-info

Get detailed user information.

gws admin users get [email protected] --json

audit-logins

Audit recent login activity.

gws admin activities list login --json

Cross-Service Recipes (4)

morning-briefing

Today's events + unread emails + pending tasks.

python3 scripts/gws_recipe_runner.py --run morning-briefing --dry-run  # prints the command sequence

Combines: Calendar events, Gmail unread count, Tasks pending.

eod-wrap

End-of-day summary: completed, pending, tomorrow's schedule.

python3 scripts/gws_recipe_runner.py --run eod-wrap --dry-run

project-status

Aggregate project status from Drive, Sheets, Tasks.

python3 scripts/gws_recipe_runner.py --run project-status --dry-run

inbox-zero

Process inbox to zero: label, archive, reply, or create task.

python3 scripts/gws_recipe_runner.py --run inbox-zero --dry-run

Persona Mapping

| Persona | Top Recipes | |---------|-------------| | Executive Assistant | morning-briefing, today-schedule, find-time, send-email, meeting-prep, eod-wrap | | Project Manager | standup-report, create-event, find-time, task-create, project-status, weekly-summary | | HR | list-users, user-info, send-email, create-event, create-doc, export-contacts | | Sales | send-email, search-emails, create-event, find-time, create-doc, share-file | | IT Admin | list-users, list-groups, audit-logins, drive-activity, find-large-files, cleanup-trash | | Developer | sheet-read, sheet-write, upload-file, chat-message, task-create, send-email | | Marketing | send-email, create-doc, share-file, upload-file, create-sheet, chat-message | | Finance | sheet-read, sheet-write, sheet-append, create-sheet, export-file, share-file | | Legal | create-doc, share-file, export-file, search-emails, upload-file, audit-logins | | Customer Support | search-emails, send-email, reply-to-thread, label-manager, task-create, inbox-zero |