360 Secure SkillHub
360 安全技能中心

recipe-watch-drive-changes

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

googleworkspace
热度 70.52
最近更新 2026-10-18 17:15:37
分类:自动化依赖:第三方 API应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: 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