错误通知工作流
中级
这是一个DevOps领域的自动化工作流,包含 8 个节点。主要使用 Code, Gmail, Slack, Discord, Telegram 等节点。 集成Telegram、Gmail和消息应用的多渠道工作流错误警报
前置要求
- •Google 账号和 Gmail API 凭证
- •Slack Bot Token 或 Webhook URL
- •Discord Bot Token 或 Webhook
- •Telegram Bot Token
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "7RR5Rf9kzQ2eWl5C",
"meta": {
"instanceId": "c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c",
"templateCredsSetupCompleted": true
},
"name": "错误通知工作流",
"tags": [],
"nodes": [
{
"id": "ef401694-6d19-4d49-8269-0bfeefbc35e9",
"name": "错误触发器",
"type": "n8n-nodes-base.errorTrigger",
"position": [
20,
320
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e950234f-06c7-4304-b8a6-62d3ba6b7a50",
"name": "代码",
"type": "n8n-nodes-base.code",
"position": [
240,
320
],
"parameters": {
"jsCode": "// Perfect error access untuk N8N v1.99.1\nconst errorData = $input.first().json;\nconst execution = errorData.execution;\nconst workflow = errorData.workflow;\nconst error = execution.error;\n\nconst message = `🚨 <b>WORKFLOW ERROR</b>\\n\\n` +\n `📋 Workflow: <b>${workflow.name}</b>\\n` +\n `⚙️ Node: <code>${error.node.name}</code>\\n` +\n `❌ Error: <code>${error.message}</code>\\n` +\n `📝 Description: <i>${error.description}</i>\\n` +\n `🕐 Waktu: ${new Date(error.timestamp).toLocaleString('id-ID')}\\n` +\n `🔍 Execution: <a href=\"${execution.url}\">${execution.id}</a>\\n` +\n `⚠️ Level: ${error.level.toUpperCase()}`;\n\nreturn {\n message: message,\n parse_mode: 'HTML',\n chat_id: '621412350'\n};"
},
"typeVersion": 2
},
{
"id": "09a04430-1cb6-4bd5-b97d-d6b98541fd82",
"name": "通知 Gmail",
"type": "n8n-nodes-base.gmail",
"position": [
460,
320
],
"webhookId": "52f0cc71-1ad8-4f9a-b07c-bae9be1e217c",
"parameters": {
"options": {}
},
"credentials": {
"gmailOAuth2": {
"id": "8p11S7abjY8KddB9",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "d78b5623-caab-4616-aa3a-e00af03cba3a",
"name": "通知 Whatsapp",
"type": "n8n-nodes-base.whatsApp",
"disabled": true,
"position": [
460,
520
],
"webhookId": "fde1b1fc-48dc-4d7b-b48a-c42b36225a43",
"parameters": {
"operation": "send",
"additionalFields": {}
},
"typeVersion": 1
},
{
"id": "8c5dbd37-cc37-4a1a-89c4-bbf692339b93",
"name": "通知 Slack",
"type": "n8n-nodes-base.slack",
"disabled": true,
"position": [
460,
720
],
"webhookId": "d2b8ce70-e478-4f05-9add-37d859f73dd8",
"parameters": {
"otherOptions": {}
},
"typeVersion": 2.3
},
{
"id": "0ec6e5cb-c290-4073-9560-0f237f85a6bd",
"name": "通知 Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
460,
120
],
"webhookId": "13c616bf-a3ad-4035-998a-1dfe6021b89f",
"parameters": {
"text": "={{ $json.message }}",
"chatId": "<your_chat_id>",
"additionalFields": {
"parse_mode": "HTML"
}
},
"credentials": {
"telegramApi": {
"id": "dRZHNcPa8EcTYTY2",
"name": "Khaisa Monitoring Bot"
}
},
"typeVersion": 1
},
{
"id": "4e378031-382d-4abd-94f5-b7274f42161e",
"name": "通知 Discord",
"type": "n8n-nodes-base.discord",
"disabled": true,
"position": [
460,
-80
],
"webhookId": "ea0cb122-61d1-4457-9447-34daa40dccdc",
"parameters": {
"content": "={{ $json.message }}",
"options": {},
"authentication": "webhook"
},
"credentials": {
"discordWebhookApi": {
"id": "LLZlMnlqvhY0SVaL",
"name": "Discord Webhook account"
}
},
"typeVersion": 2
},
{
"id": "ad022c9b-4453-4590-b27e-358e342e1f26",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
-20
],
"parameters": {
"color": 5,
"width": 420,
"height": 280,
"content": "## 🚨 错误通知工作流"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d60f1aea-932f-4335-865e-1f289e070dc1",
"connections": {
"Code": {
"main": [
[
{
"node": "Notify Telegram",
"type": "main",
"index": 0
},
{
"node": "Notify Discord",
"type": "main",
"index": 0
},
{
"node": "Notify Slack",
"type": "main",
"index": 0
},
{
"node": "Notify Whatsapp",
"type": "main",
"index": 0
},
{
"node": "Notify Gmail",
"type": "main",
"index": 0
}
]
]
},
"Error Trigger": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Notify Whatsapp": {
"main": [
[]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 开发运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
错误通知器-v1-无数据库
通过Telegram、Slack和其他通讯工具进行集中错误监控和提醒
Code
Gmail
Slack
+7
13 节点Andrew
开发运维
错误监控工作流
多通道错误监控,集成Telegram、Discord、Slack、WhatsApp和Gmail
Code
Gmail
Slack
+5
8 节点Khaisa Studio
开发运维
页面速度洞察
使用 Gemini 和 PageSpeed Insights 自动化网站性能分析与比较
Code
Switch
Discord
+5
17 节点Khairul Muhtadin
开发运维
使用Rag自动重新发布工作
基于 RAG、Jina AI 和 OpenAI 到 WordPress 的自动化职位提取与发布
If
Set
Code
+18
56 节点Khairul Muhtadin
人力资源
使用Google Drive、GitHub和消息警报的自动化工作流备份系统
使用Google Drive、GitHub和消息警报的自动化工作流备份系统
If
N8n
Set
+11
20 节点Khairul Muhtadin
内容创作
自动职位列表提取与发布模板
自动职位列表提取与发布模板
If
Set
Code
+14
53 节点Khairul Muhtadin
人力资源