Xpersona
G

Google Power Tools

CLAWHUB · Unverified

Google Workspace CLI. Make sure to use this skill whenever the user mentions Gmail, email, inbox, send email, read email, check mail, draft email, send invit... Skill: Google Power Tools Owner: cyrushuang1995-cmyk Summary: Google Workspace CLI. Make sure to use this skill whenever the user mentions Gmail, email, inbox, send email, read email, check mail, draft email, send invit... Tags: latest:2.1.9 Version history: v2.1.9 | 2026-04-11T07:22:08.518Z | user Rename skill from 'GWS - Google Workspace CLI' to 'Google Power Tools' for better clarity and appeal. Keep all functiona

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17f63rsgdmz8vzxctvfzybyt183gssr:gws-google-workspace
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-cyrushuang1995-cmyk-gws-google-workspace/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

149,865 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: gws
description: "Google Workspace CLI. Make sure to use this skill whenever the user mentions Gmail, email, inbox, send email, read email, check mail, draft email, send invite; Google Drive, upload file, download file, cloud storage, share file; Google Docs, create a document, write a doc; Google Calendar, schedule meeting, check schedule, view events, agenda, share calendar; Google Sheets, spreadsheet; Google Slides, make a slide, presentation; Google Forms, survey, create a form; Google Tasks, to-do, reminder; Google Meet, meeting recording; Contacts, People, address book, contact list; Classroom — or any Google Workspace / G Suite operation, even if they don't say 'gws'. If authorization fails or scope is missing, guide the user through the complete OAuth setup process."
license: MIT
homepage: https://github.com/googleworkspace/cli
metadata:
  {
    "openclaw":
      {
        "requires":
          {
            "bins": ["gws", "jq", "base64", "python3"],
            "env": ["GOOGLE_WORKSPACE_PROJECT_ID", "GOOGLE_WORKSPACE_CLI_KEYRING_BACKEND"],
            "config": ["~/.config/gws/client_secret.json"]
          },
        "install":
          [
            {
              "id": "npm",
              "kind": "npm",
              "package": "@googleworkspace/cli",
              "global": true,
              "bins": ["gws"],
              "label": "Install gws CLI (npm)",
            },
          ],
      },
  }
---

# GWS — Google Workspace CLI

Google's official Workspace CLI (`@googleworkspace/cli`). Covers Gmail, Drive, Calendar, Sheets, Docs, Slides, Forms, Tasks, People, Meet, and Classroom via Google API Discovery Service.

GitHub: https://github.com/googleworkspace/cli

## Setup

```bash
export GOOGLE_WORKSPACE_PROJECT_ID=<your-project-id>
export GOOGLE_WORKSPACE_CLI_KEYRING_BACKEND=file
gws auth login          # first-time auth
gws auth login --full   # re-auth with all scopes if 403 error
```

Full setup guide: `references/setup.md`

---

## Global Patterns (ALL commands)

### `tail -n +2` before `jq`

`gws` writes `Using keyring backend: file` to stdout before JSON. Always skip it:

```bash
gws gmail users messages list --params '{"userId":"me"}' 2>/dev/null | tail -n +2 | jq '.'
```

### `--params` vs `--json`

- **`--params`**: URL/query parameters (`userId`, `id`, `q`, `maxResults`)
- **`--json`**: Request body (`removeLabelIds`, `raw`, resource JSON)

```bash
gws gmail users messages modify \
  --json '{"removeLabelIds":["UNREAD"]}' \
  --params '{"userId":"me","id":"MSG_ID"}'
```

### Email body extraction

Most emails have only HTML. Try plain text first, then strip HTML tags:

```bash
raw=$(gws gmail users messages get --params '{"userId":"me","id":"MSG_ID","format":"full"}' 2>/dev/null | tail -n +2)
body=$(echo "$raw" | jq -r '(.payload.parts[]? | select(.mimeType=="text/plain") .body.data // empty)' | head -1 | base64 -d 2>/dev/null)
if [ -z "$body" ] || [ ${#body} -lt 10 ]; then
  body=$(echo "$raw" | jq -r '(.pay

_meta.json

{
  "ownerId": "kn72fzdgbm3d63kqwrmnqzepk182dh9g",
  "slug": "gws-google-workspace",
  "version": "2.1.9",
  "publishedAt": 1775892128518
}

references/calendar.md

# Calendar Reference

All time parameters use RFC 3339 format.

## Events

```bash
gws calendar events list --params '{"calendarId":"primary","timeMin":"START","timeMax":"END","maxResults":20}'
gws calendar events insert --json '{"summary":"Meeting","start":{"dateTime":"START","timeZone":"Asia/Shanghai"},"end":{"dateTime":"END","timeZone":"Asia/Shanghai"}}' --params '{"calendarId":"primary"}'
gws calendar events update --params '{"calendarId":"primary","eventId":"EVT_ID"}' --json '{"summary":"Updated"}'
gws calendar events delete --params '{"calendarId":"primary","eventId":"EVT_ID"}'
gws calendar events instances --params '{"calendarId":"primary","eventId":"RECURRING_ID"}'
```

## Free/Busy and ACL

```bash
gws calendar freebusy query --json '{"timeMin":"START","timeMax":"END","items":[{"id":"primary"}]}'
gws calendar acl list --params '{"calendarId":"primary"}'
```

## Calendar Management

```bash
gws calendar calendarList list --params '{"maxResults":10}'
gws calendar calendars insert --json '{"summary":"My Calendar"}' --params '{}'
gws calendar calendars delete --params '{"calendarId":"CAL_ID"}'
```

references/docs-slides-forms.md

# Docs, Slides, and Forms Reference

## Docs

```bash
# Create
DOC_ID=$(gws docs documents create --json '{"title":"My Doc"}' --params '{}' 2>/dev/null | tail -n +2 | jq -r '.documentId')

# Extract plain text
gws docs documents get --params '{"documentId":"ID"}' 2>/dev/null | tail -n +2 | jq '[.body.content[]|select(.paragraph)|.paragraph.elements[]?|select(.textRun)|.textRun.content]|join("")'

# Insert text (index 1 = start)
gws docs documents batchUpdate --json '{"requests":[{"insertText":{"location":{"index":1},"text":"Hello\n"}}]}' --params '{"documentId":"ID"}'

# Bold
gws docs documents batchUpdate --json '{"requests":[{"updateTextStyle":{"range":{"startIndex":1,"endIndex":6},"textStyle":{"bold":true},"fields":"bold"}}]}' --params '{"documentId":"ID"}'

# Heading
gws docs documents batchUpdate --json '{"requests":[{"updateParagraphStyle":{"range":{"startIndex":1,"endIndex":10},"style":{"namedStyleType":"HEADING_1"},"fields":"namedStyleType"}}]}' --params '{"documentId":"ID"}'

# Insert image
gws docs documents batchUpdate --json '{"requests":[{"insertInlineImage":{"uri":"https://example.com/img.png","location":{"index":1}}}]}' --params '{"documentId":"ID"}'

# Bullet list
gws docs documents batchUpdate --json '{"requests":[{"createParagraphBullets":{"range":{"startIndex":1,"endIndex":20},"bulletPreset":"BULLET_DISC_CIRCLE_SQUARE"}}]}' --params '{"documentId":"ID"}'
```

## Slides

Coordinates use EMU units (1 inch = 914400 EMU).

```bash
SLIDE_ID=$(gws slides presentations create --json '{"title":"My Slides"}' --params '{}' 2>/dev/null | tail -n +2 | jq -r '.presentationId')

# Create text box with text
gws slides presentations batchUpdate --json '{"requests":[{"createShape":{"objectId":"s1","shapeType":"TEXT_BOX","elementProperties":{"pageObjectId":"p1","size":{"width":{"magnitude":4000000,"unit":"EMU"},"height":{"magnitude":300000,"unit":"EMU"}},"transform":{"scaleX":1,"scaleY":1,"translateX":100000,"translateY":100000,"unit":"EMU"}}}},{"insertText":{"objectId":"s1","text":"Hello!"}}]}' --params '{"presentationId":"ID"}'

# New slide
gws slides presentations batchUpdate --json '{"requests":[{"createSlide":{"objectId":"slide2"}}]}' --params '{"presentationId":"ID"}'

# Insert image
gws slides presentations batchUpdate --json '{"requests":[{"createImage":{"url":"https://example.com/img.png","elementProperties":{"pageObjectId":"p1","size":{"width":{"magnitude":3000000,"unit":"EMU"},"height":{"magnitude":2000000,"unit":"EMU"}},"transform":{"scaleX":1,"scaleY":1,"translateX":500000,"translateY":500000,"unit":"EMU"}}}}]}' --params '{"presentationId":"ID"}'
```

## Forms

`forms create` only accepts `title`. Add questions via `batchUpdate`.

```bash
FORM_ID=$(gws forms forms create --json '{"info":{"title":"Survey"}}' --params '{}' 2>/dev/null | tail -n +2 | jq -r '.formId')
```

### Question types

```bash
# Text (short/paragraph)
gws forms forms batchUpdate --json '{"requests":[{"createItem":{"location":{"index":0},"item":{"title":"Your name

references/drive.md

# Drive Reference

## Browse and Search

```bash
gws drive files list --params '{"pageSize":10,"orderBy":"modifiedTime desc"}'
gws drive files list --params '{"q":"mimeType=\"application/vnd.google-apps.spreadsheet\""}'
gws drive files list --params '{"q":"'\''FOLDER_ID'\'' in parents"}'
```

## Upload (two-step: upload then rename)

`files create` does not pass `name` to the API — files upload as "Untitled". Upload first, then rename:

```bash
cd ~/Downloads
gws drive files create --params '{}' --upload file.txt --upload-content-type text/plain
gws drive files update --params '{"fileId":"FILE_ID"}' --json '{"name":"real_name.txt"}'
```

Note: `files copy` does respect `name`.

## Create Folder

```bash
gws drive files create --params '{}' --json '{"name":"Folder Name","mimeType":"application/vnd.google-apps.folder"}'
```

## Copy and Move

```bash
gws drive files copy --params '{"fileId":"ID"}' --json '{"name":"Copy of file"}'
gws drive files update --params '{"fileId":"ID","addParents":"FOLDER_ID","removeParents":"root"}' --json '{}'
```

## Download and Export

Native files: `get --alt media`. Google formats (Sheets/Docs/Slides): `export`.

```bash
gws drive files get --params '{"fileId":"ID","alt":"media"}' --output file.txt
gws drive files export --params '{"fileId":"ID","mimeType":"application/pdf"}' --output doc.pdf
gws drive files export --params '{"fileId":"ID","mimeType":"text/csv"}' --output data.csv
```

## Permissions and Storage

```bash
gws drive permissions list --params '{"fileId":"ID","pageSize":10}'
gws drive about get --params '{"fields":"storageQuota"}' 2>/dev/null | tail -n +2 | jq '.storageQuota'
```

## Delete

`files delete` returns `{"status":"success","saved_file":"download.html"}` — ignore the `saved_file` field.

```bash
gws drive files delete --params '{"fileId":"ID"}'
```

Sponsored

Ads related to Google Power Tools and adjacent AI workflows.