360 Secure SkillHub
360 安全技能中心

Recipe Watch Drive Changes

核心功能:通过gws命令行工具管理Google Drive文件/文件夹的变更通知订阅,含创建、列出活跃订阅、续订即将过期的订阅操作。典型场景:需实时监控Drive内文件更新的团队协作等场景。输入为带指定参数(如DRIVE_ID、Pub/Sub主题)的gws命令,输出为订阅相关信息。需依赖gws工具及gws-events技能。

googleworkspace-bot
googleworkspace-bot
热度 70.53
最近更新 2026-05-11 17:32:05
分类:自动化依赖:第三方 API应用场景:自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add 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