Use this powerful n8n workflow to recursively duplicate Google Drive folders, ensuring all files, subfolders, and sharing permissions are preserved for perfect clones. Utilize this advanced n8n automation template.
Download this n8n workflow template and start using it instantly.
Markdown-formatted string. System administrators needing to clone project folders while maintaining access control lists (ACLs). Users requiring advanced n8n templates for cloud storage management. Teams that need reliable backups of complex, deeply nested Google Drive structures. n8n automation specialists looking for a real-world example of recursive flow control using the Execute Workflow n8n node.
Managing large, complex folder structures in Google Drive can be challenging, especially when you need to clone an entire directory while ensuring that existing sharing settings are carried over. This specialized n8n workflow solves this problem by executing a deep, recursive copy.
Starting with simple configuration inputs, the automation processes the source folder level by level. It identifies files and folders separately, creates corresponding duplicates in the target location, and then uses the file metadata to recreate sharing permissions (excluding the original 'owner' role).
This robust n8n solution ensures complete duplication fidelity, making it ideal for creating project templates, archival copies, or performing permission-preserved migrations. It is a highly efficient and reliable n8n workflow built around native Google Drive operations.
This n8n workflow operates in two main phases: Initialization and Recursive Processing.
sourceFolderId (what you want to copy), the ID of the targetFolderId (where it should go), and the newFolderName.Execute Workflow n8n node to call itself. This immediately begins the recursive phase, passing the original source folder ID and the newly created destination folder ID as inputs.Copy File1). The original and new file IDs, along with original permissions, are prepared. An If n8n node checks if any permissions exist. If yes, a Code n8n node strips the 'owner' permission and prepares the data, followed by an Apply File Permission1 Google Drive n8n node to set the shares. Execution then continues to Level Completion.Create Subfolder1). Similar permission checking and application logic is used for the folder.Recursive Call to Self. This Execute Workflow n8n node calls the entire process again, using the newly copied subfolder's ID as the next source, ensuring every nested level is duplicated. This powerful n8n template logic allows for unlimited recursion depth.Markdown-formatted string.
New > Import from JSON).https://www.googleapis.com/auth/drive to allow file creation, copying, and permission management.sourceFolderId: The Google Drive ID of the folder you wish to clone.targetFolderId: The Google Drive ID of the parent folder where the copy should be placed.newFolderName: The desired name for the duplicated main folder.Execute Workflow n8n node for recursion, run it manually by clicking 'Execute Workflow'. Monitor the execution log to ensure the recursive calls are initiating correctly.Markdown-formatted string. Set Configuration (n8n node - Set): Used to initialize crucial variables like source and target folder IDs, and the name of the new folder. This allows easy modification of the n8n workflow parameters. Create Main Folder (Google Drive): Creates the initial top-level folder based on the targetFolderId and newFolderName. Start Recursive Processing (n8n node - Execute Workflow): This is the initial entry point to the recursive loop. It calls the n8n workflow itself, passing the necessary IDs to the sub-execution. Search Folder Contents1 (Google Drive): Uses a query search method to find all items within the current folder ID, returning the id, name, mimeType, and permissions for subsequent processing. Filter Files Only1 / Filter Folders Only1 (n8n node - Filter): Core logic for splitting the returned list based on mimeType. This is essential for directing files to the copy path and folders to the creation/recursion path. Copy File1 (Google Drive): Handles the physical duplication of a file to the new folder ID specified by the receiving n8n node execution context. Prepare File Permissions1 / Prepare Folder Permissions1 (n8n node - Code): These critical code n8n nodes parse the complex JSON permission data, exclude the 'owner' role (which cannot be copied), and restructure the data items into the format required by the Google Drive Share operation. Apply File Permission1 / Apply Folder Permission1 (Google Drive): Performs the Share operation on the newly created file or folder, applying the filtered permissions to match the source structure.* Recursive Call to Self (n8n node - Execute Workflow): The recursive n8n trigger. After a subfolder is created and its permissions are applied, this node calls the entire n8n template again, diving one level deeper into the folder hierarchy until all paths are processed.
Use this powerful n8n workflow to analyze an Instagram Reel using Google Gemini 2.0 and automatically generate a brand new, structurally identical video using the Minimax model on Replicate. Leverage advanced n8n templates for AI content generation.

Use this powerful n8n workflow to automatically detect failed Stripe subscription payments and dispatch personalized, urgent recovery emails crafted by an AI agent using the Postmark email service.

Maximize Shopify recovery rates with this powerful multi-touch abandoned cart n8n workflow. Features personalized emails, SMS discounts, WhatsApp reminders, and Facebook retargeting.

A specialized n8n workflow designed for Red Team operations to generate, simulate, and log tracking redirects using Google Sheets. This n8n template ensures robust logging for security simulations.

A comprehensive modular Reddit API management hub built as an n8n workflow. Automate post creation, comment handling, and subreddit data retrieval via dynamic operations.









































