# Gws Gmail Read > Gmail: Read a message and extract its body or headers. Source: https://skillsagentes.com/skills/googleworkspace/cli/gws-gmail-read Repository: https://github.com/googleworkspace/cli Author: googleworkspace License: Apache-2.0 Updated: hace 4 meses Context cost: 14 tok installed, 350 tok once triggered, 350 tok with every bundled file Bundle: 1 file, 1 KB Permissions requested: none declared ## Install ```bash npx -y skills add googleworkspace/cli --skill gws-gmail-read --agent claude-code ``` ## What it does - Lee un mensaje de Gmail por su ID y extrae el cuerpo o los headers - Convierte mensajes solo-HTML a texto plano automáticamente - Decodifica multipart/alternative y base64 - Permite ver headers (From, To, Subject, Date) con --headers ## Use it when - Necesitas leer el contenido de un mensaje específico de Gmail conociendo su ID - Quieres extraer solo el body o solo los headers de un correo - Quieres el resultado en JSON para procesarlo con jq ## What triggers it - "Lee el mensaje de Gmail con ID 18f1a2b3c4d" - "Muéstrame los headers del correo 18f1a2b3c4d" - "Extrae el body en JSON del mensaje 18f1a2b3c4d con gws gmail +read" ## Before you install - Requiere el binario gws y haber configurado auth/flags globales según gws-shared/SKILL.md. - Needs on PATH: jq ## Files - SKILL.md — 1 KB ## SKILL.md Reproduced verbatim from googleworkspace/cli under Apache-2.0. This section is the upstream document and is in English. # 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 ``` ## 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 --- Skills Agentes — https://skillsagentes.com/skills/googleworkspace/cli/gws-gmail-read