{
  "name": "Recursive Google Drive folder duplicator with permission preservation",
  "nodes": [
    {
      "id": "4a36d370-4d43-4090-a8e0-6e2002550bfc",
      "name": "Set Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1328,
        7968
      ]
    },
    {
      "id": "4107d258-363c-4bf9-b5bf-3cfa2a8e7f8e",
      "name": "Create Main Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1168,
        7968
      ]
    },
    {
      "id": "5b2cdf23-9f31-4668-a5cc-0dd2d6b94129",
      "name": "Start Recursive Processing",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1008,
        7968
      ]
    },
    {
      "id": "59abdaa3-b57e-4c75-a07e-1b8e720fb5ac",
      "name": "Main Completion",
      "type": "n8n-nodes-base.set",
      "position": [
        -848,
        7968
      ]
    },
    {
      "id": "62d4d9eb-7c1d-48c8-bf0b-55269ee4caeb",
      "name": "Prepare File Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -864,
        8448
      ]
    },
    {
      "id": "27f8d8ca-96ab-41e8-96db-33afdbd63959",
      "name": "Recursive Call to Self",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -160,
        8656
      ]
    },
    {
      "id": "15343d75-5c61-4de7-9ce4-4250ceccc03d",
      "name": "Level Completion",
      "type": "n8n-nodes-base.set",
      "position": [
        64,
        8464
      ]
    },
    {
      "id": "0221146d-05a2-4c8f-a812-8b7ebe3e6a1c",
      "name": "Search Folder Contents1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1344,
        8544
      ]
    },
    {
      "id": "b437a057-3931-4c8e-ab6b-fab0f9f117dc",
      "name": "Filter Files Only1",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1184,
        8448
      ]
    },
    {
      "id": "ce118b58-cd56-4eaf-adea-e2e117eec17e",
      "name": "Filter Folders Only1",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1184,
        8640
      ]
    },
    {
      "id": "4b80da29-fc25-48db-8aed-0f8c5ef13526",
      "name": "Copy File1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1024,
        8448
      ]
    },
    {
      "id": "38835c99-1d5c-4571-a505-ac3a57db699b",
      "name": "Check File Has Permissions1",
      "type": "n8n-nodes-base.if",
      "position": [
        -704,
        8448
      ]
    },
    {
      "id": "9c25ddac-17de-45c9-b106-e13e740f8385",
      "name": "Prepare File Permissions1",
      "type": "n8n-nodes-base.code",
      "position": [
        -512,
        8272
      ]
    },
    {
      "id": "b2927eae-9f20-49ab-a60b-8fc5e6784cdb",
      "name": "Apply File Permission1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -352,
        8272
      ]
    },
    {
      "id": "bc443b2f-cc4b-4474-a78c-1d2ec1e4f500",
      "name": "Create Subfolder1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1024,
        8640
      ]
    },
    {
      "id": "01063a74-b9a6-4378-95b3-4dce49690f6f",
      "name": "Prepare Folder Data1",
      "type": "n8n-nodes-base.set",
      "position": [
        -864,
        8640
      ]
    },
    {
      "id": "d223bee5-58d6-4f38-8eab-9ec0a4101a08",
      "name": "Check Folder Has Permissions1",
      "type": "n8n-nodes-base.if",
      "position": [
        -704,
        8640
      ]
    },
    {
      "id": "e840b153-3754-4fb2-88b9-97a4e675e05c",
      "name": "Prepare Folder Permissions1",
      "type": "n8n-nodes-base.code",
      "position": [
        -512,
        8544
      ]
    },
    {
      "id": "f4a0f68a-947a-4f57-b3fd-18a5d819592b",
      "name": "Apply Folder Permission1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -352,
        8544
      ]
    },
    {
      "id": "c3779818-366b-4a85-9422-8c72d4da956f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1856,
        7664
      ],
      "parameters": {
        "width": 368,
        "height": 1200,
        "content": "# Google Drive Folder Duplicator with Permissions\n\n## This workflow creates a complete duplicate of any Google Drive folder\nIncluding:\n- All files and subfolders (recursive)\n- Preserving folder struct"
      }
    },
    {
      "id": "0720dc37-20be-486e-9e7e-6086927013d1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        7664
      ],
      "parameters": {
        "width": 1792,
        "height": 480,
        "content": "## START HERE\n\nConfiguration Hub\n\nThis node sets up the workflow parameters:\n- Source folder to duplicate\n- Target destination folder\n- New folder name\n\nEdit these values before running the workflow."
      }
    },
    {
      "id": "6fbd5544-e61b-4cfd-a982-271eed9f45db",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        8160
      ],
      "parameters": {
        "width": 1792,
        "height": 704,
        "content": "## CORE RECURSIVE ENGINE\n\n1. SCAN: Discovers all folder contents (files + subfolders)\n2. SPLIT: Separates files from folders \n3. COPY: Duplicates files with permissions\n4. CREATE: Makes subfolders wit"
      }
    }
  ],
  "connections": {
    "Copy File1": {
      "main": [
        [
          {
            "node": "Prepare File Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Subfolder1": {
      "main": [
        [
          {
            "node": "Prepare Folder Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare File Data": {
      "main": [
        [
          {
            "node": "Check File Has Permissions1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Configuration": {
      "main": [
        [
          {
            "node": "Create Main Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Main Folder": {
      "main": [
        [
          {
            "node": "Start Recursive Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Files Only1": {
      "main": [
        [
          {
            "node": "Copy File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Folders Only1": {
      "main": [
        [
          {
            "node": "Create Subfolder1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Folder Data1": {
      "main": [
        [
          {
            "node": "Check Folder Has Permissions1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply File Permission1": {
      "main": [
        [
          {
            "node": "Level Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Call to Self": {
      "main": [
        [
          {
            "node": "Level Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Folder Contents1": {
      "main": [
        [
          {
            "node": "Filter Files Only1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Filter Folders Only1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Folder Permission1": {
      "main": [
        [
          {
            "node": "Recursive Call to Self",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare File Permissions1": {
      "main": [
        [
          {
            "node": "Apply File Permission1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Recursive Processing": {
      "main": [
        [
          {
            "node": "Main Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check File Has Permissions1": {
      "main": [
        [
          {
            "node": "Prepare File Permissions1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Level Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Folder Permissions1": {
      "main": [
        [
          {
            "node": "Apply Folder Permission1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Folder Has Permissions1": {
      "main": [
        [
          {
            "node": "Prepare Folder Permissions1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Recursive Call to Self",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}