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 ...
Template notes
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: