新发票邮件通知
中级
这是一个Sales, Finance, Building Blocks领域的自动化工作流,包含 6 个节点。主要使用 If, Slack, Mindee, EmailSend, EmailReadImap 等节点。 在Slack中通知带有发票的新邮件
前置要求
- •Slack Bot Token 或 Webhook URL
使用的节点 (6)
工作流预览
可视化展示节点连接关系,支持缩放和平移
无法加载工作流预览
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": 91,
"name": "新发票邮件通知",
"nodes": [
{
"name": "检查新邮件",
"type": "n8n-nodes-base.emailReadImap",
"position": [
500,
300
],
"parameters": {
"format": "resolved",
"mailbox": "Inbox",
"options": {
"allowUnauthorizedCerts": true
}
},
"credentials": {
"imap": {
"id": "24",
"name": "GMAIL"
}
},
"typeVersion": 1
},
{
"name": "如果邮件正文包含发票",
"type": "n8n-nodes-base.if",
"position": [
700,
300
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"text\"].toLowerCase()}}",
"value2": "invoice",
"operation": "contains"
}
]
},
"combineOperation": "any"
},
"typeVersion": 1
},
{
"name": "提取总金额",
"type": "n8n-nodes-base.mindee",
"position": [
900,
280
],
"parameters": {
"rawData": true,
"resource": "invoice",
"binaryPropertyName": "attachment_0"
},
"credentials": {
"mindeeInvoiceApi": {
"id": "62",
"name": "Mindee Invoice account"
}
},
"typeVersion": 1
},
{
"name": "发送新发票通知",
"type": "n8n-nodes-base.slack",
"position": [
1580,
300
],
"parameters": {
"text": ":new: There is a new invoice to pay :new:",
"channel": "team-accounts",
"blocksUi": {
"blocksValues": []
},
"attachments": [
{
"color": "#FFBF00",
"fields": {
"item": [
{
"short": true,
"title": "Amount",
"value": "={{$node[\"If Amount > 1000\"].json[\"predictions\"][0][\"total_incl\"][\"amount\"]}}"
},
{
"short": false,
"title": "From",
"value": "={{$node[\"Check for new emails\"].json[\"from\"][\"value\"][0][\"address\"]}}"
},
{
"short": true,
"title": "Subject",
"value": "={{$node[\"Check for new emails\"].json[\"subject\"]}}"
}
]
},
"footer": "=*Date:* {{$node[\"Check for new emails\"].json[\"date\"]}}"
}
],
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "53",
"name": "Slack Access Token"
}
},
"typeVersion": 1
},
{
"name": "发送邮件给财务经理",
"type": "n8n-nodes-base.emailSend",
"position": [
1340,
120
],
"parameters": {
"text": "Hi,\n\nThere is a new high value invoice to be paid that you may need to approve.\n\n~ n8n workflow",
"options": {},
"subject": "New high value invoice",
"toEmail": "finance-manager@company.tld",
"fromEmail": "n8n@noreply.tld",
"attachments": "attachment_0"
},
"credentials": {
"smtp": {
"id": "26",
"name": "mailtrap"
}
},
"typeVersion": 1
},
{
"name": "如果金额 > 1000",
"type": "n8n-nodes-base.if",
"position": [
1080,
280
],
"parameters": {
"conditions": {
"number": [
{
"value1": "={{$json[\"predictions\"][0][\"total_incl\"][\"amount\"]}}",
"value2": 1000,
"operation": "larger"
}
]
}
},
"typeVersion": 1
}
],
"active": false,
"settings": {},
"connections": {
"If Amount > 1000": {
"main": [
[
{
"node": "Send email to finance manager",
"type": "main",
"index": 0
}
],
[
{
"node": "Send new invoice notification",
"type": "main",
"index": 0
}
]
]
},
"Check for new emails": {
"main": [
[
{
"node": "If email body contains invoice",
"type": "main",
"index": 0
}
]
]
},
"Extract the total amount": {
"main": [
[
{
"node": "If Amount > 1000",
"type": "main",
"index": 0
}
]
]
},
"Send email to finance manager": {
"main": [
[
{
"node": "Send new invoice notification",
"type": "main",
"index": 0
}
]
]
},
"If email body contains invoice": {
"main": [
[
{
"node": "Extract the total amount",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 销售, 财务, 构建模块
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
当 Stripe 发票付款更新时,同步 Hubspot 并在 Slack 中通知团队
在 Stripe 中注册新发票时更新 HubSpot
If
Slack
Hubspot
+1
8 节点Jonathan
销售
检查有效的 Mautic 联系人邮箱
验证 Mautic 中新联系人的邮箱
If
Slack
Item Lists
+2
6 节点Jonathan
销售
在 Notion 数据库中归档空白页面
归档 Notion 数据库中的空白页面
If
Cron
Notion
+2
10 节点Jonathan
构建模块
新WooCommerce产品到Slack
当WooCommerce中添加新产品时在Slack上通知
Slack
Woo Commerce Trigger
2 节点Jonathan
销售
Clockify 到 Syncro
将计时条目从 Clockify 同步到 Syncro
If
Set
Webhook
+4
13 节点Jonathan
销售
非常简单的带有人工介入系统的 AI 邮件和 IMAP
一个非常简单的"人工介入循环"邮件响应系统,使用人工智能和IMAP协议
If
Set
Markdown
+6
16 节点Davide
构建模块