Skip to content
Skillpedia
Automations32k · #6262

gws-events-subscribe

Lets your agent subscribe to Google Workspace events and receive data in real-time. Allows the agent to react to changes as they happen.

What it does

This tool lets you receive real-time notifications about what's happening in Google Workspace services, like new messages in Google Chat. It sends these notifications in a format that other programs can easily understand.

When to use it

  • ✓Be notified when someone posts a message in a specific Google Chat channel.
  • ✓Receive alerts about new activity in a shared document.
  • ✓Monitor changes in calendar events.

Example of what to ask your AI

“Notify me when a new message is posted in the 'Project X' Google Chat channel.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/googleworkspace/cli/blob/main/skills/gws-events-subscribe/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/googleworkspace/cli/blob/main/skills/gws-events-subscribe/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

You specify which Google Workspace service you want notifications from and what type of event interests you. The tool then sets up a communication channel to send you this information as it happens.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add googleworkspace/cli --skill gws-events-subscribe

Or download just the file:

curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-events-subscribe/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

events +subscribe

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Subscribe to Workspace events and stream them as NDJSON

Usage

gws events +subscribe

Flags

Flag Required Default Description
--target — — Workspace resource URI (e.g., //chat.googleapis.com/spaces/SPACE_ID)
--event-types — — Comma-separated CloudEvents types to subscribe to
--project — — GCP project ID for Pub/Sub resources
--subscription — — Existing Pub/Sub subscription name (skip setup)
--max-messages — 10 Max messages per pull batch (default: 10)
--poll-interval — 5 Seconds between pulls (default: 5)
--once — — Pull once and exit
--cleanup — — Delete created Pub/Sub resources on exit
--no-ack — — Don't auto-acknowledge messages
--output-dir — — Write each event to a separate JSON file in this directory

Examples

gws events +subscribe --target '//chat.googleapis.com/spaces/SPACE' --event-types 'google.workspace.chat.message.v1.created' --project my-project
gws events +subscribe --subscription projects/p/subscriptions/my-sub --once
gws events +subscribe ... --cleanup --output-dir ./events

Tips

  • Without --cleanup, Pub/Sub resources persist for reconnection.
  • Press Ctrl-C to stop gracefully.

[!CAUTION] This is a write command — confirm with the user before executing.

See Also

  • gws-shared — Global flags and auth
  • gws-events — All subscribe to google workspace events commands
FAQ

How do I stop receiving notifications?

You can stop by pressing Ctrl+C on your keyboard. If you configured the tool to create temporary resources, they will be removed automatically.

What is 'NDJSON'?

NDJSON is a text format where each line is a complete, independent JSON object. It's easy for computers to read and process line by line.

Do I need to set anything up beforehand?

Yes, you need to have authentication and security rules set up for using Google Workspace services. Refer to the `gws-shared/SKILL.md` documentation for more details.

Details

Original description by the author

Google Workspace Events: Subscribe to Workspace events and stream them as NDJSON.

repo: googleworkspace/cli

Popularity

GitHub stars
32k
Ranking position
#6262
License
Apache-2.0
Updated
10/6/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills