错误处理程序发送Telegram

初级

这是一个Other、Building Blocks领域的自动化工作流,包含 4 个节点。主要使用 Code、Telegram、ErrorTrigger 等节点。 错误处理程序发送Telegram:实时工作流失败警报

前置要求
  • Telegram Bot Token

使用的节点 (4 个)

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "ozo5jlbwPHgaMnVt",
  "meta": {
    "instanceId": "2c69a61055797162319204105e5a124e409f0c7fbfaba08ee106324374f4ae73"
  },
  "name": "错误处理程序发送 Telegram",
  "tags": [],
  "nodes": [
    {
      "id": "3968e71e-d9fb-4810-81bb-18ecf073b3ee",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        520,
        -200
      ],
      "webhookId": "b3f6e388-8313-4bc1-8077-d81471b2f95d",
      "parameters": {
        "text": "=Workflow: {{ $('Error Trigger').first().json.workflow.name }}\nData & Time: {{ $now }}\nURL: {{ $('Error Trigger').first().json.execution.url }}\nLast Node: {{ $('Error Trigger').first().json.execution.lastNodeExecuted }}\nError Detal: {{ $('Error Trigger').first().json.execution.error.message }}\n",
        "chatId": "={{ $('Config').item.json.telegramChatId }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BCYwPAl9pdnRqKeR",
          "name": "Telegram n8n Log Test"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.2,
      "waitBetweenTries": 3000
    },
    {
      "id": "bbb54150-b749-49e2-9c49-720341691151",
      "name": "错误触发器",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        60,
        -200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "68bc359d-4c7f-4027-8e76-c2bc6b612ede",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        -820
      ],
      "parameters": {
        "width": 1420,
        "height": 1240,
        "content": "### **如何使用 Telegram 错误通知器**"
      },
      "typeVersion": 1
    },
    {
      "id": "6bcf5a24-643d-4fbe-81c9-c8830dc8f1b6",
      "name": "配置",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        -200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bf7b1294-b50d-49f7-a5f1-76b0d6845aea",
              "name": "telegramChatId",
              "type": "string",
              "value": "123456789"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e3a6d588-a83c-4d4e-afdc-232624479723",
  "connections": {
    "Config": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

这是一个初级难度的工作流,适用于Other、Building Blocks等场景。适合 n8n 新手,包含 1-5 个节点的简单工作流

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
初级
节点数量4
分类2
节点类型4
难度说明

适合 n8n 新手,包含 1-5 个节点的简单工作流

外部链接
在 n8n.io 上查看 →

分享此工作流