recipe-watch-drive-changes

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Watch for Drive Changes

监控Drive变更

PREREQUISITE: Load the following skills to execute this recipe:
gws-events
Subscribe to change notifications on a Google Drive file or folder.
前提条件: 加载以下技能以执行此方案:
gws-events
订阅Google Drive文件或文件夹的变更通知。

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
  1. 创建订阅:
    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. 列出活跃订阅:
    gws events subscriptions list
  3. 到期前续订:
    gws events +renew --subscription SUBSCRIPTION_ID