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
Ready-to-paste message
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-subscribeOr download just the file:
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-events-subscribe/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
events +subscribe
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto 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
Comments
- …
More skills from this repository
gws-admin-reports
Helps your agent get activity reports from Google Workspace. It collects audit and usage data.
googleworkspace/cli
gws-calendar-agenda
Helps your agent see upcoming events across all calendars. It's useful for organizing your schedule and knowing what's coming up.
googleworkspace/cli
gws-calendar-insert
Lets your agent create new events in Google Calendar. It's useful for scheduling appointments and meetings.
googleworkspace/cli
gws-calendar
Allows your agent to manage calendars and events. It's useful for organizing your life and work.
googleworkspace/cli
Similar skills
benchmark
Helps your agent measure code speed and performance. It's useful for ensuring things are fast and finding slowness issues.
affaan-m/ECC
content-hash-cache-pattern
Lets your agent use content hashes to cache file processing results. This avoids repeated processing and auto-invalidates the cache when content changes. Useful for speeding up slow tasks.
affaan-m/ECC
parallel-execution-optimizer
Makes your agent speed up complex tasks by breaking them into smaller parts and running them in parallel. It ensures everything is verified at the end.
affaan-m/ECC