AutomationFlowsData & Sheets › Drive to Data_driven Sheet

Drive to Data_driven Sheet

Drive to Data_Driven Sheet. Uses googleDrive, googleSheets. Scheduled trigger; 11 nodes.

Cron / scheduled trigger★★★★☆ complexity11 nodesGoogle DriveGoogle Sheets
Data & Sheets Trigger: Cron / scheduled Nodes: 11 Complexity: ★★★★☆ Added:

This workflow follows the Google Drive → Google Sheets 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
{
  "name": "Drive to Data_Driven Sheet",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "id": "a1b2c3d4-0001-0001-0001-000000000001",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        180,
        300
      ]
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "operation": "search",
        "queryString": "'BUNDLES_FOLDER_ID' in parents and trashed = false and mimeType = 'application/vnd.google-apps.folder'",
        "returnAll": true,
        "options": {
          "fields": "id,name,mimeType,webViewLink"
        }
      },
      "id": "a1b2c3d4-0002-0002-0002-000000000002",
      "name": "List Bundle Folders",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        400,
        300
      ]
    },
    {
      "parameters": {
        "batchSize": 1,
        "options": {}
      },
      "id": "a1b2c3d4-0003-0003-0003-000000000003",
      "name": "Loop Folders",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        620,
        300
      ]
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "operation": "search",
        "queryString": "={{ $json.id + ' in parents and trashed = false'}}",
        "returnAll": true,
        "options": {
          "fields": "id,name,mimeType,webViewLink,thumbnailLink"
        }
      },
      "id": "a1b2c3d4-0004-0004-0004-000000000004",
      "name": "List Bundle Children",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        840,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconst bundle = $('Loop Folders').item.json;\nlet thumbnails_folder_id = '';\nlet download_link = '';\nlet zip_name = '';\nfor (const item of items) {\n  const f = item.json;\n  const name = (f.name || '').toLowerCase();\n  const mime = f.mimeType || '';\n  if (mime === 'application/vnd.google-apps.folder' && name === 'thumnails') {\n    thumbnails_folder_id = f.id;\n  }\n  if (name.endsWith('.zip')) {\n    zip_name = f.name;\n    download_link = f.webViewLink || 'https://drive.google.com/file/d/' + f.id + '/view';\n  }\n}\nreturn [{ json: { folder_name: bundle.name, folder_id: bundle.id, thumbnails_folder_id, zip_name, download_link } }];"
      },
      "id": "a1b2c3d4-0005-0005-0005-000000000005",
      "name": "Extract Assets",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1060,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "cond1",
              "leftValue": "={{ $json.thumbnails_folder_id }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "a1b2c3d4-0006-0006-0006-000000000006",
      "name": "Has Thumbnails Folder?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1280,
        300
      ]
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "operation": "search",
        "queryString": "={{ $json.thumbnails_folder_id + ' in parents and trashed = false'}}",
        "returnAll": true,
        "options": {
          "fields": "id,name,mimeType,webViewLink,thumbnailLink"
        }
      },
      "id": "a1b2c3d4-0007-0007-0007-000000000007",
      "name": "List Thumbnail Images",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1500,
        200
      ]
    },
    {
      "parameters": {
        "jsCode": "const imageItems = $input.all();\nconst base = $('Extract Assets').item.json;\nconst thumbnails = imageItems.filter(item => { const f = item.json; const mime = f.mimeType || ''; const name = (f.name || '').toLowerCase(); return mime.startsWith('image/') || name.endsWith('.jpg') || name.endsWith('.jpeg') || name.endsWith('.png') || name.endsWith('.webp'); }).map(item => { const f = item.json; return f.thumbnailLink || f.webViewLink || 'https://drive.google.com/file/d/' + f.id + '/view'; });\nreturn [{ json: { title: base.folder_name, folder_id: base.folder_id, thumbnails: thumbnails.join(' | '), download_link: base.download_link } }];"
      },
      "id": "a1b2c3d4-0008-0008-0008-000000000008",
      "name": "Build Sheet Row",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1720,
        200
      ]
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "YOUR_GOOGLE_SHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Data_Driven",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "title": "={{ $json.title }}",
            "folder_id": "={{ $json.folder_id }}",
            "thumbnails": "={{ $json.thumbnails }}",
            "download_link": "={{ $json.download_link }}"
          },
          "matchingColumns": [
            "folder_id"
          ],
          "schema": [
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "folder_id",
              "displayName": "folder_id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnails",
              "displayName": "thumbnails",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "download_link",
              "displayName": "download_link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-0009-0009-0009-000000000009",
      "name": "Upsert to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        1940,
        200
      ]
    },
    {
      "parameters": {
        "jsCode": "const base = $('Extract Assets').item.json;\nreturn [{ json: { title: base.folder_name, folder_id: base.folder_id, thumbnails: '', download_link: base.download_link } }];"
      },
      "id": "a1b2c3d4-0010-0010-0010-000000000010",
      "name": "No Thumbnails Row",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1500,
        420
      ]
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "YOUR_GOOGLE_SHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Data_Driven",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "title": "={{ $json.title }}",
            "folder_id": "={{ $json.folder_id }}",
            "thumbnails": "={{ $json.thumbnails }}",
            "download_link": "={{ $json.download_link }}"
          },
          "matchingColumns": [
            "folder_id"
          ],
          "schema": [
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "folder_id",
              "displayName": "folder_id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnails",
              "displayName": "thumbnails",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "download_link",
              "displayName": "download_link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-0011-0011-0011-000000000011",
      "name": "Upsert No Thumbs",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        1720,
        420
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "List Bundle Folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Bundle Folders": {
      "main": [
        [
          {
            "node": "Loop Folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Folders": {
      "main": [
        [
          {
            "node": "List Bundle Children",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Bundle Children": {
      "main": [
        [
          {
            "node": "Extract Assets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Assets": {
      "main": [
        [
          {
            "node": "Has Thumbnails Folder?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Thumbnails Folder?": {
      "main": [
        [
          {
            "node": "List Thumbnail Images",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Thumbnails Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Thumbnail Images": {
      "main": [
        [
          {
            "node": "Build Sheet Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Sheet Row": {
      "main": [
        [
          {
            "node": "Upsert to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert to Sheet": {
      "main": [
        [
          {
            "node": "Loop Folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Thumbnails Row": {
      "main": [
        [
          {
            "node": "Upsert No Thumbs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert No Thumbs": {
      "main": [
        [
          {
            "node": "Loop Folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false
}
Pro

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

About this workflow

Drive to Data_Driven Sheet. Uses googleDrive, googleSheets. Scheduled trigger; 11 nodes.

Source: https://gist.github.com/Elazhari-cpu/fc0ca287d4385ad33dc82d142bd25115 — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

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

Data & Sheets

This workflow monitors Google Calendar for events indicating that a customer will visit the company today or the next day, retrieves the required details, and sends reminder notifications to the relev

Google Calendar, Google Sheets, HTTP Request +1
Data & Sheets

LefBot — V1 Master Pipeline (11 Feb). Uses googleSheets, httpRequest, googleDrive. Scheduled trigger; 37 nodes.

Google Sheets, HTTP Request, Google Drive
Data & Sheets

LefBot V1 Master Pipeline 11Feb. Uses googleSheets, httpRequest, googleDrive. Scheduled trigger; 37 nodes.

Google Sheets, HTTP Request, Google Drive
Data & Sheets

LefBot — V1 Master Pipeline (11 Feb v2). Uses googleSheets, httpRequest, googleDrive. Scheduled trigger; 37 nodes.

Google Sheets, HTTP Request, Google Drive
Data & Sheets

This n8n workflow automatically finds apartments for rent in Germany, filters them by your city, rent budget, and number of rooms, and applies to them via email. Each application includes: A personali

HTTP Request, Google Drive, Email Send +1