---
id: ssh2-recipe-watch-drive-changes
name: "recipe-watch-drive-changes"
url: https://skills.yangsir.net/skill/ssh2-recipe-watch-drive-changes
author: googleworkspace
domain: ai-agent-external-interaction
tags: ["google-drive-api", "file-change-monitoring", "real-time-notifications", "workflow-automation", "google-workspace"]
install_count: 14800
rating: 4.50 (20 reviews)
github: https://github.com/googleworkspace/cli
---

# recipe-watch-drive-changes

> 订阅Google云端硬盘文件或文件夹的更改通知，实时掌握文件变动情况。

**Stats**: 14,800 installs · 4.5/5 (20 reviews)

## Before / After 对比

### 实时监控云盘变动，确保信息同步。

## Readme

# 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`



---
*Source: https://skills.yangsir.net/skill/ssh2-recipe-watch-drive-changes*
*Markdown mirror: https://skills.yangsir.net/api/skill/ssh2-recipe-watch-drive-changes/markdown*