> **recipe-watch-drive-changes** — skill 95 of 95 in [googleworkspace/cli](https://skillsdocs.com/googleworkspace/cli).
>
> Book (all skills, one file): https://skillsdocs.com/googleworkspace/cli.md
> Machine manifest: https://skillsdocs.com/googleworkspace/cli/.well-known/agent-skills/index.json
> Install the book: `npx skills add googleworkspace/cli`
> Upstream: https://github.com/googleworkspace/cli/blob/main/skills/recipe-watch-drive-changes/SKILL.md @ `main`
> Raw bytes, no header: https://raw.githubusercontent.com/googleworkspace/cli/main/skills/recipe-watch-drive-changes/SKILL.md
> Base for relative paths: https://raw.githubusercontent.com/googleworkspace/cli/main/skills/recipe-watch-drive-changes/
> Licence: Apache-2.0 — https://spdx.org/licenses/Apache-2.0.html
>
> Content © its authors, served unmodified. Takedown: https://github.com/DreambaseAI/skillsdocs/issues/new?labels=takedown&title=Takedown+request

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

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