AI驱动的文档处理与整理系统,集成Gemini、VLM Run和Google表格
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 14 个节点。主要使用 Webhook, GoogleDrive, Agent, HttpRequestTool, GoogleSheetsTool 等节点。 AI驱动的文档处理与整理系统,集成Gemini、VLM Run和Google表格
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
使用的节点 (14)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "96d35e452e0d9a182973416b7532cfc5643239aaaa764a5bf74d52ca84f4a35c",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "038c1631-168a-4539-a4ba-66bb15213f9a",
"name": "🧾 工作流概览",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1952,
-496
],
"parameters": {
"color": 7,
"width": 480,
"height": 856,
"content": "## 🧾 AI数据提取工作流"
},
"typeVersion": 1
},
{
"id": "7ff45131-2c0b-4a9c-87e4-3e933b8ede3e",
"name": "📁 输入处理文档",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1408,
-496
],
"parameters": {
"color": 7,
"width": 480,
"height": 856,
"content": "## 📁 输入处理"
},
"typeVersion": 1
},
{
"id": "ba119800-f50b-4802-9cde-2815f6671742",
"name": "🤖 AI提取文档",
"type": "n8n-nodes-base.stickyNote",
"position": [
-864,
-496
],
"parameters": {
"width": 784,
"height": 856,
"content": "## 🤖 VLM Run执行代理"
},
"typeVersion": 1
},
{
"id": "4f12e813-9f9d-4eed-b87c-b2b2099318b6",
"name": "📊 存储文档",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-496
],
"parameters": {
"color": 7,
"width": 468,
"height": 856,
"content": "## 📊 数据存储"
},
"typeVersion": 1
},
{
"id": "1439fa01-eb2e-4e60-8b32-9b1808ea7caf",
"name": "监控上传",
"type": "n8n-nodes-base.googleDriveTrigger",
"notes": "Monitors Google Drive folder for new receipt uploads and triggers processing automatically.",
"position": [
-1344,
16
],
"parameters": {
"event": "fileCreated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "list",
"value": "1E8rvLEWKguorMT36yCD1jY78G0u8g6g7",
"cachedResultUrl": "https://drive.google.com/drive/folders/1E8rvLEWKguorMT36yCD1jY78G0u8g6g7",
"cachedResultName": "test_data"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "oCzY5bzObKMMfjpu",
"name": "Google Drive account 3"
}
},
"typeVersion": 1
},
{
"id": "dc267443-93f4-40b2-a1cb-fca4137fd76a",
"name": "下载文件",
"type": "n8n-nodes-base.googleDrive",
"notes": "Downloads receipt files from Google Drive for AI processing.",
"position": [
-1104,
16
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {
"binaryPropertyName": "data"
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "oCzY5bzObKMMfjpu",
"name": "Google Drive account 3"
}
},
"typeVersion": 3
},
{
"id": "968205e6-d178-4fca-9c21-b91c5070402d",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
16,
160
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "gpt-4.1"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "WqqkexJ7QGbexoAz",
"name": "OpenAi account 4"
}
},
"typeVersion": 1.2
},
{
"id": "c8a157b6-381f-4768-bbc6-419621cd1270",
"name": "追加行",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
320,
160
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `must match this format:\nhttps://sheets.googleapis.com/v4/spreadsheets/1g60FR2dAZ6OtJ1NM06le85agaxCWOW11TbxQj45S2Ug/values/Sheet1!A:Z:append`, 'string') }}",
"method": "POST",
"options": {},
"jsonBody": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', `must match this format:\n{ \"majorDimension\": \"ROWS\", \"values\": [ [\"val1\", \"val2\"] ] }`, 'json') }}",
"sendBody": true,
"sendQuery": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"queryParameters": {
"parameters": [
{
"name": "valueInputOption",
"value": "RAW"
},
{
"name": "insertDataOption",
"value": "INSERT_ROWS"
},
{
"name": "includeValuesInResponse",
"value": "true"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "googleSheetsOAuth2Api"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "lxV2oXYXJq9hllrs",
"name": "Google Sheets account 5"
}
},
"typeVersion": 4.2
},
{
"id": "63064bdd-7eaa-44be-853d-98aea26fa69b",
"name": "从表格获取行",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
176,
160
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Document', ``, 'string') }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "lxV2oXYXJq9hllrs",
"name": "Google Sheets account 5"
}
},
"typeVersion": 4.7
},
{
"id": "65b1be08-0bf4-4511-852f-7fbe230c076d",
"name": "VLM Run用于提取",
"type": "@vlm-run/n8n-nodes-vlmrun.vlmRun",
"position": [
-448,
16
],
"parameters": {
"file": "data2",
"operation": "executeAgent",
"agentPrompt": "=check the {{ $json.content.parts[0].text }} document and extract data according to the document type.",
"agentCallbackUrl": "https://playground.attensys.ai/webhook/auto"
},
"credentials": {
"vlmRunApi": {
"id": "7JF2kdNzjhKZsHGg",
"name": "VLM Run account 2"
}
},
"typeVersion": 1
},
{
"id": "188e6cd1-9d9f-4c33-9731-104f61a02fdc",
"name": "接收提取的数据",
"type": "n8n-nodes-base.webhook",
"position": [
-224,
16
],
"webhookId": "cf8e4d73-56de-4ac6-8ed8-28bfa20e7957",
"parameters": {
"path": "auto",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2.1
},
{
"id": "a9831503-4094-486b-a0f9-2275b7554a7a",
"name": "检查文档类型",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
-816,
16
],
"parameters": {
"text": "analyze the document and reply the document type only",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "document",
"inputType": "binary"
},
"credentials": {
"googlePalmApi": {
"id": "f24qXJq84ChbMZGo",
"name": "Google Gemini(PaLM) Api account 3"
}
},
"typeVersion": 1
},
{
"id": "4d92bf87-046e-4df9-bff8-dae23deec32f",
"name": "AI代理用于动态存储",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
96,
16
],
"parameters": {
"text": "=JSON Input: {{ JSON.stringify($('Receives Extracted Data').item.json.body) }}",
"options": {
"maxIterations": 10,
"systemMessage": "Complete the following tasks using the google sheet tools for the provided json and do not suggest user how to do, complete it yourself using the available tools and just reply necessary failures or success:\n\nFirst analyze the document(ie. Physician order, claims processing, construction blueprint etc) and search the spreadsheet with ID: '1-e3vUMW_xJ8Gqj7Ifp7hlESl726tnHaqqFf9DYc_1kE' with get rows if its first column has similar document type.\nIf yes, grab the spreadsheet ID of that document from the second column of the same spreadsheet then simply append the necessary values from the json there as a new row using append row http node(make sure to map the keys accordingly as the header name from the default json keys). If no header was found in the spreadsheet use append row http tool to create one(make sure to input the key names as headers not the values), then append the values from the json using append row tool again(now the values in its designated key), make sure the first row is the header with key names and second one is with the values.\n\nIf no, append a new row with the generalize document name in that spreadsheet and in spreadsheet ID column assign nothing\n\nmake sure to follow these format in tools:\n\n-“url” demo in append row http node: https://sheets.googleapis.com/v4/spreadsheets/1g60FR2dAZ6OtJ1NM06le85agaxCWOW11TbxQj45S2Ug/values/Sheet1!A:Z:append\nthe spreadsheet id will be changed accordingly\n\n-pass spreadsheet ID only in get rows tool’s “document” field\n\n-make sure to check spreadsheet header before sending to append rows http tool\n\n-follow this exact json format in append row’s body, with necessary values or keys:\n{\n \"majorDimension\": \"ROWS\",\n \"values\": [[\"val1\", \"val2\"]]\n}\n\n- make sure to use natural key names and natural values without any nested objects simple natural \"key\": \"value\" structure, if value is big use endline(\\n) comma etc in it to format naturally and extract the fields as given for each doc type(try to map all the values inside these keys) and pass them accordingly:
\nResume: Name, Email, Phone no, Github URL, Linkedin URL, Education, Technical Skills, Projects, Additional Section, Score(according to structure), Comment(all over suitableness)\n\nReceipt: receipt_id, transaction_date, merchant_name, merchant_address, merchant_phone, cashier_name, register_number, customer_name, customer_id, items, subtotal, tax, total, currency, payment_method, discount_amount, discount_description, tip_amount, return_policy, barcode, additional_charges, notes, others\n\nClaims Processing: form_type, form_version, carrier_name, insurance_type, insured_id_number, patient_name, patient_birth_date, patient_sex, patient_address, patient_relationship, insured_name, insured_policy_group, current_illness_date, referring_physician_name, hospitalization_from, hospitalization_to, diagnosis_codes, service_lines, total_charge, amount_paid, balance_due, accept_assignment, billing_provider, service_facility, physician_signature, omb_number\n\nPhysician Order: patient_full_name, patient_address_line1, patient_address_city, patient_address_state, patient_address_zip, patient_phone, patient_dob, physician_full_name, referring_clinic, referring_clinic_address_line1, referring_clinic_city, referring_clinic_state, referring_clinic_zip, physician_phone, physician_fax, additional_notes, form_signed_date\n\nConstruction Blueprint: project_name, project_id, project_location_line1, project_location_city, project_location_state, project_location_zip, client_full_name, general_contractor_full_name, project_period, permits_approvals, document_type, document_number, document_issue_date, document_author, drawing_titles_numbers, scale_legends, annotations_markups, cad_bim_metadata, title_job_name, title_address_line1, title_address_city, title_address_state, title_address_zip, title_drawing_number, title_revision, title_drawn_by, title_checked_by, title_date, title_scale, title_agency_name, title_document_title, title_sheet_number, title_work_order_number, title_issue_date, title_revision_date, drawing_type, scale_information, environmental_impact\n\nHere’s three example flow:\n1. you analyze the json and found its a claims processing type doc, you search the '1-e3vUMW_xJ8Gqj7Ifp7hlESl726tnHaqqFf9DYc_1kE’ spreadsheet for such type, you found a matching row, fetch the spreadsheet ID of that type, check the header columns using get rows tool and append the json values to that spreadsheet according to columns using append row tool.\n2. you analyze the json and found its a construction blueprint type doc, you search the '1-e3vUMW_xJ8Gqj7Ifp7hlESl726tnHaqqFf9DYc_1kE’ spreadsheet for such type, you found a matching row, fetch the spreadsheet ID of that type, use get rows to that and found its blank, use append row tool to add header columns with keys, then check using get rows again and send the values according to header column using append row tool again with the values\n3. you analyze the json and found its a resume type doc, you search the fixed spreadsheet and found no such row, then you create a new row with suitable name like resume and in spreadsheet id field assign nothing"
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "702f47dc-5d19-49e2-9f2a-ef8afcac5360",
"name": "下载文件2",
"type": "n8n-nodes-base.googleDrive",
"notes": "Downloads receipt files from Google Drive for AI processing.",
"position": [
-624,
16
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Monitor Uploads').item.json.id }}"
},
"options": {
"binaryPropertyName": "data2"
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "oCzY5bzObKMMfjpu",
"name": "Google Drive account 3"
}
},
"typeVersion": 3
}
],
"pinData": {},
"connections": {
"Append row": {
"ai_tool": [
[
{
"node": "AI Agent for Storing Dynamically",
"type": "ai_tool",
"index": 0
}
]
]
},
"Download File": {
"main": [
[
{
"node": "Check Document Type",
"type": "main",
"index": 0
}
]
]
},
"Download File2": {
"main": [
[
{
"node": "VLM Run for Extraction",
"type": "main",
"index": 0
}
]
]
},
"Monitor Uploads": {
"main": [
[
{
"node": "Download File",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent for Storing Dynamically",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Check Document Type": {
"main": [
[
{
"node": "Download File2",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) from sheets": {
"ai_tool": [
[
{
"node": "AI Agent for Storing Dynamically",
"type": "ai_tool",
"index": 0
}
]
]
},
"Receives Extracted Data": {
"main": [
[
{
"node": "AI Agent for Storing Dynamically",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
视频转录搜索与问答,集成VLM Run、GPT-4和Google Workspace
视频转录搜索与问答,集成VLM Run、GPT-4和Google Workspace
Webhook
Google Drive
Google Sheets
+7
14 节点Atik
内容创作
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
If
Set
Gmail
+20
68 节点Abdullahi Ahmed
内容创作
使用 Azure OpenAI 和 Google Workspace 自动化 DEI 资格筛选
使用Azure GPT-4o、Google云端硬盘和表格自动进行DEI资格筛选
If
Code
Gmail
+9
19 节点Rahul Joshi
内容创作
使用OpenAI、RunwayML和ElevenLabs自动化无脸短视频
使用OpenAI、RunwayML和ElevenLabs自动化无脸短视频:从脚本到社交媒体
Set
Code
Wait
+18
56 节点LeeWei
内容创作
💥 HeyGen II - 克隆我 - 从想法到发布:适用于 YouTube、TikTok 和 Instagram 的 GPT-5 视频自动化 - 视频
使用 HeyGen、GPT-5 和社交发布自动化语音输入视频创作
If
Set
Wait
+13
41 节点Dr. Firas
内容创作
客户支持
使用GPT-4知识库代理的自动化Gmail客户支持
Gmail
Google Drive
Gmail Trigger
+10
21 节点Yasser Sami
内容创作
工作流信息
难度等级
中级
节点数量14
分类2
节点类型10
作者
Atik
@atikAI and Automation engineer with 2 years of experience helping businesses streamline workflows using tools like n8n, Make, and Zapier. I also build custom Python solutions and AI integrations tailored to your needs. Use my link to book an initial consultation for automation and AI projects.
外部链接
在 n8n.io 查看 →
分享此工作流