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.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Watch for new emails and stream them as NDJSON

Usage

gws gmail +watch

Flags

Flag Required Default Description
--project GCP project ID for Pub/Sub resources
--subscription Existing Pub/Sub subscription name (skip setup)
--topic Existing Pub/Sub topic with Gmail push permission already granted
Related skills
Installs
16.7K
GitHub Stars
26.1K
First Seen
Mar 4, 2026