Skip to main content

Log n8n workflow errors to your REST API with Slack alerts and metrics

Workflow preview

Workflow preview
100%
Log n8n workflow errors to your REST API with Slack alerts and metrics preview
Open on n8n.io

1. Workflow Overview

Track all n8n workflow failures with automatic error capture, severity classification, duplicate detection, Slack alerting, performance metrics, and log retention. WHAT IT DOES: Runs as an error su...

Best for

  • DevOps automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.errortrigger, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.switch, n8n-nodes-base.slack, n8n-nodes-base.noop

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Manu.

Original n8n.io source

1.1 Workflow description

Title
Log n8n workflow errors to your REST API with Slack alerts and metrics
Workflow name
Log n8n workflow errors to your REST API with Slack alerts and metrics

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

WHAT IT DOES:

Runs as an error sub-workflow attached to any workflow you want to monitor Captures execution metadata (workflow name, ID, duration, mode, failed node, stack trace) Extracts environment info (timezone, node version, platform) Classifies error severity (critical, warning, info) based on configurable keywords Deduplicates alerts within 5-minute windows to prevent flooding Saves structured logs to your database via REST API Routes alerts to the appropriate Slack channel by severity Calculates performance metrics and updates daily aggregates Auto-cleans old logs based on configurable retention policy Includes a fallback error handler to prevent cascading failures from the logger itself

INCLUDED FLOWS:

New critical error: Error Trigger → Extract metadata → Classify as critical → Check duplicate → Save log → Slack alert to #workflow-alerts → Calculate metrics → Update aggregates → Cleanup old logs New warning error: Same capture flow → Classify as warning → Slack alert to #workflow-warnings → Metrics and retention New info error: Same capture flow → No keyword match → Logged only, no alert → Metrics and retention Duplicate error: Same workflowId + errorNode + errorType within 5-minute window → Skipped, no alert or log saved Logger failure: Logger Error Trigger → Format error → Immediate Slack alert to #system-errors, prevents cascading

SEVERITY CLASSIFICATION:

Critical (immediate alert to #workflow-alerts): payment, database, authentication, authorization, critical, fatal, connection, timeout Warning (alert to #workflow-warnings): retry, temporary, unavailable, rate limit, quota Info (logged only, no alert): any error not matching critical or warning keywords

LOG DATA STRUCTURE:

Each log entry contains execution_id, workflow_id, workflow_name, status, severity, started_at, ended_at, duration_seconds Error details include error_message, error_type, error_node, error_stack (truncated to 2000 chars) Deduplication fields: error_hash, dedupe_key Additional fields: mode, environment (JSON), created_at timestamp

SETUP:

HTTP Header Auth credential with API key and base URL for your logging REST API Slack credential with access to three channels: #workflow-alerts (critical), #workflow-warnings (warnings), #system-errors (logger failures) Backend API with endpoints: GET /api/logs/dedupe/:dedupeKey, POST /api/logs/execution, POST /api/logs/metrics, POST /api/logs/aggregate, DELETE /api/logs/cleanup To monitor a workflow, set this workflow as its error sub-workflow in the workflow settings

CUSTOMIZABLE:

Critical and warning keywords are editable arrays in the Classify Error code node Deduplication window is adjustable in the Generate Error Hash code node (default: 5 minutes) Retention period is configurable in the Calculate Retention code node (default: 30 days) Metrics calculation logic is editable in the Calculate Metrics code node Slack channel names are configurable in each Slack alert node Stack trace truncation length is adjustable in the Format Log Entry code node (default: 2000 chars) Add email alerts by connecting a Gmail node after any Slack alert node Add PagerDuty or Opsgenie integration after the critical alert path for on-call escalation

IDEAL FOR:

DevOps teams, n8n administrators, and automation engineers who need centralized error monitoring, alerting, and performance tracking across multiple n8n workflows.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Error capture

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Error Trigger

Type / Role
n8n-nodes-base.errorTrigger - errorTrigger
Config choices
Version 1

Block 4 - Extract Metadata

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Extract Environment

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Error classification

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Classify Error

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Generate Error Hash

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - API - Check Duplicate

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 10 - Is New Error?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 11 - Log storage

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Format Log Entry

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - API - Save Log

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Alert routing

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Alert Router

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 16 - Critical alerts

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Format Critical Alert

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Slack - Critical Alert

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.2

Block 19 - Format Warning Alert

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Slack - Warning Alert

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.2

Block 21 - No Alert Needed

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 22 - Performance metrics

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Calculate Metrics

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 24 - API - Save Metrics

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Showing the first 24 of 33 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Log n8n workflow errors to your REST API with Slack alerts and metrics
Complexity advanced
Nodes 33
Categories DevOps, AI Summarization
Author Manu
Published 03 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13198/13198.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Log n8n workflow errors to your REST API with Slack alerts and metrics do?

Track all n8n workflow failures with automatic error capture, severity classification, duplicate detection, Slack alerting, performance metrics, and log retention. WHAT IT DOES: Runs as an error su...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps, AI Summarization use case.