AutomationFlowsGeneral › Extract and Upload Files From Zip Archives to Google Drive

Extract and Upload Files From Zip Archives to Google Drive

ByDavid Soden @davidsoden on n8n.io

This workflow automatically extracts all files from an uploaded zip archive and uploads each file individually to Google Drive.

Event trigger★★★★☆ complexity10 nodesForm TriggerRead Write FileCompressionGoogle Drive
General Trigger: Event Nodes: 10 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #9795 — we link there as the canonical source.

This workflow follows the Form Trigger → Google Drive recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "41e9c34b-bff5-4d1a-a7f1-0e29b8dd7388",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -688,
        0
      ],
      "parameters": {
        "options": {},
        "formTitle": "my example form",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "file_upload",
              "multipleFiles": false
            }
          ]
        },
        "formDescription": "testing"
      },
      "typeVersion": 2.3
    },
    {
      "id": "f64cff98-d4c0-4df7-b270-52184d7a210b",
      "name": "Read/Write Files from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -496,
        -32
      ],
      "parameters": {
        "options": {},
        "fileName": "c:/temp_n8n.zip",
        "operation": "write",
        "dataPropertyName": "=file_upload"
      },
      "typeVersion": 1
    },
    {
      "id": "4a07bd3b-43df-4311-80f1-c2c2839abbe0",
      "name": "Compression",
      "type": "n8n-nodes-base.compression",
      "position": [
        -80,
        -48
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "edcb7065-742b-4336-9fdf-c23ef8e26974",
      "name": "Read/Write Files from Disk1",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -288,
        -32
      ],
      "parameters": {
        "options": {},
        "fileSelector": "={{ $('Read/Write Files from Disk').item.json.fileName }}"
      },
      "typeVersion": 1
    },
    {
      "id": "82e05ffe-0963-436f-b878-c7e674dde3d9",
      "name": "Upload to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        320,
        -80
      ],
      "parameters": {
        "name": "={{ $binary[Object.keys($binary)[$itemIndex]].fileName }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1leEuOROy_V6bis5oLEsLB3GBK5Kjq9d1",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1leEuOROy_V6bis5oLEsLB3GBK5Kjq9d1",
          "cachedResultName": "n8n_test"
        },
        "inputDataFieldName": "={{ 'file_'+$itemIndex }}"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "ab206c68-b5b3-409b-9d33-6ef607ceb7e4",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        128,
        -48
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "$binary"
      },
      "typeVersion": 1
    },
    {
      "id": "0428e83c-868e-443c-bb63-b23bd840e4e6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -128
      ],
      "parameters": {
        "color": 4,
        "height": 320,
        "content": "## #1 Optional Step \nUse a form to collect the zip file. THis form has one field to simplify the concept"
      },
      "typeVersion": 1
    },
    {
      "id": "2af84a31-1700-47f2-ab8d-37aa8b685af1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -160
      ],
      "parameters": {
        "color": 3,
        "width": 416,
        "height": 352,
        "content": "## #2 Local Processing\nDownload the file to the local n8n server so it can be accessed to properly decompress in the next step"
      },
      "typeVersion": 1
    },
    {
      "id": "6f2c5027-23cb-47c7-8beb-77f117aac139",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -192
      ],
      "parameters": {
        "width": 384,
        "height": 384,
        "content": "## #3 Decompress the file\n Allows access of one or more files inside, then split them out to batch process down stream\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ddf5fd05-5c31-46c4-a768-0adc34bd15f6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -224
      ],
      "parameters": {
        "color": 7,
        "height": 416,
        "content": "## #4 Upload to Drive\nYOu can upload the file to do anything you want to the files from this point on"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Upload to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compression": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Google Drive": {
      "main": [
        []
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk1": {
      "main": [
        [
          {
            "node": "Compression",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automatically extracts all files from an uploaded zip archive and uploads each file individually to Google Drive.

Source: https://n8n.io/workflows/9795/ — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Form Trigger, n8n, Form +2
General

AutoQoutesV2_template. Uses manualTrigger, httpRequest, stickyNote, googleSheets. Event-driven trigger; 28 nodes.

HTTP Request, Google Sheets, Google Drive +2
General

AutoClip – Automatically Generate Video Clips and Upload to YouTube. Uses manualTrigger, googleSheets, googleDrive, stickyNote. Event-driven trigger; 23 nodes.

Google Sheets, Google Drive, Read Write File +2
General

Credentials Transfer. Uses form, httpRequest, executeCommand, readWriteFile. Event-driven trigger; 22 nodes.

Form, HTTP Request, Execute Command +2
General

Form Code. Uses formTrigger, googleDrive, stickyNote. Event-driven trigger; 13 nodes.

Form Trigger, Google Drive