Log system errors and send controlled notifications
Workflow Description
Automation that captures application errors, stores them in PostgreSQL, and sends notifications via email, Pushover, or Twitter with built-in safeguards to prevent notification fatigue from excessive repeated alerts.
How it works
- 1.Trigger when system error is detected
- 2.Store error details and timestamp in PostgreSQL database
- 3.Check frequency of previous notifications for this error type
- 4.Send email or Pushover alert if notification limits not exceeded
- 5.Optionally post critical alert to Twitter/X
Use cases
- Monitor production applications and consolidate error logs in a centralized Postgres database for auditing and debugging
- Prevent alert noise by throttling notifications and grouping similar errors to keep ops teams focused
Requirements
- Active PostgreSQL database with schema for storing error logs and notification history
- Email service and Pushover account configured for reliable alert delivery
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (16)
Error Trigger
Error Trigger
Insert Log
Postgres
Count for 5 minutes
Postgres
Sticky Note
Sticky Note
Principal E-Mail
Email Send
Fallback E-Mail
Email Send
Push mobile notification
Pushover
Truncate Log Database
Postgres
Sometimes... just cleanup
Manual Trigger
Call this Sample - Prepend to your error catcher
Execute Workflow
See below to prepend this at your error handling
Execute Workflow Trigger
If there is no logs in 5 minutes
If
CleanUp execution. See below if you will prepend this workflow
Code
Insert your error handling logic after this
No Op
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note