360 Secure SkillHub
360 安全技能中心

recipe-watch-drive-changes

该 recipe 通过 gws 命令行工具为 Google Drive 文件或驱动器创建变更通知订阅,列出当前有效订阅,并在到期前续订;依赖 gws-events skill 与 gws 可执行文件,通知通过 Pub/Sub 主题投递。

分类:自动化
googleworkspace
热度 72.92
最近更新 2026-10-18 17:15:37

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add googleworkspace/cli/recipe-watch-drive-changes
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
recipe-watch-drive-changes
description
Subscribe to change notifications on a Google Drive file or folder.
metadata
{"version":"0.22.5","openclaw":{"category":"recipe","domain":"engineering","requires":{"bins":["gws"],"skills":["gws-events"]}}}

Watch for Drive Changes

PREREQUISITE: Load the following skills to execute this recipe: gws-events

Subscribe to change notifications on a Google Drive file or folder.

Steps

  1. Create subscription: gws events subscriptions create --json '{"targetResource": "//drive.googleapis.com/drives/DRIVE_ID", "eventTypes": ["google.workspace.drive.file.v1.updated"], "notificationEndpoint": {"pubsubTopic": "projects/PROJECT/topics/TOPIC"}, "payloadOptions": {"includeResource": true}}'
  2. List active subscriptions: gws events subscriptions list
  3. Renew before expiry: gws events +renew --subscription SUBSCRIPTION_ID