インボイス分類機
上級
これはInvoice Processing, AI Summarization分野の自動化ワークフローで、18個のノードを含みます。主にSwitch, GoogleDrive, ManualTrigger, SplitInBatches, Agentなどのノードを使用。 GPT-4o を使用して Google Drive で請求書を分類し、自動のに整理する
前提条件
- •Google Drive API認証情報
- •OpenAI API Key
使用ノード (18)
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "M4i2qOxJ3Us04fab",
"meta": {
"instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
"templateCredsSetupCompleted": true
},
"name": "Invoice Classifier",
"tags": [],
"nodes": [
{
"id": "c3eb01ce-ad98-4c88-8426-f6ff738ec932",
"name": "ファイルをダウンロード",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1600,
632
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download",
"authentication": "oAuth2"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 1
},
{
"id": "f4ae926e-f3a2-4471-84e8-5b9c37050d04",
"name": "ワークフロー実行時",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-2048,
632
],
"parameters": {},
"typeVersion": 1
},
{
"id": "bbf3ef7d-1a6e-44cc-b878-1c3a0c73535b",
"name": "AIエージェント",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-928,
192
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemMessage": "You are a smart document classifier.\n\nYour task is to analyze the text content of an invoice and classify it into one of the following industries:\n- Retail\n- Manufacturing\n- EdTech\n\nRespond with the industry name at top: \"Retail\", \"Manufacturing\", or \"EdTech\"."
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "2a77af9f-32db-49c0-9655-308a2dc2d9c4",
"name": "Azure OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
-832,
416
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"credentials": {
"azureOpenAiApi": {
"id": "C3WzT18XqF8OdVM6",
"name": "Azure Open AI account"
}
},
"typeVersion": 1
},
{
"id": "c10f4dbc-9378-426b-bf74-5873f4c9194d",
"name": "アイテムをループ処理",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-1152,
632
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "aedbda2e-2625-437a-a138-2ee019fad248",
"name": "ファイルから抽出",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-1376,
632
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "6018cc36-6bb0-45c8-946f-77fc87beb52b",
"name": "スイッチ",
"type": "n8n-nodes-base.switch",
"position": [
-528,
176
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bad389b5-d967-4f72-839d-9f099911c65a",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output }}",
"rightValue": "Retail"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "aea4162d-2682-4147-9724-cb79f66fc4f5",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output }}",
"rightValue": "Manufacturing"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "0af9f9aa-95d3-4982-9f52-a7b4d7d1749a",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output }}",
"rightValue": "EdTech"
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "11a50e6e-4bb3-41bc-9a3f-e5e12b898209",
"name": "ファイルとフォルダを検索",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1824,
632
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "1CcHp9tPoC-f7-umMjLdUU-Y7GedKLQkx",
"cachedResultUrl": "https://drive.google.com/drive/folders/1CcHp9tPoC-f7-umMjLdUU-Y7GedKLQkx",
"cachedResultName": "Indore"
}
},
"options": {},
"resource": "fileFolder",
"returnAll": true
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "934c8224-4adb-491a-a696-f60292088eb0",
"name": "製造業",
"type": "n8n-nodes-base.googleDrive",
"position": [
-304,
488
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Download File').item.json.id }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1-fmURc7hW1JcQCcP_lk4VxhkOk4GA00H",
"cachedResultUrl": "https://drive.google.com/drive/folders/1-fmURc7hW1JcQCcP_lk4VxhkOk4GA00H",
"cachedResultName": "Manufacturing"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "7db81eed-1d18-4af6-850e-9acc696b4f84",
"name": "小売",
"type": "n8n-nodes-base.googleDrive",
"position": [
-304,
296
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Download File').item.json.id }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "13YZe1eYMQGXqR62n8aQIlYeSHE2HqpAv",
"cachedResultUrl": "https://drive.google.com/drive/folders/13YZe1eYMQGXqR62n8aQIlYeSHE2HqpAv",
"cachedResultName": "Retail"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "c200afa0-87b3-4e81-8b72-3735e21c36c9",
"name": "EdTech",
"type": "n8n-nodes-base.googleDrive",
"position": [
-304,
680
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Download File').item.json.id }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1H-JpO6eNDYGHT4G92-mB846NvaNu8P-1",
"cachedResultUrl": "https://drive.google.com/drive/folders/1H-JpO6eNDYGHT4G92-mB846NvaNu8P-1",
"cachedResultName": "Edtech"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "249fa33e-26e5-4668-b54f-e3ba5e10099d",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1968,
800
],
"parameters": {
"width": 320,
"height": 240,
"content": "Search files and folders (Google Drive)\n\nType: Google Drive node\n\nOperation: Search for files and folders\n\nWhat it does:\nSearches for files in a specific Google Drive folder (ID: - folder named \"\")\nReturns all files found in that folder\nUses OAuth2 authentication with Google Drive"
},
"typeVersion": 1
},
{
"id": "d210bbff-936d-4216-afcd-6b2646fdb00a",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1600,
800
],
"parameters": {
"color": 3,
"height": 240,
"content": "Download File (Google Drive)\n\nType: Google Drive node\nOperation: Download\nWhat it does:\n\nDownloads each file found by the previous node\nUses the file ID from the search results (={{ $json.id }})\nDownloads the actual file content for processing"
},
"typeVersion": 1
},
{
"id": "88dd5e88-6673-480e-8005-27398846f504",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1552,
400
],
"parameters": {
"color": 2,
"width": 272,
"height": 208,
"content": "Extract from File (Extract from File)\n\nType: Extract from File node\nOperation: PDF extraction\nWhat it does:\n\nExtracts text content from PDF files\nConverts the downloaded PDF invoices into readable text\nPrepares text for AI analysis"
},
"typeVersion": 1
},
{
"id": "5c87b592-9143-4bfb-8f54-2f8a92fff83b",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1168,
800
],
"parameters": {
"color": 5,
"height": 240,
"content": "Loop Over Items (Split in Batches)\n\nType: Split in Batches node\nWhat it does:\n\nProcesses multiple files one by one in a loop\nEnsures each invoice is processed individually\nManages batch processing of multiple invoices"
},
"typeVersion": 1
},
{
"id": "983aa05a-34b6-44db-bc1e-a2eaed231848",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1248,
-16
],
"parameters": {
"color": 4,
"width": 288,
"height": 288,
"content": "#AI Agent (LangChain Agent)\n\nType: LangChain AI Agent\nWhat it does:\n\nAnalyzes the extracted text content from invoices\nUses a system prompt that instructs it to classify invoices into three categories:\n\nRetail\nManufacturing\nEdTech\n\n\nReturns the classification result"
},
"typeVersion": 1
},
{
"id": "90a266fe-ceda-4e79-b4b0-a772ee0234c7",
"name": "付箋5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-752,
528
],
"parameters": {
"color": 7,
"width": 288,
"height": 240,
"content": "Azure OpenAI Chat Model (Language Model)\n\nType: Azure OpenAI Chat Model\nModel: GPT-4o-mini\nWhat it does:\n\nProvides the AI language model for the AI Agent\nConnected to the AI Agent to power the classification logic\nUses Azure OpenAI API credentials"
},
"typeVersion": 1
},
{
"id": "f9daf053-6ab0-43b2-8878-c07829c17b52",
"name": "付箋6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-608,
-144
],
"parameters": {
"color": 6,
"width": 288,
"height": 304,
"content": "Switch (Conditional Logic)\n\nType: Switch node\nWhat it does:\n\nRoutes the workflow based on AI classification results\nHas three conditional branches:\n\nIf output equals \"Retail\" → Route to Retail folder\nIf output equals \"Manufacturing\" → Route to Manufacturing folder\nIf output equals \"EdTech\" → Route to EdTech folder"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "8c3ea819-3a44-4c6e-9b54-a25edfc40fbe",
"connections": {
"c200afa0-87b3-4e81-8b72-3735e21c36c9": {
"main": [
[
{
"node": "c10f4dbc-9378-426b-bf74-5873f4c9194d",
"type": "main",
"index": 0
}
]
]
},
"7db81eed-1d18-4af6-850e-9acc696b4f84": {
"main": [
[
{
"node": "c10f4dbc-9378-426b-bf74-5873f4c9194d",
"type": "main",
"index": 0
}
]
]
},
"6018cc36-6bb0-45c8-946f-77fc87beb52b": {
"main": [
[
{
"node": "7db81eed-1d18-4af6-850e-9acc696b4f84",
"type": "main",
"index": 0
}
],
[
{
"node": "934c8224-4adb-491a-a696-f60292088eb0",
"type": "main",
"index": 0
}
],
[
{
"node": "c200afa0-87b3-4e81-8b72-3735e21c36c9",
"type": "main",
"index": 0
}
]
]
},
"bbf3ef7d-1a6e-44cc-b878-1c3a0c73535b": {
"main": [
[
{
"node": "6018cc36-6bb0-45c8-946f-77fc87beb52b",
"type": "main",
"index": 0
}
]
]
},
"c3eb01ce-ad98-4c88-8426-f6ff738ec932": {
"main": [
[
{
"node": "aedbda2e-2625-437a-a138-2ee019fad248",
"type": "main",
"index": 0
}
]
]
},
"934c8224-4adb-491a-a696-f60292088eb0": {
"main": [
[
{
"node": "c10f4dbc-9378-426b-bf74-5873f4c9194d",
"type": "main",
"index": 0
}
]
]
},
"c10f4dbc-9378-426b-bf74-5873f4c9194d": {
"main": [
[],
[
{
"node": "bbf3ef7d-1a6e-44cc-b878-1c3a0c73535b",
"type": "main",
"index": 0
}
]
]
},
"aedbda2e-2625-437a-a138-2ee019fad248": {
"main": [
[
{
"node": "c10f4dbc-9378-426b-bf74-5873f4c9194d",
"type": "main",
"index": 0
}
]
]
},
"2a77af9f-32db-49c0-9655-308a2dc2d9c4": {
"ai_languageModel": [
[
{
"node": "bbf3ef7d-1a6e-44cc-b878-1c3a0c73535b",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"11a50e6e-4bb3-41bc-9a3f-e5e12b898209": {
"main": [
[
{
"node": "c3eb01ce-ad98-4c88-8426-f6ff738ec932",
"type": "main",
"index": 0
}
]
]
},
"f4ae926e-f3a2-4471-84e8-5b9c37050d04": {
"main": [
[
{
"node": "11a50e6e-4bb3-41bc-9a3f-e5e12b898209",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 請求書処理, AI要約
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
スキルマトリックスエクスパンダ
GoogleドライブとGPT-4oを使用してスキルマトリックスをGoogleスプレッドシートに抽出
Code
Google Drive
Google Sheets
+
Code
Google Drive
Google Sheets
17 ノードRahul Joshi
その他
Google Drive から n8n テンプレートの説明を生成
AzureでGPT-4を使ってGoogle Driveからテンプレート説明文を生成
Code
Gmail
Google Drive
+
Code
Gmail
Google Drive
27 ノードRahul Joshi
コンテンツ作成
フィードバックの保存とレポート生成
Azure OpenAI と Google Sheets を使用して営業取引の結果を分析し、レポートを生成する
Set
Code
Email Send
+
Set
Code
Email Send
28 ノードRahul Joshi
顧客管理
GPT-4o-miniとGmailを使ってYouTubeチャンネルを分析し、パフォーマンスレポートを送信
GPT-4o-miniとGmailを使ってYouTubeチャンネルを分析し、パフォーマンスレポートを送信する
Code
Email Send
Http Request
+
Code
Email Send
Http Request
20 ノードRahul Joshi
市場調査
面接官ブリーフィングパック
Google Sheets、GPT-4oを使って履歴書からAI駆動の面接サマリー生成
Code
Gmail
Google Drive
+
Code
Gmail
Google Drive
16 ノードRahul Joshi
人事
インテリジェントリードマーキングとルーティング
HighLevelとAzure GPT-4o-miniを基盤としたAI駆動のリード分類とルーティング
If
Code
Email Send
+
If
Code
Email Send
17 ノードRahul Joshi
リード獲得
ワークフロー情報
難易度
上級
ノード数18
カテゴリー2
ノードタイプ8
作成者
Rahul Joshi
@rahul08Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.
外部リンク
n8n.ioで表示 →
このワークフローを共有