AutomationFlowsSlack & Telegram › 99_global_error_handler

99_global_error_handler

99_global_error_handler. Uses errorTrigger, telegram, googleSheets, stickyNote. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexity4 nodesError TriggerTelegramGoogle Sheets
Slack & Telegram Trigger: Event Nodes: 4 Complexity: ★★☆☆☆

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "99_global_error_handler",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "fa234246-5447-4470-a7c1-436952af3210",
      "name": "Catch Workflow Error"
    },
    {
      "parameters": {
        "chatId": "admin_id",
        "text": "=<b>\ud83d\udea8 CRITICAL ERROR REPORT</b>\n\n<b>Source Workflow:</b> {{ $json.workflow.name }}\n<b>Error Message:</b> {{ $json.execution.error.message }}\n<b>Failed Node:</b> {{ $json.execution.lastNodeExecuted }}\n<b>Time:</b> {{ $now.format('YYYY-MM-DD HH:mm:ss') }}\n\n<a href=\"{{ $json.execution.url }}\">\ud83d\udc49 Open Execution Log</a>",
        "additionalFields": {
          "appendAttribution": false,
          "parse_mode": "HTML"
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        240,
        0
      ],
      "id": "02a6d7dc-d246-44ab-81a7-e0577857f493",
      "name": "Alert Admin (Telegram)",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1IH1j7tDItMlfPUjawuXSywX83fMQ_6m9ToIN6exWiMk",
          "mode": "list",
          "cachedResultName": "n8n_execution_logs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1IH1j7tDItMlfPUjawuXSywX83fMQ_6m9ToIN6exWiMk/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2122039850,
          "mode": "list",
          "cachedResultName": "errors",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1IH1j7tDItMlfPUjawuXSywX83fMQ_6m9ToIN6exWiMk/edit#gid=2122039850"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "timestamp": "={{ $now }}",
            "workflow_name": "={{ $('Catch Workflow Error').item.json.workflow.name }}",
            "error_message": "={{ $('Catch Workflow Error').item.json.execution.error.message }}",
            "execution_url": "={{ $('Catch Workflow Error').item.json.execution.url }}",
            "failed_node": "={{ $('Catch Workflow Error').item.json.execution.lastNodeExecuted }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "timestamp",
              "displayName": "timestamp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "workflow_name",
              "displayName": "workflow_name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "error_message",
              "displayName": "error_message",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "execution_url",
              "displayName": "execution_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "failed_node",
              "displayName": "failed_node",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        480,
        0
      ],
      "id": "dcee4972-c582-44df-a1c8-4c009093124e",
      "name": "Log Failure to GSheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "**Global Error Handler**\nTriggered automatically when any other workflow fails.\n1.  **Alert:** Sends immediate notification to Telegram with execution URL.\n2.  **Log:** Records error details to Google Sheets for auditing.",
        "height": 128,
        "width": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -208
      ],
      "typeVersion": 1,
      "id": "e90f1a14-4fb2-42a9-9d72-9ecd99a6b54e",
      "name": "Sticky Note"
    }
  ],
  "connections": {
    "Catch Workflow Error": {
      "main": [
        [
          {
            "node": "Alert Admin (Telegram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alert Admin (Telegram)": {
      "main": [
        [
          {
            "node": "Log Failure to GSheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "4a96a896-1307-4637-8460-254716c8612d",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "hqRcKQkYO4KNl7CpVzjbg",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

About this workflow

99_global_error_handler. Uses errorTrigger, telegram, googleSheets, stickyNote. Event-driven trigger; 4 nodes.

Source: https://github.com/gulnaz-bakinova/n8n-automation-integrations-showcase/blob/main/99_global_error_handler.json — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →