Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot official · Google

recipe-watch-drive-changes — Claude Code skill: install and usage

This skill subscribes to Google Drive file or folder change notifications using the gws CLI. It helps track document updates via Pub/Sub topics.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add googleworkspace/cli --skill recipe-watch-drive-changes -a claude-code
Open on GitHub

What recipe-watch-drive-changes does

This skill provides a ready-made workflow around the gws command-line tool. It creates subscriptions for google.workspace.drive.file.v1.updated events, routing payloads directly to a Google Cloud Pub/Sub topic. It also covers listing current subscriptions and renewing them before expiration.

You need the gws binary installed and the gws-events skill loaded beforehand. If your setup does not rely on Google Cloud Pub/Sub for Drive webhooks, this recipe will not fit.

What it helps with

  • subscribe to file and folder updates in Google Drive
  • forward Drive modification events to a Google Cloud Pub/Sub topic
  • list active subscriptions using gws events subscriptions list
  • renew an active Drive event subscription before it expires

Example prompts for the agent

  • Subscribe to Google Drive folder updates using recipe-watch-drive-changes
  • List all active Drive event subscriptions with gws
  • Renew my Google Drive event subscription before it expires

How to install recipe-watch-drive-changes

1Skills CLI (Vercel)

npx skills add googleworkspace/cli --skill recipe-watch-drive-changes -a claude-code

2Manually: put the files in place

~/.claude/skills/recipe-watch-drive-changes/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/recipe-watch-drive-changes/

From the same set95

The whole set →
gws-gmail official googleworkspace This skill hands your agent Gmail: send mail, read the inbox, reply in a thread. Useful when email work already runs through the gws CLI. Claude Code CX Codex Cursor +1 81,900installs gws-gmail-send official googleworkspace A skill that teaches your agent to send Gmail from the terminal: recipients, subject, body, attachments and drafts. Claude Code CX Codex Cursor +1 74,700installs gws-drive official googleworkspace This skill hands your agent Google Drive through the gws CLI: files, folders, shared drives, comments and access requests. Useful when docs move through code. Claude Code CX Codex Cursor +1 74,500installs gws-shared official googleworkspace This skill gives agents shared rules for gws CLI authentication, flags, and output formats. Use it when working with gws commands. Claude Code CX Codex Cursor +1 66,000installs gws-calendar official googleworkspace Manage Google Calendar events, access rules, and schedules through the gws CLI tool. Claude Code CX Codex Cursor +1 61,100installs gws-sheets official googleworkspace This skill lets an agent read and edit Google Sheets through the CLI. Use it when a coding workflow needs spreadsheet data or table updates. Claude Code CX Codex Cursor +1 58,800installs gws-docs official googleworkspace This skill lets an agent read and update Google Docs through gws. Use it when document changes should happen from an agent chat. Claude Code CX Codex Cursor +1 58,300installs gws-sheets-read official googleworkspace Reads cell values and sheets from Google Spreadsheets via CLI. Useful when an agent needs spreadsheet data without risk of altering it. Claude Code CX Codex Cursor +1 50,600installs

Similar

Questions about recipe-watch-drive-changes

How do I install recipe-watch-drive-changes in Claude Code?

Run npx skills add googleworkspace/cli --skill recipe-watch-drive-changes -a claude-code. The file will be placed in ~/.claude/skills/recipe-watch-drive-changes/SKILL.md.

What does recipe-watch-drive-changes do?

It sets up notifications for Google Drive updates. The recipe details commands for creating Pub/Sub event subscriptions, checking status, and renewing them.

What are the prerequisites for this skill?

You need the gws CLI binary and the companion gws-events skill. Both are required to execute the subscription commands.

Source text

SKILL.md · Apache-2.0
---
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`

© googleworkspace · Apache-2.0 · googleworkspace/cli

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor