$npx -y skills add googleworkspace/cli --skill recipe-watch-drive-changesSubscribe to change notifications on a Google Drive file or folder.
| 1 | # Watch for Drive Changes |
| 2 | |
| 3 | > **PREREQUISITE:** Load the following skills to execute this recipe: `gws-events` |
| 4 | |
| 5 | Subscribe to change notifications on a Google Drive file or folder. |
| 6 | |
| 7 | ## Steps |
| 8 | |
| 9 | 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}}'` |
| 10 | 2. List active subscriptions: `gws events subscriptions list` |
| 11 | 3. Renew before expiry: `gws events +renew --subscription SUBSCRIPTION_ID` |