Skip to content
Skillpedia
Email & messaging32k · #6266

gws-gmail-read

Allows your agent to read emails and extract their content or headers. Helps process email information in an organized way.

What it does

This tool reads a specific email from your Gmail and shows its content. You can choose to see just the text, the headers (like sender and subject), or even the original HTML code of the email.

When to use it

  • ✓When you need to quickly find the content of a specific email.
  • ✓To extract header information from an email.
  • ✓To view the HTML version of an email.

Example of what to ask your AI

“Read the email with ID '18f1a2b3c4d' and show the headers.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-read/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-read/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

You provide the unique ID of the email you want to read. The tool then accesses your Gmail account and retrieves the content of that email.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add googleworkspace/cli --skill gws-gmail-read

Or download just the file:

curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-gmail-read/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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

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

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

FAQ

What is an email ID?

It's a unique code that identifies each email in your Gmail account.

Can I see the email in code format?

Yes, you can ask to see the email's body in HTML format.

How do I find an email's ID?

The ID is usually a long code that appears in the URL when you view the email in Gmail.

Details

Original description by the author

Gmail: Read a message and extract its body or headers.

repo: googleworkspace/cli

Popularity

GitHub stars
32k
Ranking position
#6266
License
Apache-2.0
Updated
10/6/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills