2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill gws-events-subscribe- _meta.json305 B
- SKILL.md2.0 KB
Overview
This skill subscribes to Google Workspace events and streams them as NDJSON for consumption by pipelines or local processing. It uses Pub/Sub to receive CloudEvents from Workspace resources and can write events to stdout or individual JSON files. The command supports lifecycle options to create, reuse, or clean up Pub/Sub resources.
How this skill works
You provide a Workspace resource target and event types to subscribe to. The skill provisions or uses an existing Pub/Sub subscription, pulls messages in batches, and emits each event as an NDJSON record. Options control polling interval, batch size, acknowledgement behavior, single-run mode, and optional file output per event.
When to use it
- Stream Workspace events to downstream processors or logging pipelines in real time.
- Capture and archive chat or Drive events for compliance or audit purposes.
- Debug automation that reacts to Workspace CloudEvents locally.
- Bootstrap event-driven integrations without writing Pub/Sub client code.
- Quickly export a sample of events using single-run (--once) mode.
Best practices
- Confirm intent before running; this command can create Pub/Sub resources and is a write operation.
- Use --subscription to reuse an existing subscription when available to avoid creating resources.
- Enable --cleanup to remove created Pub/Sub resources when you’re finished, or omit it to preserve subscriptions for reconnection.
- For testing, use --once and a small --max-messages to limit volume.
- Set --no-ack only if another system will handle message acknowledgement to avoid redelivery.
- Use --output-dir to persist each event as a separate file for forensic or batch processing needs.
Example use cases
- Subscribe to chat message create events and stream them into a log indexing service as NDJSON.
- Pull Drive change events into a local directory for archival using --output-dir.
- Run a quick check of a subscription with --once to validate event types and payload shapes.
- Create a temporary subscription, stream events for a session, and remove resources with --cleanup.
- Attach a CI job to listen for specific CloudEvents and trigger downstream workflows.
FAQ
Only if you pass --cleanup. Otherwise created resources persist so you can reconnect later.
How do I avoid receiving duplicate events?
Acknowledge messages after processing. Do not use --no-ack unless another component is responsible for acknowledgements.