错误通知器-v1-无数据库
中级
这是一个DevOps领域的自动化工作流,包含 13 个节点。主要使用 Code, Gmail, Slack, Discord, Telegram 等节点。 通过Telegram、Slack和其他通讯工具进行集中错误监控和提醒
前置要求
- •Google 账号和 Gmail API 凭证
- •Slack Bot Token 或 Webhook URL
- •Discord Bot Token 或 Webhook
- •Telegram Bot Token
使用的节点 (13)
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "61Flju0VYVpEMHzD",
"name": "错误通知器-v1-无数据库",
"nodes": [
{
"id": "06623d7e-80a2-4f7d-86d8-99eb139760a9",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-480,
180
],
"parameters": {
"color": 6,
"width": 660,
"height": 80,
"content": "# 错误通知器"
},
"typeVersion": 1
},
{
"id": "eb9762e3-1c49-4c18-aab0-ce04bb54d3c5",
"name": "错误触发器",
"type": "n8n-nodes-base.errorTrigger",
"disabled": true,
"position": [
-440,
-120
],
"parameters": {},
"typeVersion": 1
},
{
"id": "9925c654-17de-47c7-83b1-0b062c86be90",
"name": "当由另一个工作流执行时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-440,
300
],
"parameters": {
"inputSource": "passthrough"
},
"typeVersion": 1.1
},
{
"id": "d8ad4b78-3387-44ce-894b-4c4c21863f1c",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
-220
],
"parameters": {
"width": 440,
"height": 300,
"content": "# 工作原理"
},
"typeVersion": 1
},
{
"id": "e57e084d-b215-4666-964c-01c2b17984c7",
"name": "执行行李警报工作流程",
"type": "n8n-nodes-base.executeWorkflow",
"disabled": true,
"position": [
-220,
-120
],
"parameters": {
"options": {},
"workflowId": {
"__rl": true,
"mode": "list",
"value": "61Flju0VYVpEMHzD",
"cachedResultName": "Error_Notifier-v1-no_db"
},
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "51276cbe-9156-4b88-938f-95919c20fd2f",
"name": "准备通知消息",
"type": "n8n-nodes-base.code",
"position": [
-220,
300
],
"parameters": {
"jsCode": "// Get data\nconst errorData = $input.first().json;\n\n\n// Get fallback\nconst execution = errorData.execution || {};\nconst workflow = errorData.workflow || {};\nconst error = execution.error || {};\n\n\nconst workflowName = workflow.name || 'Unknown';\n\nconst nodeName = execution?.lastNodeExecuted|| 'Unknown';\nconst errorMessage = error.message || '-';\nconst errorDescription = error?.context?.messageTemplate || 'No description';\nconst timestamp = error.timestamp ? new Date(error.timestamp).toLocaleString('ru-RU') : 'Unknown';\n\nconst executionUrl = execution.url || '#';\nconst executionId = execution.id || 'Unknown';\nconst errorLevel = error.level ? error.level.toUpperCase() : 'UNKNOWN';\n\n\nconst message = \n`🚨 <b>WORKFLOW ERROR (<a href=\"${executionUrl}\">${executionId}</a>)</b>\n\nWorkflow: <code>${workflowName}</code>\nNode: <code>${nodeName}</code>\n\n<b>${errorLevel}:</b>\n${errorMessage}\n${errorDescription}\n\n${timestamp}`;\n\n\nreturn {\n json: {\n message,\n }\n};"
},
"typeVersion": 2
},
{
"id": "a8b62ee0-f379-47e1-b9e0-d76700edd361",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-480,
-220
],
"parameters": {
"color": 6,
"width": 440,
"height": 80,
"content": "# 错误警报器"
},
"typeVersion": 1
},
{
"id": "32389017-571e-4efc-bb5d-155426626f01",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
180
],
"parameters": {
"width": 440,
"height": 240,
"content": "# 设置"
},
"typeVersion": 1
},
{
"id": "d066e29c-9c77-4089-8560-9736db38754a",
"name": "发送通知到 Gmail",
"type": "n8n-nodes-base.gmail",
"disabled": true,
"position": [
0,
700
],
"webhookId": "52f0cc71-1ad8-4f9a-b07c-bae9be1e217c",
"parameters": {
"sendTo": "@gmail.com",
"message": "={{ $json.message }}",
"options": {},
"subject": "Error Workflow"
},
"credentials": {
"gmailOAuth2": {
"id": "Ixik7dvloMznqRjx",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "b38ff563-c8c9-408d-a99e-d8c93ba5f309",
"name": "发送通知到 Whatsapp",
"type": "n8n-nodes-base.whatsApp",
"disabled": true,
"position": [
0,
500
],
"webhookId": "fde1b1fc-48dc-4d7b-b48a-c42b36225a43",
"parameters": {
"textBody": "={{ $json.message }}",
"operation": "send",
"additionalFields": {},
"recipientPhoneNumber": "+12345678901"
},
"credentials": {
"whatsAppApi": {
"id": "p1y94W7Y28627PI2",
"name": "WhatsApp account"
}
},
"typeVersion": 1
},
{
"id": "97a95663-5650-423a-a28b-ea18182c0e69",
"name": "发送通知到 Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
0,
300
],
"webhookId": "13c616bf-a3ad-4035-998a-1dfe6021b89f",
"parameters": {
"text": "={{ $json.message }}",
"chatId": "=YOUR_CHAT_ID",
"additionalFields": {
"parse_mode": "HTML"
}
},
"credentials": {
"telegramApi": {
"id": "0iSopCWwssqRXLS1",
"name": "Error acc"
}
},
"typeVersion": 1
},
{
"id": "cfa7d60b-3e58-4ad2-b445-5f918aac8823",
"name": "发送通知到 Discord",
"type": "n8n-nodes-base.discord",
"disabled": true,
"position": [
0,
900
],
"webhookId": "ea0cb122-61d1-4457-9447-34daa40dccdc",
"parameters": {
"content": "={{ $json.message }}",
"options": {},
"authentication": "webhook"
},
"credentials": {
"discordWebhookApi": {
"id": "gD4HHWsmeRgEyl65",
"name": "Discord Webhook account"
}
},
"typeVersion": 2
},
{
"id": "b1505ead-f1f1-4816-816b-e2e70cfabcb3",
"name": "发送通知到 Slack",
"type": "n8n-nodes-base.slack",
"disabled": true,
"position": [
0,
1100
],
"webhookId": "d2b8ce70-e478-4f05-9add-37d859f73dd8",
"parameters": {
"text": "={{ $json.message }}",
"user": {
"__rl": true,
"mode": "list",
"value": ""
},
"select": "user",
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "kyf7L2n90PzYIt0V",
"name": "Slack account"
}
},
"typeVersion": 2.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "c390d2c8-192b-43eb-9cc7-02d6db4ff67a",
"connections": {
"Error Trigger": {
"main": [
[
{
"node": "Execute Bag Alert Workflow",
"type": "main",
"index": 0
}
]
]
},
"Prepare Messages For Notify": {
"main": [
[
{
"node": "Send Notify to Gmail",
"type": "main",
"index": 0
},
{
"node": "Send Notify to Whatsapp",
"type": "main",
"index": 0
},
{
"node": "Send Notify to Slack",
"type": "main",
"index": 0
},
{
"node": "Send Notify to Telegram",
"type": "main",
"index": 0
},
{
"node": "Send Notify to Discord",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Prepare Messages For Notify",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 开发运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
错误通知工作流
集成Telegram、Gmail和消息应用的多渠道工作流错误警报
Code
Gmail
Slack
+5
8 节点Khairul Muhtadin
开发运维
错误监控工作流
多通道错误监控,集成Telegram、Discord、Slack、WhatsApp和Gmail
Code
Gmail
Slack
+5
8 节点Khaisa Studio
开发运维
将您的工作流保存到 GitHub 仓库
每日工作流备份至 GitHub 并发送 Slack 通知
If
N8n
Set
+10
18 节点Andrew
开发运维
Telegram-n8n-指挥官
通过 Telegram 机器人命令远程控制 n8n 实例
If
N8n
Set
+11
67 节点Arthur Braghetto
开发运维
模板 - 记录器子工作流
使用Supabase和Log4j2风格级别创建结构化日志系统
Code
Supabase
Error Trigger
+3
11 节点Elodie Tasia
开发运维
n8n网站停机监控
多网站监控系统,支持电话通知
If
Code
Gmail
+7
20 节点InfyOm Technologies
开发运维