gws-events-subscribe
Google Workspace Events: Subscribe to Workspace events and stream them as NDJSON.
Why use this skill?
Subscribe to Google Workspace events and stream them in real-time as NDJSON. Perfect for building automated workflows, logs, and event-driven AI agents.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/googleworkspace-bot/gws-events-subscribeWhat This Skill Does
The gws-events-subscribe skill is a powerful automation utility designed for OpenClaw agents to interface directly with Google Workspace event streams. By leveraging Google Cloud Pub/Sub under the hood, it facilitates real-time monitoring and data streaming of workspace events, such as Chat message creation or other CloudEvent-compatible Workspace triggers. It streams these updates in Newline Delimited JSON (NDJSON) format, making it highly compatible with data processing pipelines, logging services, or reactive AI agents. The skill manages the lifecycle of Pub/Sub subscriptions, handles message polling intervals, and offers flexible output configurations including direct file writing or real-time streaming.
Installation
To install this skill, use the ClawHub CLI command:
clawhub install openclaw/skills/skills/googleworkspace-bot/gws-events-subscribe
Ensure that you have completed the prerequisite setup outlined in gws-shared/SKILL.md, which includes configuring your Google Cloud authentication, project settings, and necessary API enablement for the Google Workspace Events API.
Use Cases
- Automated Workflow Integration: Trigger downstream business logic automatically whenever a new message is posted in a specific Google Chat space.
- Audit and Logging: Archive all workspace activity to local files or a cloud data lake for compliance and historical record-keeping using the
--output-dirflag. - Real-Time Dashboards: Feed live event streams into observability tools or custom dashboards to track team engagement or support ticket volume within chat spaces.
- Event-Driven AI Assistants: Create autonomous bots that 'listen' for user mentions or specific events to provide context-aware assistance without constant manual polling.
Example Prompts
- "Start streaming new chat messages from the 'Project Alpha' space to my logs folder for the next hour."
- "Listen to workspace events for the specified project and save every incoming event to a file in the ./workspace-events directory."
- "Subscribe to events in my workspace and pull the latest 50 messages, then shut down the connection once finished."
Tips & Limitations
- Cleanup Management: By default, Pub/Sub resources will persist to ensure you can reconnect without losing events. Always consider using the
--cleanupflag if you are performing ad-hoc, temporary monitoring to avoid cluttering your GCP project with orphaned subscriptions. - Permissions: This skill requires significant IAM permissions on the target GCP project to create, modify, and delete Pub/Sub subscriptions. Ensure the service account used by the OpenClaw agent has the appropriate roles (e.g., Pub/Sub Editor).
- Safety Caution: This is a write-capable tool that interacts with your live Workspace environment. The OpenClaw agent should always prompt for human confirmation before executing any subscription setup or cleanup operations to prevent unintended modification of your cloud infrastructure.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-googleworkspace-bot-gws-events-subscribe": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, external-api
Related Skills
gws-workflow-standup-report
Google Workflow: Today's meetings + open tasks as a standup summary.
gws-modelarmor-create-template
Google Model Armor: Create a new Model Armor template.
recipe-create-feedback-form
Create a Google Form for feedback and share it via Gmail.
gws-admin-reports
Google Workspace Admin SDK: Audit logs and usage reports.
gws-chat
Google Chat: Manage Chat spaces and messages.