gws-gmail-watch
Installation
Summary
Stream new Gmail messages as NDJSON with Pub/Sub-backed polling and optional file output.
- Monitors incoming emails via Gmail API with configurable label filtering (INBOX, UNREAD, etc.) and message format options (full, metadata, minimal, raw)
- Supports two setup modes: automatic Pub/Sub topic and subscription creation, or connection to existing resources
- Configurable polling interval, batch size, and one-time pull mode; graceful shutdown with optional resource cleanup
- Can write each message to a separate JSON file or stream directly to stdout; watch sessions expire after 7 days and must be renewed
SKILL.md
gmail +watch
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Watch for new emails and stream them as NDJSON
Usage
gws gmail +watch