Before
An administrator would need to stop existing activity watches before creating replacements, because only one channel can exist for each resource. They would repeat this process for four event types and renew the watches before the six-hour limit expired.
How it works
- Receive a renewal request and stop the existing watches for Drive access changes, visibility changes, downloads, and deletions.
- Calculate a new expiration time six hours from the current time.
- Start fresh webhook watches for all four Drive activity types.
Workflow details
- Trigger and reset: An incoming emailhook starts the workflow, which begins by stopping the existing monitoring channels for the configured Drive activity types.
- Channel cleanup: The workflow clears watches for changes in user access, document visibility, downloads, and deletions so that new channels are not created on resources that are already being monitored.
- Renewal timing: It calculates a new expiration time by adding six hours to the current time, matching the stated maximum lifetime of each watch.
- Monitoring restart: Fresh webhook-based watches are then created for the four supported Drive events: user-access changes, visibility changes, downloads, and hard deletions of files already in the trash.
- Operational result: A single execution repeats the full stop-and-start sequence, keeping the selected Drive activity monitoring channels renewed without requiring separate manual maintenance for each event type.
What changed
The complete stop-and-restart sequence now runs from one incoming trigger, with the channel cleanup, six-hour expiration calculation, and four watch renewals handled automatically. Human operators no longer need to maintain each event watch separately.
Work removed
Manually stopping four existing Drive activity watches, checking the six-hour renewal window, calculating a new expiration time, and restarting the watches for access changes, visibility changes, downloads, and deletions.
Expected outcome
Expected outcome is continuous monitoring coverage through one automated renewal sequence approximately every six hours, replacing four recurring watch-maintenance sequences per cycle.

