gws-gmail-watch

Watch Gmail for new emails and stream them as NDJSON.

2|1|Updated Oct 8, 2009
One-click install
npx skills add https://github.com/riethmayer/dotfiles --skill gws-gmail-watch-riethmayer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-gmail-watch
Source: https://github.com/riethmayer/dotfiles/tree/main/stow/agents/.agents/skills/gws-gmail-watch
Command: npx skills add https://github.com/riethmayer/dotfiles --skill gws-gmail-watch-riethmayer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Gmail inbox watch and NDJSON streaming eliminates the manual overhead of monitoring for new emails and integrating them into data pipelines or analytics workflows.

Core Features & Use Cases

  • Real-time Gmail watch: detect and stream new messages as NDJSON for downstream processing.
  • Pub/Sub integration: publish messages to a topic and optionally write each message to a file via --output-dir for archiving.
  • Flexible formats and filtering: support for --label-ids and --msg-format with configurable polling and batch sizes.
  • Use Case: Ingest Gmail messages into a data lake or analytics platform for automated processing, alerting, or archival.

Quick Start

Use gws gmail +watch to start streaming new Gmail messages as NDJSON.

Frequently Asked Questions about gws-gmail-watch

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

FAQPage Schema
How do I stream Gmail new messages as NDJSON in real-time?

This Skill watches Gmail for new emails and streams them as NDJSON, publishing messages to a Pub/Sub topic and optionally archiving each message to a specified output directory.

What is the best way to ingest Gmail messages into a data lake using Pub/Sub?

By configuring Pub/Sub integration with a project, topic, and subscription, the watch streams new Gmail messages as NDJSON, allowing you to route them into a data lake or analytics platform.

Can I filter Gmail messages by label and control the polling interval for NDJSON streaming?

The watch supports flexible filtering via --label-ids and configurable batch sizes with --max-messages, ensuring you only capture and stream the specific Gmail messages required for your workflow.

Do I need gws-shared prerequisites to set up Gmail watch and Pub/Sub integration?

Configuration through gws-shared prerequisites is required to establish the secure connection, allowing the watch to utilize flags like --project, --subscription, and --topic for Pub/Sub integration.

Does Gmail NDJSON streaming support writing individual messages to a directory for archiving?

In addition to streaming new messages as NDJSON to a Pub/Sub topic, the watch provides optional per-message output to files or a directory via the --output-dir flag for data archival purposes.

How does real-time Gmail watch handle batch sizes and message formats?

You can use --max-messages to define batch limits and --msg-format to specify the output structure, ensuring the NDJSON stream aligns with your downstream processing or analytics platform requirements.