gws-gmail-read — Claude skill: read Gmail messages
This skill pulls the body or headers of a Gmail message by its ID. Useful when your agent needs one specific email, not the whole inbox.
npx skills add googleworkspace/cli --skill gws-gmail-read -a claude-codeWhat gws-gmail-read does
The skill wraps gws gmail +read --id and returns the message text. Output is plain text by default; --format json switches to JSON, --html gives you the HTML body instead. Add --headers to include From, To, Subject and Date in the output.
The annoying parts of the Gmail API are already handled: HTML-only messages get converted to plain text, multipart/alternative is parsed, base64 is decoded. There is also --dry-run, which prints the request it would send and stops there.
You need the gws binary and auth set up through gws-shared; if that file is missing, gws generate-skills creates it. Worth installing if your agent reads individual messages by ID on a regular basis. For searching a mailbox or bulk-processing it, look elsewhere.
What it helps with
- read a Gmail message body by ID
- extract From, To, Subject and Date from a message
- get a message as JSON and pipe it into jq
- convert an HTML-only email to plain text
- preview the request sent to Gmail without running it
Example prompts for the agent
- read message gws gmail +read --id 18f1a2b3c4d
- show the headers: gws gmail +read --id 18f1a2b3c4d --headers
- grab the body as json: gws gmail +read --id 18f1a2b3c4d --format json | jq '.body'
How to install gws-gmail-read
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-read -a claude-code2Manually: put the files in place
~/.claude/skills/gws-gmail-read/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gws-gmail-read/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-read -a codex2Manually: put the files in place
.agents/skills/gws-gmail-read/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-read -a cursor2Manually: put the files in place
.cursor/skills/gws-gmail-read/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install googleworkspace/cli gws-gmail-read2Manually: put the files in place
.github/skills/gws-gmail-read/SKILL.md1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-read -a gemini-cli2Platform CLI
gemini skills install https://github.com/googleworkspace/cli --path skills/gws-gmail-readManually: put the files in place
.devin/skills/gws-gmail-read/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-read -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set95
The whole set →Similar
Questions about gws-gmail-read
How do I install gws-gmail-read in Claude?
Run npx skills add googleworkspace/cli --skill gws-gmail-read -a claude-code. The skill lands in ~/.claude/skills/gws-gmail-read/SKILL.md.
What does gws-gmail-read do?
It reads a Gmail message by ID and returns its body or headers. HTML-only messages are converted to plain text automatically.
What do I need before using it?
The gws binary and auth from gws-shared. If that file is missing, run gws generate-skills.
Source text
SKILL.md · Apache-2.0
---
name: gws-gmail-read
description: "Gmail: Read a message and extract its body or headers."
metadata:
version: 0.22.5
openclaw:
category: "productivity"
requires:
bins:
- gws
cliHelp: "gws gmail +read --help"
---
# gmail +read
> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.
Read a message and extract its body or headers
## Usage
```bash
gws gmail +read --id <ID>
```
## Flags
| Flag | Required | Default | Description |
|------|----------|---------|-------------|
| `--id` | ✓ | — | The Gmail message ID to read |
| `--headers` | — | — | Include headers (From, To, Subject, Date) in the output |
| `--format` | — | text | Output format (text, json) |
| `--html` | — | — | Return HTML body instead of plain text |
| `--dry-run` | — | — | Show the request that would be sent without executing it |
## Examples
```bash
gws gmail +read --id 18f1a2b3c4d
gws gmail +read --id 18f1a2b3c4d --headers
gws gmail +read --id 18f1a2b3c4d --format json | jq '.body'
```
## Tips
- Converts HTML-only messages to plain text automatically.
- Handles multipart/alternative and base64 decoding.
## See Also
- [gws-shared](../gws-shared/SKILL.md) — Global flags and auth
- [gws-gmail](../gws-gmail/SKILL.md) — All send, read, and manage email commands
© googleworkspace · Apache-2.0 · googleworkspace/cli