发票跟进代理
中级
这是一个Invoice Processing, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 Cron, Function, EmailSend, GoogleSheets 等节点。 通过Google Sheets和邮件自动跟进发票,具备智能回复语气
前置要求
- •Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "RdYMo0ozk6r4oyLm",
"meta": {
"instanceId": "a287613f1596da776459594685fbf4e2b4a12124f80ab8c8772f5e37bff103ae",
"templateCredsSetupCompleted": true
},
"name": "发票跟进代理",
"tags": [],
"nodes": [
{
"id": "bf973089-06fa-4da5-a823-9cc6e0823387",
"name": "每日触发器",
"type": "n8n-nodes-base.cron",
"position": [
-980,
80
],
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 6
}
]
}
},
"typeVersion": 1
},
{
"id": "8c35f2a2-8bb3-4608-b95d-ffa8292fa813",
"name": "加载发票",
"type": "n8n-nodes-base.googleSheets",
"position": [
-780,
80
],
"parameters": {
"range": "Invoices!A1:G1000",
"options": {},
"sheetId": "YOUR_SHEET_ID",
"operation": "lookup",
"authentication": "oAuth2"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "4Y2ksdr35dFDo0rB",
"name": "maranata"
}
},
"typeVersion": 1
},
{
"id": "0874c817-026c-4d88-80e8-e92aa2b51bca",
"name": "筛选逾期发票",
"type": "n8n-nodes-base.function",
"position": [
-580,
80
],
"parameters": {
"functionCode": "\nreturn items.filter(item => {\n const dueDate = new Date(item.json.due_date);\n const today = new Date();\n return item.json.status.toLowerCase() === \"unpaid\" && dueDate < today;\n});\n"
},
"typeVersion": 1
},
{
"id": "b296c45e-755c-436f-9791-c2015e7ed0e6",
"name": "计算逾期天数",
"type": "n8n-nodes-base.function",
"position": [
-380,
80
],
"parameters": {
"functionCode": "\nreturn items.map(item => {\n const dueDate = new Date(item.json.due_date);\n const today = new Date();\n const dpd = Math.floor((today - dueDate) / (1000 * 60 * 60 * 24));\n item.json.dpd = dpd;\n return item;\n});\n"
},
"typeVersion": 1
},
{
"id": "303f0f3b-6fd4-4546-83ba-20158ceb0a8a",
"name": "生成消息",
"type": "n8n-nodes-base.function",
"position": [
-180,
80
],
"parameters": {
"functionCode": "\nreturn items.map(item => {\n const dpd = item.json.dpd;\n let tone = \"\";\n if (dpd <= 7) {\n tone = `Hi ${item.json.client_name}, just a quick reminder about your invoice #${item.json.invoice_number} due on ${item.json.due_date}. Let us know if you need anything!`;\n } else if (dpd <= 14) {\n tone = `Hi ${item.json.client_name}, your invoice #${item.json.invoice_number} is now ${dpd} days overdue. Please arrange the payment soon.`;\n } else {\n tone = `Final Reminder: Invoice #${item.json.invoice_number} is ${dpd} days overdue. Immediate payment is required to avoid further action.`;\n }\n item.json.message = tone;\n return item;\n});\n"
},
"typeVersion": 1
},
{
"id": "d636929c-5cc3-4eeb-87cf-c417ee5bc439",
"name": "发送邮件",
"type": "n8n-nodes-base.emailSend",
"position": [
20,
80
],
"parameters": {
"text": "={{$json.message}}",
"options": {},
"subject": "Invoice Reminder"
},
"typeVersion": 1
},
{
"id": "22c96891-4f97-42f4-94fc-670639fde6e2",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
20
],
"parameters": {
"color": 3,
"width": 1300,
"height": 240,
"content": "## 流程"
},
"typeVersion": 1
},
{
"id": "ec179bef-03c4-4a02-8f80-97eb4c6290b5",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
280
],
"parameters": {
"color": 4,
"width": 960,
"height": 900,
"content": "# AI 发票与付款跟进代理"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "47470742-6e89-46dd-a951-a7a3c9c6b7da",
"connections": {
"Calculate DPD": {
"main": [
[
{
"node": "Generate Message",
"type": "main",
"index": 0
}
]
]
},
"Daily Trigger": {
"main": [
[
{
"node": "Load Invoices",
"type": "main",
"index": 0
}
]
]
},
"Load Invoices": {
"main": [
[
{
"node": "Filter Overdue Invoices",
"type": "main",
"index": 0
}
]
]
},
"Generate Message": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
},
"Filter Overdue Invoices": {
"main": [
[
{
"node": "Calculate DPD",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 发票处理, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
自动财务追踪器:同步收据、预测现金流并获取月度报告
使用Gmail、Google Sheets和GPT-4o月度报告的自动化财务追踪器
If
Set
Cron
+6
17 节点Shelly-Ann Davy
发票处理
基于 GPT-4 和 Stripe 发票的自动化智能现金流与账单管理系统
使用 GPT-4、Stripe 和 Google Workspace 的自动化发票工作流与智能提醒
If
Wait
Gmail
+7
16 节点Marth
发票处理
电商生日折扣自动化
使用Google Sheet和Gmail实现电商生日折扣邮件自动化
If
Gmail
Function
+3
7 节点Marth
社交媒体
自动化发票提醒
使用 Google Sheets 和 Gmail 的自动化发票付款提醒
If
Gmail
Function
+3
7 节点Marth
发票处理
面向中小企业的简单客户支持自动化(使用 Google Sheets)
使用 Google Sheets 和自动邮件的 SME 客户支持工单系统
If
Set
Webhook
+3
7 节点Marth
工单管理
德国公寓查找器和自动申请(带便签功能)
自动德国公寓搜索与申请,集成Immobilienscout24和Google服务
Set
Cron
Function
+6
22 节点Abbas Ali
个人效率