google-workspacelisted
Install: claude install-skill geziel16/google-workspace-skill
# Google Workspace Skill
Operate all Google Workspace services through the `gws` CLI from OpenClaw.
## Prerequisites
- Node.js 18+
- A Google Cloud project with OAuth credentials
- `gws` CLI installed: `npm install -g @googleworkspace/cli`
## Authentication
### First-time setup (machine with browser)
```bash
gws auth setup # creates GCP project, enables APIs, logs in
gws auth login -s drive,gmail,sheets,calendar # pick services you need
```
### Headless server (no browser)
Complete auth on a machine with a browser, then export:
```bash
gws auth export --unmasked > credentials.json
```
> **Security notes:**
> - Set file permissions: `chmod 600 credentials.json`
> - Do not commit credential files to git — add `credentials.json` to your `.gitignore`
> - For production environments, prefer using a service account instead of user credentials
On the headless server:
```bash
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/credentials.json
```
### Service account
```bash
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/service-account.json
```
### Pre-obtained token
```bash
export GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)
```
**Priority:** Token env > Credentials file env > `gws auth login` store > plaintext file.
## Command Pattern
```bash
gws <service> <resource> <method> [--params '{}'] [--json '{}'] [flags]
```
All responses are **structured JSON**. Use `jq` for extraction.
### Global Flags
| Flag | Purpose |
|------|--