仓库原始内容
按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。
Watch for Drive Changes
PREREQUISITE: Load the following skills to execute this recipe: gws-eventsSubscribe to change notifications on a Google Drive file or folder.
Steps
- 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}}' - List active subscriptions:
gws events subscriptions list - Renew before expiry:
gws events +renew --subscription SUBSCRIPTION_ID

