gws-events
googleworkspace/cli
Subscribe to and manage Google Workspace events via CLI.
What is gws-events?
Provides command-line access to Google Workspace Events API for creating, managing, and streaming subscriptions to Workspace events. Use this when you need to monitor real-time changes in Google Workspace resources or manage event subscriptions programmatically.
- Create, list, get, update, and delete Google Workspace event subscriptions
- Stream real-time task update events until completion or interruption
- Renew or reactivate suspended subscriptions
- Get operation status for long-running tasks
- Cancel in-progress tasks and manage push notification configs
How to install gws-events
npx skills add null --skill gws-events- Google Workspace account with appropriate permissions
- gws CLI tool installed and configured
- Authentication setup via gws-shared (see gws-shared/SKILL.md)
How to use gws-events
- 1.Run `gws events --help` to browse available resources and methods
- 2.Use `gws schema events.<resource>.<method>` to inspect required parameters and types
- 3.Create a subscription with `gws events subscriptions create --params <config>`
- 4.Stream events using the `+subscribe` helper command
- 5.Monitor subscription status with `gws events subscriptions list` or `gws events subscriptions get`
- 6.Renew subscriptions with the `+renew` helper command as needed
Use cases
- Monitor changes to Google Workspace resources in real-time by subscribing to events
- Manage multiple event subscriptions across your organization
- Reactivate subscriptions that have been suspended due to errors
- Poll long-running operations to track their progress
- Stream task updates from agents until completion
- Google Workspace administrators
- Developers building Workspace integrations
- DevOps engineers managing event pipelines
- Automation engineers setting up real-time monitoring
gws-events FAQ
See gws-shared/SKILL.md for auth setup. You need a Google Workspace account with appropriate permissions for the resources you're subscribing to.
Use the `+subscribe` helper command (gws-events-subscribe) to subscribe to Workspace events and receive them as NDJSON output.
Fix the underlying error that caused the suspension, then use `gws events subscriptions reactivate` to restore the subscription.
Use `gws events operations get` with the operation ID to poll the latest state.
Yes, use the `pushNotificationConfigs` resource under tasks to configure how notifications are delivered.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: gws-events description: "Subscribe to Google Workspace events." metadata: version: 0.22.5 openclaw: category: "productivity" requires: bins: - gws cliHelp: "gws events --help"
events (v1)
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
gws events <resource> <method> [flags]
Helper Commands
| Command | Description |
|---|---|
+subscribe | Subscribe to Workspace events and stream them as NDJSON |
+renew | Renew/reactivate Workspace Events subscriptions |
API Resources
message
stream— SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.
operations
get— Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
subscriptions
create— Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.delete— Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.get— Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.list— Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.patch— Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.reactivate— Reactivates a suspended Google Workspace subscription. This method resets your subscription'sStatefield toACTIVE. Before you use this method, you must fix the error that suspended the subscription. This method will ignore or reject any subscription that isn't currently in a suspended state. To learn how to use this method, see Reactivate a Google Workspace subscription.
tasks
cancel— Cancel a task from the agent. If supported one should expect no more task updates for the task.get— Get the current state of a task from the agent.subscribe— TaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like GetTask) and close the stream.pushNotificationConfigs— Operations on the 'pushNotificationConfigs' resource
Discovering Commands
Before calling any API method, inspect it:
# Browse resources and methods
gws events --help
# Inspect a method's required params, types, and defaults
gws schema events.<resource>.<method>
Use gws schema output to build your --params and --json flags.
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.