Google Drive workflow with nested folder support
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.
What this workflow does
This workflow has 11 nodes and runs when another workflow calls it. Along the way it connects Google Drive.
How it runs
Trigger: When another workflow calls it.
- Get children folders from folder id (Google Drive): uses Google Drive
- If: checks a condition and branches into true / false
- Start sub-execution (Execute Sub-workflow): calls another n8n workflow
- If: checks a condition and branches into true / false
- Get all folder ids (Code): runs custom JavaScript code
- Return parent folder id (Edit Fields (Set)): sets or maps fields
- Return parent folder id to sub-workflow (Edit Fields (Set)): sets or maps fields
- Loop Over folder ids (Loop Over Items (Split in Batches)): loops over the items in batches
- Return all file ids (Edit Fields (Set)): sets or maps fields
- Get all files inside a folder (Google Drive): uses Google Drive
Services it uses
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.
Check at runtime on n8n 3.0
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- If
n8n-nodes-base.if - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Google Drive
n8n-nodes-base.googleDrive - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
👤 Who’s it for - Anyone who needs to recursively fetch all files from a specific Google Drive folder, including files inside all its nested (child) folders. - Ideal for automation builders, admins, and integrators who want to process, move, list, or report…