gws-gmail-watch

Monitor Gmail for new emails and stream them as NDJSON.

30.3k|1.8k|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/googleworkspace/cli --skill gws-gmail-watch-googleworkspace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-gmail-watch
Source: https://github.com/googleworkspace/cli/tree/main/skills/gws-gmail-watch
Command: npx skills add https://github.com/googleworkspace/cli --skill gws-gmail-watch-googleworkspace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of monitoring your Gmail inbox for new emails and streaming them in a structured format, eliminating the need for manual checking and processing.

Core Features & Use Cases

  • Real-time Email Monitoring: Continuously watch for incoming emails based on specified criteria.
  • NDJSON Streaming: Outputs new emails as newline-delimited JSON, ideal for programmatic consumption.
  • Filtering: Option to filter emails by specific label IDs (e.g., INBOX, UNREAD).
  • Use Case: Automatically process all new customer support emails as they arrive by streaming them into a CRM or a data analysis pipeline.

Quick Start

Use the gws gmail watch command to monitor your inbox for new emails.

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 new Gmail emails as NDJSON for programmatic integration?

To stream new Gmail emails as NDJSON, you can use this Skill to monitor your inbox and automatically output incoming messages in newline-delimited JSON format. It requires a Google Cloud project with Pub/Sub resources for efficient event handling.

Can I filter which Gmail emails are watched and streamed?

Yes, you can filter watched Gmail emails by specifying label IDs such as INBOX or UNREAD. This allows you to target only specific incoming messages for NDJSON streaming instead of processing all new emails.

Do I need Google Cloud Pub/Sub to monitor Gmail for new emails?

Yes, Google Cloud Pub/Sub is required to monitor Gmail for new emails. The Skill relies on Pub/Sub resources to enable efficient, real-time event handling and streaming of incoming messages.

What is NDJSON streaming and why use it for incoming emails?

NDJSON streaming outputs new emails as newline-delimited JSON, where each line is a valid JSON object. This format is ideal for programmatic consumption, allowing you to easily pipe incoming emails into a CRM or data analysis pipeline.

How do I automatically process customer support emails as they arrive?

You can automatically process customer support emails by using this Skill to watch your Gmail inbox and stream new messages as NDJSON. This structured output can be directly integrated into a CRM or data analysis pipeline.

Does NDJSON streaming work with existing Gmail labels?

Yes, NDJSON streaming works with existing Gmail labels by allowing you to filter emails using specific label IDs. This ensures only messages matching your label criteria are watched and outputted.