AutomationFlowsAI & RAG › Automate Invoice Processing with AI Data Extraction, Google Drive & Sheets

Automate Invoice Processing with AI Data Extraction, Google Drive & Sheets

ByRomain @romi-walker on n8n.io

This n8n workflow automates the complete processing of PDF invoices with AI-powered data extraction. The workflow monitors a Google Drive folder, extracts important invoice data, and automatically organizes files in a structured filing system. 🔍 Automatic monitoring of a Google…

Event trigger★★★★☆ complexityAI-powered29 nodesGoogle DriveInformation ExtractorGoogle SheetsGoogle Drive TriggerOpenAI Chat
AI & RAG Trigger: Event Nodes: 29 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Google Drive → Google Drive Trigger 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
{
  "nodes": [
    {
      "id": "0a5cd68e-9222-4880-bded-12aa813a02ce",
      "name": "GetFile",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        688,
        48
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "d55b9a49-d54a-46f9-81d9-035c81a04d9b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 403,
        "height": 293,
        "content": "## Text aus PDF extrahieren"
      },
      "typeVersion": 1
    },
    {
      "id": "7407a663-640e-4ad0-9add-b1062f6064d8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 435,
        "height": 293,
        "content": "## Informationsextrahierung mit KI"
      },
      "typeVersion": 1
    },
    {
      "id": "0b0f29e0-237c-4075-902a-7082b849b74f",
      "name": "Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1008,
        48
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemPromptTemplate": "Du bist ein erfahrener Extraktionsalgorithmus f\u00fcr Rechnungen.\nExtrahiere ausschlie\u00dflich relevante Informationen aus dem Text.\nWenn du den Wert eines gefragten Attributs nicht erkennst, darfst du den Attributwert weglassen. Gebe Betr\u00e4ge immer mit Komma als Dezimaltrennzeichen (1,99 statt 1.99), f\u00fcr die deutsche Schreibweise."
        },
        "attributes": {
          "attributes": [
            {
              "name": "Unternehmen",
              "required": true,
              "description": "Elisabeth HAKM"
            },
            {
              "name": "Kunde",
              "required": true,
              "description": "Kundenname "
            },
            {
              "name": "Rechnungsnummer",
              "required": true,
              "description": "Auf der Rechnung angegebene Rechnungsnummer"
            },
            {
              "name": "Rechnungsdatum",
              "required": true,
              "description": "Das Rechnungsdatum im Format \"YYYY-mm-dd\". Ist kein solches erkennbar, nutze das Zahlungsdatum."
            },
            {
              "name": "Nettobetrag",
              "required": true,
              "description": "Der Nettobetrag + \u20ac (ohne Mehrwertsteuer). Falls nicht explizit angegeben, berechne ihn aus dem Bruttobetrag und dem Steuersatz."
            },
            {
              "name": "Mehrwertsteuer",
              "required": true,
              "description": "Der Mehrwertsteuerbetrag."
            },
            {
              "name": "Monat",
              "required": true,
              "description": "Der ausgeschriebene Monat des Rechnungsdatums (\"Januar\", \"Februar\". etc.)"
            },
            {
              "name": "Jahr",
              "required": true,
              "description": "Der Jahr des Rechnungsdatums (\"2024\", \"2025\", etc.)"
            },
            {
              "name": "Artikel",
              "required": true,
              "description": "Z\u00e4hle alle Artikel zusammen "
            },
            {
              "name": "Kundennummer",
              "required": true,
              "description": "Kundennummer"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8373c145-db20-4294-87eb-da985c84107b",
      "name": "ExtractFromPDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        864,
        48
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "a2804a83-35b8-44fd-8c27-8c9529ce3032",
      "name": "Loop",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        448,
        48
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3,
      "alwaysOutputData": false
    },
    {
      "id": "0f0a91ea-bcf4-4135-a2b5-f2c22863849d",
      "name": "GetYearFolder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1296,
        48
      ],
      "parameters": {
        "filter": {
          "driveId": {
            "mode": "list",
            "value": "My Drive"
          },
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "15m2uc0MJyvzv-QHvzXYu4Yfp4C2SG-ou",
            "cachedResultUrl": "https://drive.google.com/drive/folders/15m2uc0MJyvzv-QHvzXYu4Yfp4C2SG-ou",
            "cachedResultName": "Buchhaltung / Rechnungen"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "queryString": "={{ $json.output.Jahr }}"
      },
      "typeVersion": 3
    },
    {
      "id": "172ed9b2-ee6c-4c9f-958f-49e7bfa22d7d",
      "name": "GetMonthFolder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1456,
        48
      ],
      "parameters": {
        "filter": {
          "driveId": {
            "__rl": true,
            "mode": "list",
            "value": "My Drive",
            "cachedResultUrl": "https://drive.google.com/drive/my-drive",
            "cachedResultName": "My Drive"
          },
          "folderId": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.id }}"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "queryString": "={{ $('Information Extractor').item.json.output.Monat }}"
      },
      "typeVersion": 3,
      "alwaysOutputData": false
    },
    {
      "id": "b643e996-22f9-4603-aeb7-65c56e2e0513",
      "name": "MoveFile",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1632,
        48
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('GetFile').item.json.id }}"
        },
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "operation": "move"
      },
      "typeVersion": 3
    },
    {
      "id": "7dd0b378-27a7-412d-82a2-489ca554e742",
      "name": "UpdateFileName",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1808,
        48
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "update",
        "newUpdatedFileName": "={{ $('Information Extractor').item.json.output.Kunde }}     \n{{ $('Information Extractor').item.json.output.Monat }} {{ $('Information Extractor').item.json.output.Jahr }}"
      },
      "typeVersion": 3
    },
    {
      "id": "b3d8208f-7e0a-4c52-a5ea-4808b457ca8f",
      "name": "AddToOverview",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2032,
        48
      ],
      "parameters": {
        "columns": {
          "value": {
            "Jahr": "={{ $('Information Extractor').item.json.output.Jahr }}",
            "MwST": "={{ $('Information Extractor').item.json.output.Mehrwertsteuer }}",
            "Kunde": "={{ $('Information Extractor').item.json.output.Kunde }}",
            "Monat": "={{ $('Information Extractor').item.json.output.Monat }}",
            "Nettobetrag": "={{ $('Information Extractor').item.json.output.Nettobetrag }}",
            "Kundennummer": "={{ $('Information Extractor').item.json.output.Kundennummer }}",
            "Rechnungsdatum": "={{ $('Information Extractor').item.json.output.Rechnungsdatum }}",
            "Rechnungsnummer": "={{ $('Information Extractor').item.json.output.Rechnungsnummer }}",
            "Elisabeth Standort": "={{ $('Information Extractor').item.json.output.Unternehmen }}"
          },
          "schema": [
            {
              "id": "Kundennummer",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Kundennummer",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Kunde",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Kunde",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Elisabeth Standort",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Elisabeth Standort",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Rechnungsdatum",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Rechnungsdatum",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Rechnungsnummer",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Rechnungsnummer",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "MwST",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "MwST",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Nettobetrag",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Nettobetrag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Monat",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Monat",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Jahr",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Jahr",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Datei",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Datei",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ia3tDmpdMXi1Dt_grlnM_LcGp_4TVr_2KivXTspBPoI/edit#gid=0",
          "cachedResultName": "Tabellenblatt1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "11mzYAgYMJFAtpHCHtDbTogUPdwLLywzbTxjR-UR2DY8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/11mzYAgYMJFAtpHCHtDbTogUPdwLLywzbTxjR-UR2DY8/edit?usp=drivesdk",
          "cachedResultName": "Buchaltung / rechnungen"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "b0f0b691-2d65-4509-a1f4-c53c023369e9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 671,
        "height": 293,
        "content": "## Rechnung in entsprechenden Ordner verschieben und umbennenen"
      },
      "typeVersion": 1
    },
    {
      "id": "355e53d3-c12e-48cb-90a7-79e44f799bfb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 207,
        "height": 293,
        "content": "## Dokumentieren"
      },
      "typeVersion": 1
    },
    {
      "id": "2f706eb5-4f51-4156-913d-4d1cd107c57e",
      "name": "Search files and folders",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        256,
        48
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "1Zc6vLxnVqTX1oZbn5lj54bRntQaDOnqy",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1Zc6vLxnVqTX1oZbn5lj54bRntQaDOnqy",
            "cachedResultName": "Rechnungsablage"
          }
        },
        "options": {},
        "resource": "fileFolder"
      },
      "typeVersion": 3
    },
    {
      "id": "1620598b-aace-4c65-9408-8d34c1aeaf61",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        96,
        48
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1Zc6vLxnVqTX1oZbn5lj54bRntQaDOnqy",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1Zc6vLxnVqTX1oZbn5lj54bRntQaDOnqy",
          "cachedResultName": "Rechnungsablage"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fce00738-71de-41e4-91ed-ff1cd0b0b90c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        944,
        256
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "6fec458f-6966-47ef-800a-fc7291c89d4f",
      "name": "Jahresordner schon vorhanden?",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        976,
        -624
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "15m2uc0MJyvzv-QHvzXYu4Yfp4C2SG-ou",
            "cachedResultUrl": "https://drive.google.com/drive/folders/15m2uc0MJyvzv-QHvzXYu4Yfp4C2SG-ou",
            "cachedResultName": "Buchhaltung / Rechnungen"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "returnAll": true,
        "queryString": "={{ $json.jahr }}"
      },
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "ffc3e80a-331d-4e04-90e7-8128f3a56c22",
      "name": "Jahresordner erstellen",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1376,
        -656
      ],
      "parameters": {
        "name": "={{ $('Loop Over Items').item.json.jahr }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "15m2uc0MJyvzv-QHvzXYu4Yfp4C2SG-ou",
          "cachedResultUrl": "https://drive.google.com/drive/folders/15m2uc0MJyvzv-QHvzXYu4Yfp4C2SG-ou",
          "cachedResultName": "Buchhaltung / Rechnungen"
        },
        "resource": "folder"
      },
      "typeVersion": 3
    },
    {
      "id": "a9b953c5-65fa-43dd-9ab5-d7318dfded48",
      "name": "Monatsordner einf\u00fcgen",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1904,
        -576
      ],
      "parameters": {
        "name": "={{ $json.monate }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Jahresordner erstellen').item.json.id }}"
        },
        "resource": "folder"
      },
      "typeVersion": 3
    },
    {
      "id": "06c01fd7-7c2f-49ee-83f2-1cd3015ac40f",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1712,
        -656
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "monate"
      },
      "typeVersion": 1
    },
    {
      "id": "587f8a5e-cf80-492c-878b-7425fad5bdb1",
      "name": "Monate als Liste",
      "type": "n8n-nodes-base.set",
      "position": [
        1552,
        -656
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3d0336a2-4706-42ad-9b5a-b1ba22f7c859",
              "name": "monate",
              "type": "array",
              "value": " [\"Januar\", \"Februar\", \"M\u00e4rz\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "be4e4b96-3f3f-4748-adb6-bbcc971f5735",
      "name": "Jahre ausw\u00e4hlen",
      "type": "n8n-nodes-base.set",
      "position": [
        352,
        -656
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e8e78387-492a-4668-97d6-e5be1e512661",
              "name": "jahr",
              "type": "array",
              "value": "[2024, 2025, 2026]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ccdfdfad-5274-478e-8df3-0edc92009a10",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        544,
        -656
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "jahr"
      },
      "typeVersion": 1
    },
    {
      "id": "9331d30f-00c5-4280-9839-1962567491b5",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        736,
        -656
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "5a940700-4503-46bd-9cfa-137dbde8334a",
      "name": "Ordner noch nicht vorhanden",
      "type": "n8n-nodes-base.if",
      "position": [
        1184,
        -624
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "8947703c-9256-4466-be49-0480aaace705",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.isEmpty() }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "76c34fbf-4a00-4550-bca3-74c053b6512a",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -752
      ],
      "parameters": {
        "width": 352,
        "height": 384,
        "content": "## Jahres / Monatsordner erstellen\n\nDieser Workflow erstellt die Jahresordner und die dazugeh\u00f6rigen Monatsordner.\n\nBeim Ausf\u00fchren werden erst die Jahresordner die angegeben wurden erstellt, und dann werden in den Jahresordnern die jeweils angegebenen Monatsordner erstellt.\n\nZur Sicherheit dass die Ordner nicht mehrmals erstellt werden, wird beim erneuten ausf\u00fchren eine Pr\u00fcfung erstellt ob die jeweiligen Ordner bereits bestehen und werden nicht mehr erstellt.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "cccb756b-6c98-4b03-9694-bafea20b850f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -800
      ],
      "parameters": {
        "color": 5,
        "width": 1872,
        "height": 544,
        "content": "# Ordner f\u00fcr Rechnungen erstellen"
      },
      "typeVersion": 1
    },
    {
      "id": "ee2a84b2-2a56-4cda-b555-425680607b74",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -240
      ],
      "parameters": {
        "color": 3,
        "width": 2160,
        "height": 688,
        "content": "# Eingehende Rechnungen verarbeiten"
      },
      "typeVersion": 1
    },
    {
      "id": "1099fef3-f704-4da8-afc9-9dc39e51c485",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -288
      ],
      "parameters": {
        "color": 4,
        "width": 576,
        "height": 800,
        "content": "\ud83e\uddfe Automated Invoice Processing - n8n Workflow\n\ud83d\udcd6 Workflow Description\nThis n8n workflow automates the complete processing of PDF invoices with AI-powered data extraction. The workflow monitors a Google Drive folder, extracts important invoice data, and automatically organizes files in a structured filing system.\n\n\ud83c\udfaf Features\n\ud83d\udd0d Automatic monitoring of a Google Drive folder for new PDF files\n\ud83e\udd16 AI-powered data extraction from invoices (customer, amount, date, etc.)\n\ud83d\udcc1 Intelligent file sorting by year and month\n\ud83d\udcdd Automatic renaming following a consistent schema\n\ud83d\udcca Central documentation in Google Sheets\n\ud83d\udd27 Required Integrations\nRequired Accounts:\nGoogle Drive (with folder permissions)\nGoogle Sheets (with write permissions)\nGoogle Gemini API (for AI data extraction)\nUsed n8n Nodes:\nGoogle Drive Trigger\nGoogle Drive (File Operations)\nGoogle Sheets\nExtract from File (PDF)\nInformation Extractor (LangChain)\nGoogle Gemini Chat Model\nSplit in Batches\n\ud83d\udccb Workflow Steps in Detail\n1. Monitoring & Triggering\nGoogle Drive Trigger monitors a defined input folder\nAutomatically starts when new PDF files are detected\nSplit in Batches enables batch processing of multiple files\n2. File Processing\nGetFile downloads PDF files from Google Drive\nExtractFromPDF converts PDF content to text\nSupports scanned documents as well\n3. AI Data Extraction\nThe Information Extractor node with Google Gemini extracts:\n\nCompany name/sender\nCustomer name and customer number\nInvoice number and date\nNet and gross amount\nValue-added tax\nArticle description\nMonth and year (for sorting)\n4. Automatic Filing\nGetYearFolder searches/creates year folders\nGetMonthFolder searches/creates month folders\nMoveFile moves invoice to correct folder\nUpdateFileName renames file (schema: \u201cCustomer Month Year\u201d)\n5. Documentation\nAddToOverview enters all data into Google Sheets table\nEnables central overview and analysis\n\u2699\ufe0f Setup Instructions\nStep 1: Prepare Google Drive\nCreate the following folder structure in Google Drive:\n\n\ud83d\udcc1 [Input Folder] (e.g., \"Invoices-Inbox\")\n\ud83d\udcc1 [Main Folder] (e.g., \"Accounting\")\n   \u2514\u2500\u2500 \ud83d\udcc1 2024\n       \u251c\u2500\u2500 \ud83d\udcc1 January\n       \u251c\u2500\u2500 \ud83d\udcc1 February\n       \u251c\u2500\u2500 \ud83d\udcc1 March\n       \u2514\u2500\u2500 ... (all months)\n   \u2514\u2500\u2500 \ud83d\udcc1 2025\n       \u2514\u2500\u2500 ... (all months)\nStep 2: Create Google Sheets Table\nCreate a spreadsheet with the following columns:\n\nCustomer Number\nCustomer\n[Company Name] Location\nInvoice Date\nInvoice Number\nVAT\nNet Amount\nMonth\nYear\nStep 3: Configure Workflow\nConfigure Google Drive Trigger:\nSelect your input folder as \u201cFolder to Watch\u201d\nSet \u201cEvent\u201d to \u201cfileCreated\u201d\nActivate the trigger\nSearch files and folders:\nSelect the same input folder as filter\nCustomize Information Extractor:\nAdapt attribute names to your needs\nChange company name in description\nAdjust system prompt if needed\nGetYearFolder & GetMonthFolder:\nSet the correct folder ID for your main folder\nCheck query string for year/month search\nAddToOverview:\nSelect your Google Sheets table\nMap columns according to your table\n\ud83d\udd27 Customization Options\nExtend Data Extraction:\nAdd more attributes in the Information Extractor node:\n\n{\n  \"name\": \"Payment Terms\",\n  \"description\": \"Days until payment due\",\n  \"required\": false\n}\nCustomize File Naming:\nChange the schema in the UpdateFileName node:\n\n\"{{ $('Information Extractor').item.json.output.InvoiceNumber }} - {{ $('Information Extractor').item.json.output.Customer }}\"\nChange Monitoring Interval:\nIn Google Drive Trigger under \u201cPoll Times\u201d select different intervals.\n\n\ud83d\udea8 Important Notes\n\u26a0\ufe0f Permissions:\nGoogle Drive: Full access to configured folders\nGoogle Sheets: Write permission for target table\nGoogle Gemini: Valid API key required\n\ud83d\udcdd Data Format:\nWorks with German number formats (comma as decimal separator)\nDate format: YYYY-MM-DD\nSupports various PDF formats\n\ud83d\udd04 Error Handling:\nWorkflow fails if folders are missing\nIncomplete PDFs may lead to incomplete extractions\nCheck logs for troubleshooting\n\ud83d\udcca Performance & Limitations\nProcessing time: 30-60 seconds per invoice\nSupported formats: PDF (text and OCR)\nBatch processing: Yes, multiple files simultaneously\nAI accuracy: ~95% for standardized invoices\n\ud83e\uddea Testing\nRun Test:\n\nUpload a test PDF to the input folder\nMonitor workflow execution in n8n\nCheck results in Google Sheets\nVerify correct file movement and renaming\nError Diagnosis:\n\nFor errors: check n8n logs\nConsider Google API quotas\nValidate folder permissions\n\ud83d\udcc4 License & Support\nThis workflow can be used and customized freely. For configuration questions or issues, check the n8n community or Google API documentation.\n\nTip: Start with a few test invoices before using the workflow in production!"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Loop": {
      "main": [
        [],
        [
          {
            "node": "GetFile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetFile": {
      "main": [
        [
          {
            "node": "ExtractFromPDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MoveFile": {
      "main": [
        [
          {
            "node": "UpdateFileName",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Monatsordner einf\u00fcgen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AddToOverview": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetYearFolder": {
      "main": [
        [
          {
            "node": "GetMonthFolder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ExtractFromPDF": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetMonthFolder": {
      "main": [
        [
          {
            "node": "MoveFile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateFileName": {
      "main": [
        [
          {
            "node": "AddToOverview",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Jahresordner schon vorhanden?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jahre ausw\u00e4hlen": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monate als Liste": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "GetYearFolder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jahresordner erstellen": {
      "main": [
        [
          {
            "node": "Monate als Liste",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monatsordner einf\u00fcgen": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ordner noch nicht vorhanden": {
      "main": [
        [
          {
            "node": "Jahresordner erstellen",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jahresordner schon vorhanden?": {
      "main": [
        [
          {
            "node": "Ordner noch nicht vorhanden",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

This n8n workflow automates the complete processing of PDF invoices with AI-powered data extraction. The workflow monitors a Google Drive folder, extracts important invoice data, and automatically organizes files in a structured filing system. 🔍 Automatic monitoring of a Google…

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

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

This comprehensive workflow automates the entire invoice processing pipeline by monitoring a Google Drive folder for new invoice uploads, intelligently processing both PDF and image formats, extractin

OpenAI Chat, Google Drive Trigger, Google Drive +4
AI & RAG

This template automates the extraction of structured data from Thai government letters received via LINE or uploaded to Google Drive. It uses Mistral AI for OCR and OpenAI for information extraction,

HTTP Request, Google Drive Trigger, Google Drive +4
AI & RAG

This workflow automates the end-to-end process of extracting and summarizing information from PDFs stored in a specific Google Drive folder. When a new PDF or any binary data is added, the workflow is

Google Drive Trigger, Information Extractor, OpenAI Chat +4
AI & RAG

Eliminate 90% of manual work in procurement by automating quote requests, response tracking, price extraction, and supplier follow-ups. This complete automation handles everything from sending persona

Gmail, Google Sheets, Information Extractor +2
AI & RAG

Transform your Gmail sent folder into a comprehensive, enriched contact database automatically. This workflow processes hundreds or thousands of sent emails, extracting and enriching contact informati

HTTP Request, @Brave/N8N Nodes Brave Search, Gmail +3