首页/AI 效率与自动化/gws-events-subscribe
G

gws-events-subscribe

by @googleworkspacev
4.6(148)

订阅Google Workspace事件,以便接收工作区内发生的各种活动和状态更新。

google-calendar-apievent-subscriptionscalendar-integrationgoogle-workspacenotification-managementGitHub
安装方式
npx skills add https://github.com/googleworkspace/cli --skill gws-events-subscribe
compare_arrows

Before / After 效果对比

1 组
使用前

无法实时获取Google Workspace的事件数据,需要通过轮询或其他复杂方式。数据获取滞后,影响实时决策和自动化流程。

使用后

订阅Google Workspace事件并以NDJSON格式流式传输,实时获取最新数据。支持构建实时自动化,大幅提升系统响应速度。

SKILL.md

events +subscribe

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Subscribe to Workspace events and stream them as NDJSON

Usage

gws events +subscribe

Flags

FlagRequiredDefaultDescription
--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—10Max messages per pull batch (default: 10)
--poll-interval—5Seconds 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 ./events

Tips

  • 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

用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量30.6K
评分4.6 / 5.0
版本
更新日期2026年10月22日
对比案例1 组

用户评分

4.6(148)
5
24%
4
51%
3
24%
2
2%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

时间线

创建2026年3月16日
最后更新2026年10月22日
🎁 Agent 知识卡片
调研问卷