
Gws Events Subscribe
Streams Google Workspace events like new Chat messages or Drive file changes directly to your terminal as NDJSON, which is surprisingly useful for debugging webhooks or building real-time integrations. Sets up the entire Pub/Sub pipeline automatically, pulls events in configurable batches, and can optionally save each event as a separate JSON file for analysis. The cleanup flag is nice for experimentation since it tears down the Pub/Sub resources when you're done. Honestly, this fills a gap that Google's own tooling doesn't address well for developers who need to see what's actually happening in their Workspace in real-time.
- skills.sh installs
- 31.4K
- GitHub stars
- 32.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add googleworkspace/cli --skill gws-events-subscribe --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/googleworkspace/cli
- Categories
- CLI & Terminal, Office & Documents
More from googleworkspace/cli
All 113- Recipe Plan Weekly Schedule31.4K
- Recipe Bulk Download Folder31.4K
- Recipe Create Doc From Template31.4K
- Recipe Sync Contacts To Sheet31.3K
- Gws Admin Reports31.3K
- Recipe Generate Report From Sheet31.2K
- Recipe Label And Archive Emails31.1K
- Recipe Reschedule Meeting31.1K
- Recipe Save Email To Doc31.1K
- Recipe Block Focus Time31K
- Recipe Watch Drive Changes31K
- Recipe Create Shared Drive31K
- Persona Team Lead31K
- Recipe Share Doc And Notify30.9K
- Recipe Find Large Files30.9K
- Recipe Create Task List30.9K
- Recipe Schedule Recurring Event30.9K
- Recipe Review Overdue Tasks30.8K
- Recipe Copy Sheet For New Month30.8K
- Recipe Review Meet Participants30.8K
- Recipe Batch Invite To Event30.8K
- Recipe Collect Form Responses30.8K
- Recipe Create Events From Sheet30.7K
- Persona It Admin30.7K