Error Logging and Throttled Alerts in n8n

somdn_product_page

This n8n workflow is designed for robust error management and notification control. Its primary goal is to log errors from workflows into a PostgreSQL database, preventing alert flooding by limiting notifications to one every five minutes. When an error occurs, the ‘Error Trigger’ node activates, logging detailed error information—including URL, message, and stack trace—into a dedicated database table. It then counts recent errors within a five-minute window to determine whether to send alert notifications. If no errors have been logged in the past five minutes, the workflow proceeds to trigger email and mobile push notifications, alerting the team about the issue. Additionally, the workflow includes cleanup steps to reset logs, especially useful in development environments, ensuring efficient error tracking without overwhelming alerts. This setup is ideal for maintaining system stability, centralized error logging, and controlled alerting in automated workflows.

Node Count

11 – 20 Nodes

Nodes Used

code, emailSend, errorTrigger, executeWorkflow, executeWorkflowTrigger, if, manualTrigger, noOp, postgres, pushover, stickyNote

Reviews

There are no reviews yet.

Be the first to review “Error Logging and Throttled Alerts in n8n”

Your email address will not be published. Required fields are marked *