Monitor file changes with Google Drive push notifications
Ready for 3.0What this workflow does
This workflow has 20 nodes and runs when an HTTP POST request hits its webhook URL (plus 3 other triggers). It uses only n8n's built-in nodes. It also calls googleapis.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 3 other triggers).
- Get Registration From WorkflowStaticData (Code): runs custom JavaScript code
- Set Variables (Edit Fields (Set)): sets 4 fields: driveId, channelId, channelToken…
- Register Notification Channel (Execute Sub-workflow): calls another n8n workflow
- Is Valid Request? (If): checks a condition and branches into true / false
- Get Registration (Code): runs custom JavaScript code
- Get Changes List (HTTP Request): calls googleapis.com
- Stop Any Existing Notifications (HTTP Request): calls googleapis.com (POST)
- Save NextPageToken to WorkflowStaticData (Code): runs custom JavaScript code
- Change Events to Items (Split Out): splits a list into separate items
- Get StartPageToken (HTTP Request): calls googleapis.com
…plus 4 more steps. See the full node list below.
HTTP calls to: googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Split Out
n8n-nodes-base.splitOut - Filter
n8n-nodes-base.filter - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Webhook
n8n-nodes-base.webhook - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Execute Sub-workflow
n8n-nodes-base.executeWorkflow
From the author
Tired of being let down by the Google Drive Trigger? Rather not exhaust system resources by polling every minute? Then this workflow is for you! Google drive is a great storage option for automation due to its relative simplicity, cheap costs and…