🧾 使用Mistral OCR + GPT-4o-mini自动处理发票
中级
这是一个Finance, AI领域的自动化工作流,包含 11 个节点。主要使用 Set, SplitOut, Summarize, GoogleDrive, HttpRequest 等节点,结合人工智能技术实现智能自动化。 🧾 使用Mistral OCR + GPT-4o-mini自动处理发票
前置要求
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (11)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "4786bf0f18c0e8e92c361de5a158cabf4eb0bb3b9c113091b054ff26e359a029",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "d7086584-965b-467b-b453-4e43936a4bbe",
"name": "Google Drive触发器:新发票检测",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
180,
-240
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0af0b6a6-7ee8-4fdb-a88b-38abad155962",
"name": "Google Drive:下载发票",
"type": "n8n-nodes-base.googleDrive",
"position": [
400,
-240
],
"parameters": {},
"typeVersion": 3
},
{
"id": "e0f5e5d0-95a5-4ac2-9de2-995e45def8c3",
"name": "工作流文档",
"type": "n8n-nodes-base.stickyNote",
"position": [
-820,
-500
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "9b1fe096-3c01-4c63-85fa-c54432680b8e",
"name": "Mistral OCR API:提取文本",
"type": "n8n-nodes-base.httpRequest",
"position": [
840,
-240
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "d0443dba-2b91-4750-8d44-9e4312806941",
"name": "数据分割器:OCR页面",
"type": "n8n-nodes-base.splitOut",
"position": [
1080,
-240
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0ae469f6-378b-4d0e-8ba5-6dd2c87ab2da",
"name": "字段提取器:页面Markdown",
"type": "n8n-nodes-base.set",
"position": [
1320,
-240
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "ff714c7c-9b60-4074-8003-a0fbca9d9f39",
"name": "数据聚合器:合并页面",
"type": "n8n-nodes-base.summarize",
"position": [
1540,
-240
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "42b4088b-2433-4024-8e69-6f9de1969979",
"name": "AI助手:结构化发票数据",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1760,
-240
],
"parameters": {},
"typeVersion": 1.9
},
{
"id": "ae95c2f9-f8b3-4b16-b0bb-c0fcc34365cb",
"name": "AI引擎:GPT-4o-mini",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1640,
-20
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "ad61f397-d923-481b-b48c-376e4e287ca7",
"name": "JSON解析器:发票结构",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1940,
-20
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "bc22f1eb-4efa-463c-b86f-6fc8fa76746d",
"name": "将发票文件转换为 Base64",
"type": "n8n-nodes-base.extractFromFile",
"position": [
640,
-240
],
"parameters": {},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"AI Engine: GPT-4o-mini": {
"ai_languageModel": [
[
{
"node": "AI Agent: Structure Invoice Data",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Data Splitter: OCR Pages": {
"main": [
[
{
"node": "Field Extractor: Page Markdown",
"type": "main",
"index": 0
}
]
]
},
"Mistral OCR API: Extract Text": {
"main": [
[
{
"node": "Data Splitter: OCR Pages",
"type": "main",
"index": 0
}
]
]
},
"Convert invoice File to Base64": {
"main": [
[
{
"node": "Mistral OCR API: Extract Text",
"type": "main",
"index": 0
}
]
]
},
"Data Aggregator: Combine Pages": {
"main": [
[
{
"node": "AI Agent: Structure Invoice Data",
"type": "main",
"index": 0
}
]
]
},
"Field Extractor: Page Markdown": {
"main": [
[
{
"node": "Data Aggregator: Combine Pages",
"type": "main",
"index": 0
}
]
]
},
"Google Drive: Download Invoice": {
"main": [
[
{
"node": "Convert invoice File to Base64",
"type": "main",
"index": 0
}
]
]
},
"JSON Parser: Invoice Structure": {
"ai_outputParser": [
[
{
"node": "AI Agent: Structure Invoice Data",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"AI Agent: Structure Invoice Data": {
"main": [
[]
]
},
"Google Drive Trigger: New Invoice Detection": {
"main": [
[
{
"node": "Google Drive: Download Invoice",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 财务, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
宠物店 4
🐶 宠物店预约 AI 代理
If
Set
Code
+41
187 节点Bruno Dias
人工智能
[模板] AI宠物店 v8
🐶 AI宠物店助手 - 集成GPT-4o、Google日历和WhatsApp/Instagram/Facebook
If
N8n
Set
+38
244 节点Amanda Benks
销售
AI 代理餐厅 [模板]
🤖 WhatsApp、Instagram 和 Messenger 的 AI 餐厅助手
If
N8n
Set
+37
239 节点Amanda Benks
其他
AI驱动的RAG文档处理与聊天机器人 - Google Drive、Supabase、OpenAI
基于Google Drive、Supabase和OpenAI的AI驱动RAG文档处理与聊天机器人
Set
Code
Limit
+19
35 节点Billy Christi
人工智能
LinkedIn人才管道:AI驱动的候选人搜索与排名(GPT-4o)
LinkedIn人才管道:AI驱动的候选人搜索与排名(GPT-4o)
If
Set
Code
+14
24 节点Badr
人力资源
智能邮件助手:基于AI和Supabase的客户支持自动化
智能邮件助手:基于AI和Supabase的客户支持自动化
Set
Switch
Supabase
+14
23 节点Badr
客户支持