gws-gmail-read

Read Gmail messages by ID and extract body or headers.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/wuyyyyyou/cli --skill gws-gmail-read-wuyyyyyou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-gmail-read
Source: https://github.com/wuyyyyyou/cli/tree/main/skills/gws-gmail-read
Command: npx skills add https://github.com/wuyyyyyou/cli --skill gws-gmail-read-wuyyyyyou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Read Gmail messages and extract their body or headers.

Core Features & Use Cases

  • Read a Gmail message by ID and extract either the body or headers (From, To, Subject, Date).
  • Output results in plain text or JSON; optionally include HTML body when needed.
  • Use in automation workflows to feed Gmail content into other tools or data pipelines.

Quick Start

Read a Gmail message by ID and extract its body or headers in your preferred format.

Frequently Asked Questions about gws-gmail-read

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract Gmail message headers and body programmatically via the CLI?

You can extract Gmail message headers and body programmatically by passing the message ID to the gws command-line tool, using flags like --headers, --format, and --html to control the specific text or JSON output returned.

Can I output extracted Gmail content as JSON for data pipeline automation?

Yes, you can output extracted Gmail content as JSON by using the --format flag, allowing you to easily feed message headers and body text into data pipelines and other automation workflows.

Does this Gmail reading method require API access to fetch messages by ID?

Yes, this method requires access to Gmail via the API and the gws tool to fetch specific messages by their ID, ensuring programmatic retrieval of headers and body content for integration scenarios.

What's the best way to get the raw HTML body from a Gmail message in an automation workflow?

The best way to get the raw HTML body from a Gmail message is to use the --html flag with the gws tool, which extracts the HTML content needed for downstream data extraction tasks.

How do I read a specific Gmail message when I only have the message ID?

To read a specific Gmail message using its ID, pass the identifier to the --id flag in the gws tool, which then retrieves and extracts either the message body or headers like From, To, and Subject.

Are there limitations when extracting plain text versus headers from Gmail messages?

Limitations depend on the flags used: --headers extracts From, To, Subject, and Date, while --format and --html control whether you receive plain text or HTML body, requiring specific flags for precise output.