AIデータ抽出、gcs(Google Drive)、Sheetsを使った請求書処理の自動化

上級

これはMiscellaneous, AI Summarization, Multimodal AI分野の自動化ワークフローで、29個のノードを含みます。主にIf, Set, SplitOut, GoogleDrive, GoogleSheetsなどのノードを使用。 AIデータ抽出、Google Drive、および Sheets を用いた請求書処理の自動化

前提条件
  • Google Drive API認証情報
  • Google Sheets API認証情報
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "051a8fba2e1c6188b420b5f55a07b296d40abc8a58f64f7a42438ab083c28197"
  },
  "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": "付箋2",
      "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": "付箋3",
      "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": "情報抽出器",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1008,
        48
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemPromptTemplate": "Du bist ein erfahrener Extraktionsalgorithmus für Rechnungen.\nExtrahiere ausschließlich relevante Informationen aus dem Text.\nWenn du den Wert eines gefragten Attributs nicht erkennst, darfst du den Attributwert weglassen. Gebe Beträge immer mit Komma als Dezimaltrennzeichen (1,99 statt 1.99), für 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 + € (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ähle 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": "付箋4",
      "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": "付箋5",
      "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": "ファイルとフォルダを検索",
      "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 ドライブ 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 チャットモデル",
      "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ügen",
      "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": "分割出力1",
      "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ärz\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "be4e4b96-3f3f-4748-adb6-bbcc971f5735",
      "name": "Jahre auswählen",
      "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": "分割出力",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        544,
        -656
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "jahr"
      },
      "typeVersion": 1
    },
    {
      "id": "9331d30f-00c5-4280-9839-1962567491b5",
      "name": "ループ処理",
      "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": "付箋7",
      "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örigen Monatsordner.\n\nBeim Ausführen 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ühren eine Prüfung erstellt ob die jeweiligen Ordner bereits bestehen und werden nicht mehr erstellt.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "cccb756b-6c98-4b03-9694-bafea20b850f",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -800
      ],
      "parameters": {
        "color": 5,
        "width": 1872,
        "height": 544,
        "content": "# Ordner für Rechnungen erstellen"
      },
      "typeVersion": 1
    },
    {
      "id": "ee2a84b2-2a56-4cda-b555-425680607b74",
      "name": "付箋6",
      "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": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -288
      ],
      "parameters": {
        "color": 4,
        "width": 576,
        "height": 800,
        "content": "🧾 Automated Invoice Processing - n8n Workflow\n📖 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🎯 Features\n🔍 Automatic monitoring of a Google Drive folder for new PDF files\n🤖 AI-powered data extraction from invoices (customer, amount, date, etc.)\n📁 Intelligent file sorting by year and month\n📝 Automatic renaming following a consistent schema\n📊 Central documentation in Google Sheets\n🔧 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📋 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: “Customer Month Year”)\n5. Documentation\nAddToOverview enters all data into Google Sheets table\nEnables central overview and analysis\n⚙️ Setup Instructions\nStep 1: Prepare Google Drive\nCreate the following folder structure in Google Drive:\n\n📁 [Input Folder] (e.g., \"Invoices-Inbox\")\n📁 [Main Folder] (e.g., \"Accounting\")\n   └── 📁 2024\n       ├── 📁 January\n       ├── 📁 February\n       ├── 📁 March\n       └── ... (all months)\n   └── 📁 2025\n       └── ... (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 “Folder to Watch”\nSet “Event” to “fileCreated”\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🔧 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 “Poll Times” select different intervals.\n\n🚨 Important Notes\n⚠️ Permissions:\nGoogle Drive: Full access to configured folders\nGoogle Sheets: Write permission for target table\nGoogle Gemini: Valid API key required\n📝 Data Format:\nWorks with German number formats (comma as decimal separator)\nDate format: YYYY-MM-DD\nSupports various PDF formats\n🔄 Error Handling:\nWorkflow fails if folders are missing\nIncomplete PDFs may lead to incomplete extractions\nCheck logs for troubleshooting\n📊 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🧪 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📄 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
    }
  ],
  "pinData": {},
  "connections": {
    "a2804a83-35b8-44fd-8c27-8c9529ce3032": {
      "main": [
        [],
        [
          {
            "node": "0a5cd68e-9222-4880-bded-12aa813a02ce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0a5cd68e-9222-4880-bded-12aa813a02ce": {
      "main": [
        [
          {
            "node": "8373c145-db20-4294-87eb-da985c84107b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b643e996-22f9-4603-aeb7-65c56e2e0513": {
      "main": [
        [
          {
            "node": "7dd0b378-27a7-412d-82a2-489ca554e742",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "a9b953c5-65fa-43dd-9ab5-d7318dfded48",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b3d8208f-7e0a-4c52-a5ea-4808b457ca8f": {
      "main": [
        [
          {
            "node": "a2804a83-35b8-44fd-8c27-8c9529ce3032",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0f0a91ea-bcf4-4135-a2b5-f2c22863849d": {
      "main": [
        [
          {
            "node": "172ed9b2-ee6c-4c9f-958f-49e7bfa22d7d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8373c145-db20-4294-87eb-da985c84107b": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "172ed9b2-ee6c-4c9f-958f-49e7bfa22d7d": {
      "main": [
        [
          {
            "node": "b643e996-22f9-4603-aeb7-65c56e2e0513",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7dd0b378-27a7-412d-82a2-489ca554e742": {
      "main": [
        [
          {
            "node": "b3d8208f-7e0a-4c52-a5ea-4808b457ca8f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "6fec458f-6966-47ef-800a-fc7291c89d4f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "be4e4b96-3f3f-4748-adb6-bbcc971f5735": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "587f8a5e-cf80-492c-878b-7425fad5bdb1": {
      "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": "0f0a91ea-bcf4-4135-a2b5-f2c22863849d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ffc3e80a-331d-4e04-90e7-8128f3a56c22": {
      "main": [
        [
          {
            "node": "587f8a5e-cf80-492c-878b-7425fad5bdb1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a9b953c5-65fa-43dd-9ab5-d7318dfded48": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "a2804a83-35b8-44fd-8c27-8c9529ce3032",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5a940700-4503-46bd-9cfa-137dbde8334a": {
      "main": [
        [
          {
            "node": "ffc3e80a-331d-4e04-90e7-8128f3a56c22",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6fec458f-6966-47ef-800a-fc7291c89d4f": {
      "main": [
        [
          {
            "node": "5a940700-4503-46bd-9cfa-137dbde8334a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - その他, AI要約, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数29
カテゴリー3
ノードタイプ11
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34