PluginBench
Skill
Pass
Audit score 90

recipe-watch-drive-changes

googleworkspace/cli

Subscribe to change notifications on Google Drive files and folders via Pub/Sub.

What is recipe-watch-drive-changes?

This recipe enables real-time monitoring of Google Drive changes by setting up event subscriptions. Use it when you need to react immediately to file or folder updates without polling.

  • Create event subscriptions for Google Drive file and folder changes
  • Receive notifications via Google Cloud Pub/Sub topics
  • List and manage active subscriptions
  • Renew subscriptions before expiry to maintain continuous monitoring
  • Include resource details in change notifications

How to install recipe-watch-drive-changes

npx skills add null --skill recipe-watch-drive-changes
Prerequisites
  • gws-events skill installed and configured
  • Google Cloud project with Pub/Sub enabled
  • Drive ID and Pub/Sub topic name for the subscription
  • Appropriate Google Workspace and Cloud IAM permissions
Claude Code
Cursor
Windsurf
Cline

How to use recipe-watch-drive-changes

  1. 1.Create a subscription using gws events subscriptions create with your Drive ID, event types, and Pub/Sub topic
  2. 2.Verify the subscription was created by running gws events subscriptions list
  3. 3.Set up a consumer to listen on your Pub/Sub topic for change notifications
  4. 4.Monitor the subscription expiry date and renew it before expiration using gws events renew

Use cases

Good for
  • Trigger automated workflows when files are modified in a shared Drive
  • Monitor a folder for new uploads and process them immediately
  • Sync Drive changes to an external system in real-time
  • Alert team members when critical documents are updated
  • Maintain an audit log of all changes to sensitive folders
Who it's for
  • DevOps engineers setting up Drive monitoring
  • Automation engineers building Drive-triggered workflows
  • System administrators managing shared Drive governance
  • Backend developers integrating Drive with event-driven systems

recipe-watch-drive-changes FAQ

What events can I subscribe to?

The recipe uses google.workspace.drive.file.v1.updated events. You can modify the eventTypes array in the subscription to monitor different Drive event types.

How long do subscriptions last?

Subscriptions have an expiry date. You must renew them before expiration using the gws events renew command to maintain continuous monitoring.

Where do notifications get sent?

Notifications are sent to a Google Cloud Pub/Sub topic that you specify. You need to set up a subscriber to consume messages from that topic.

Can I monitor multiple folders?

Yes, create separate subscriptions for each Drive or folder by specifying different targetResource values in the create command.

What information is included in notifications?

With includeResource set to true, notifications include the full resource details of the changed file or folder.

Full instructions (SKILL.md)

Source of truth, from googleworkspace/cli.


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