What problem does it solve?
Monitoring Gmail mailboxes for new messages and reliably exporting them in a machine-friendly NDJSON stream can be time-consuming to implement and operate, especially when you need near-real-time ingestion into processing pipelines or archival systems. This Skill centralizes the watch flow, Pub/Sub integration, and message formatting so teams can focus on downstream processing instead of connection and resource management.
Core Features & Use Cases
- Gmail watch integration: Uses Gmail watch semantics to detect new messages and renew watches as needed.
- Pub/Sub orchestration: Creates or uses Google Cloud Pub/Sub topics and subscriptions to receive push or pull notifications.
- Filtering and formatting: Supports label-based filtering, configurable message formats (full, metadata, minimal, raw), batch pull sizes, polling intervals, and streaming outputs as NDJSON or individual files for ETL workflows.
- Operational controls: Options to run once, cleanup created Pub/Sub resources, and write messages to an output directory for offline processing.
- Use Case: Stream incoming support emails into an analytics pipeline or archival store that requires NDJSON lines for each message.
Quick Start
Run gws gmail +watch with your GCP project ID to stream incoming messages as NDJSON to stdout.