AutomationFlowsSlack & Telegram › Log N8n Workflow Errors to Your REST API with Slack Alerts and Metrics

Log N8n Workflow Errors to Your REST API with Slack Alerts and Metrics

ByManu @manu on n8n.io

Track all n8n workflow failures with automatic error capture, severity classification, duplicate detection, Slack alerting, performance metrics, and log retention.

Event trigger★★★★★ complexity33 nodesError TriggerHTTP RequestSlack
Slack & Telegram Trigger: Event Nodes: 33 Complexity: ★★★★★ Added:

This workflow corresponds to n8n.io template #13198 — we link there as the canonical source.

This workflow follows the Error Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.

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
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "0debcd19-b472-4bfc-a0eb-504b393ba141",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1984,
        -1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ff361afc-8d33-4759-a80e-456ebf666d65",
      "name": "Error capture",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e3a6f31e-0bef-434e-a5b7-ee10bf22a379",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -1488,
        -912
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fa9e150a-15a0-4233-9aeb-cb4de35441b8",
      "name": "Extract Metadata",
      "type": "n8n-nodes-base.code",
      "position": [
        -1248,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "afe44e8a-f410-4f08-866d-ed5ff9210bde",
      "name": "Extract Environment",
      "type": "n8n-nodes-base.code",
      "position": [
        -1008,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "14b98347-1873-4a44-a75a-ede2b179e14f",
      "name": "Error classification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        -1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d2658460-93aa-443a-9b1c-411ce25a195f",
      "name": "Classify Error",
      "type": "n8n-nodes-base.code",
      "position": [
        -736,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "3ff6e953-f07d-4726-b5e8-51b3f30f37c3",
      "name": "Generate Error Hash",
      "type": "n8n-nodes-base.code",
      "position": [
        -496,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "5bef2682-4b61-4aac-a5af-3ca30b69d886",
      "name": "API - Check Duplicate",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -256,
        -912
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "b68f0644-af1c-4da5-9316-665b1d793379",
      "name": "Is New Error?",
      "type": "n8n-nodes-base.if",
      "position": [
        -16,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "ec0a3883-a243-4097-aacf-4dba3078df1f",
      "name": "Log storage",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c4e7ae46-d15e-4613-a1cd-b199ea05d8f4",
      "name": "Format Log Entry",
      "type": "n8n-nodes-base.code",
      "position": [
        256,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "5150c3e6-0d68-4a36-80f3-3b22f749acac",
      "name": "API - Save Log",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        496,
        -912
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "7637a27e-9085-4a24-a367-12f125d4a1e8",
      "name": "Alert routing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "39594a0c-eff8-487d-b391-a3cf5d2237ce",
      "name": "Alert Router",
      "type": "n8n-nodes-base.switch",
      "position": [
        768,
        -912
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "53582f91-3781-459f-b751-6246e051aa26",
      "name": "Critical alerts",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        -1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "492701fb-b3fb-4d3b-ba95-f1c8f0025d07",
      "name": "Format Critical Alert",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "dc0f1c03-b7a2-4250-9b6f-44b40fbfb4ca",
      "name": "Slack - Critical Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1520,
        -912
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "4016f4bb-7104-46f9-a2ee-552311f62dcf",
      "name": "Format Warning Alert",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        -720
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "5f76cf42-3f16-4ab9-a139-41093d6dd3b1",
      "name": "Slack - Warning Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1520,
        -720
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "4893b1a0-92f8-4f98-b3ba-e6bde075c36e",
      "name": "No Alert Needed",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1280,
        -528
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "14ffa09d-8ead-4f7a-a43b-46b2a013fe25",
      "name": "Performance metrics",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        -1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c12a1628-1956-464a-b088-e6e55f02582f",
      "name": "Calculate Metrics",
      "type": "n8n-nodes-base.code",
      "position": [
        1872,
        -912
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9d52ac44-d618-4788-82c2-4617cb91b1a9",
      "name": "API - Save Metrics",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2112,
        -912
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "0bf5d092-2512-4b13-ac1b-c97320ea1eb3",
      "name": "Prepare Aggregate",
      "type": "n8n-nodes-base.code",
      "position": [
        2112,
        -720
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "1799d039-09f1-4f7e-b31f-5501cb2a1af9",
      "name": "API - Update Aggregate",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2352,
        -720
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "9ce94f87-4eee-46b2-84ec-2ed7a558d7c4",
      "name": "Retention policy",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        -368
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9b2fa15f-46df-4f2b-96d8-2a8c5ce007d7",
      "name": "Calculate Retention",
      "type": "n8n-nodes-base.code",
      "position": [
        1872,
        -256
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "8770d580-60f4-49e7-a0db-6381c8d55544",
      "name": "API - Cleanup Old Logs",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2112,
        -256
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "e43d973c-1d07-4273-979e-738dc178e295",
      "name": "Fallback logging",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1984,
        80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c589fa39-62d4-484d-864d-77d04bbebc00",
      "name": "Format Logger Error",
      "type": "n8n-nodes-base.code",
      "position": [
        -1712,
        192
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "fa18fae8-dd04-470b-8b62-5ffa44040fd0",
      "name": "Slack - Logger Error",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1472,
        192
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "7d112f29-7a60-440b-b2c7-f23cb5c9af08",
      "name": "Skip Duplicate",
      "type": "n8n-nodes-base.noOp",
      "position": [
        224,
        -720
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "connections": {
    "Alert Router": {
      "main": [
        [
          {
            "node": "Format Critical Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Warning Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Alert Needed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Extract Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is New Error?": {
      "main": [
        [
          {
            "node": "Format Log Entry",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Skip Duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Save Log": {
      "main": [
        [
          {
            "node": "Alert Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Error": {
      "main": [
        [
          {
            "node": "Generate Error Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Alert Needed": {
      "main": [
        [
          {
            "node": "Calculate Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Metadata": {
      "main": [
        [
          {
            "node": "Extract Environment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Log Entry": {
      "main": [
        [
          {
            "node": "API - Save Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Metrics": {
      "main": [
        [
          {
            "node": "API - Save Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Aggregate": {
      "main": [
        [
          {
            "node": "API - Update Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Save Metrics": {
      "main": [
        [
          {
            "node": "Prepare Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Retention": {
      "main": [
        [
          {
            "node": "API - Cleanup Old Logs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Environment": {
      "main": [
        [
          {
            "node": "Classify Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Logger Error": {
      "main": [
        [
          {
            "node": "Slack - Logger Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Error Hash": {
      "main": [
        [
          {
            "node": "API - Check Duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Warning Alert": {
      "main": [
        [
          {
            "node": "Slack - Warning Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Check Duplicate": {
      "main": [
        [
          {
            "node": "Is New Error?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Critical Alert": {
      "main": [
        [
          {
            "node": "Slack - Critical Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - Warning Alert": {
      "main": [
        [
          {
            "node": "Calculate Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Update Aggregate": {
      "main": [
        [
          {
            "node": "Calculate Retention",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - Critical Alert": {
      "main": [
        [
          {
            "node": "Calculate Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Track all n8n workflow failures with automatic error capture, severity classification, duplicate detection, Slack alerting, performance metrics, and log retention.

Source: https://n8n.io/workflows/13198/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

Stay ahead of payment disputes with this automated n8n workflow that integrates Stripe, Slack, and ClickUp. Perfect for finance teams, payment ops specialists, and SaaS businesses, this template fetch

HTTP Request, Slack, ClickUp
Slack & Telegram

Stop missing renewal deadlines and overpaying on auto-renewals. This workflow monitors your contract calendar in Google Sheets, sends progressive Slack notifications with manual research checklists, a

Slack, Error Trigger, Google Sheets
Slack & Telegram

This workflow is designed for developers, DevOps engineers, and automation specialists who manage multiple n8n workflows and need a reliable way to monitor for failures and receive alerts in real time

Error Trigger, Execute Workflow Trigger, Gmail +4
Slack & Telegram

The Error Notification workflow is designed to instantly notify you whenever any other n8n workflow encounters an error, using popular communication channels like Telegram and Gmail—with optional supp

Error Trigger, Gmail, WhatsApp +3
Slack & Telegram

Observe any n8n workflow and post rich error alerts to Slack. Uses httpRequest, n8n-nodes-org21, slack. Event-driven trigger; 11 nodes.

HTTP Request, N8N Nodes Org21, Slack