Productivity

recipe-watch-drive-changes

googleworkspace/cli · updated Apr 8, 2026

$npx skills add https://github.com/googleworkspace/cli --skill recipe-watch-drive-changes
summary

Subscribe to Google Drive file and folder changes via Pub/Sub notifications.

  • Requires the gws-events skill and gws binary to execute
  • Creates event subscriptions on Drive resources with configurable notification endpoints and payload options
  • Supports subscription lifecycle management: create, list, and renew subscriptions before expiry
  • Delivers change events (file updates) to Google Cloud Pub/Sub topics for downstream processing
skill.md

1d:["$","div",null,{"className":"prose prose-invert max-w-none prose-headings:font-semibold prose-headings:tracking-tight prose-h1:text-4xl prose-h1:mb-2 prose-h2:text-2xl prose-h2:mb-2 prose-h3:text-lg prose-h3:mb-2 prose-p:text-muted-foreground prose-li:text-muted-foreground prose-code:bg-muted prose-code:text-foreground prose-code:px-1 prose-code:py-0.5 prose-code:rounded-sm prose-code:text-sm prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-pre:border-border prose-pre:rounded-md [&_table]:!border-[color:var(--border)] [&_th]:!border-[color:var(--border)] [&_td]:!border-[color:var(--border)]","dangerouslySetInnerHTML":{"__html":"<h1>Watch for Drive Changes</h1>\n<blockquote>\n<p><strong>PREREQUISITE:</strong> Load the following skills to execute this recipe: <code>gws-events</code></p>\n</blockquote>\n<p>Subscribe to change notifications on a Google Drive file or folder.</p>\n<h2>Steps</h2>\n<ol>\n<li>Create subscription: <code>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}}'</code></li>\n<li>List active subscriptions: <code>gws events subscriptions list</code></li>\n<li>Renew before expiry: <code>gws events +renew --subscription SUBSCRIPTION_ID</code></li>\n</ol>"}}]