Gws Events Subscribe
Google WorkspaceOfficialPublished by Google Workspace
- Skill
- Tool integration
- Automation and integrations
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The gws-events-subscribe skill enables users to subscribe to specific Google Workspace events and stream the resulting data in NDJSON format. It leverages Google Cloud Pub/Sub infrastructure to manage event delivery and provides options for resource cleanup, batch processing, and file-based output.
What it does
- Subscribes to Google Workspace resource events
- Streams event data in NDJSON format
- Supports integration with Google Cloud Pub/Sub
- Allows writing events to individual JSON files
- Provides options for automated resource cleanup
- Configures polling intervals and batch message limits
When to use it
- When you need to capture and process Google Workspace activity
- When integrating Workspace events into a data pipeline
- When you need to export event logs to local storage
- When you want to manage Pub/Sub subscriptions for Workspace resources
Advantages
- Flexible output options including stream or file-based storage
- Configurable polling and batching parameters
- Automated resource management with cleanup flags
- Supports both new and existing Pub/Sub subscriptions
Usage examples
- “Subscribe to chat message events for a specific space.”
- The agent initiates a subscription to the specified Google Chat space and streams incoming events as NDJSON.
- “Capture Workspace events and save them to a directory.”
- The agent creates a subscription and writes each received event as a separate JSON file in the designated output directory.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/googleworkspace/gws-events-subscribe/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gws-events-subscribe.zip -d .agents/skills
Documentation by Google Workspace
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 +subscribeFlags
| 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 ./eventsTips
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
Files
- ATTRIBUTION.mdAdded by AutoGineer902 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md2.0 KiB
SKILL.md
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 +subscribeFlags
| 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 ./eventsTips
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
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Google Workspace
- Publisher
- Google Workspace (Official)
- Source
- googleworkspace/cli · skills/gws-events-subscribe · commit cd3697e
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google Workspace.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gws-events-subscribe.zip