workflows.fit
Back to n8n workflows
n8n templateFreeBy Venkata V

Log errors and audit events with n8n Data Tables

How it works This workflow provides a reusable error handling, audit logging, and observability pattern for n8n workflows using two n8n custom Data Tables: AuditLog and ErrorLog. It is designed to be used across multi...

DevelopmentCore NodesSticky NoteError TriggerCodeData Table
Loading interactive preview...

Template notes

How it works

This workflow provides a reusable error handling, audit logging, and observability pattern for n8n workflows using two n8n custom Data Tables: AuditLog and ErrorLog.

It is designed to be used across multiple workflows as a central logging workflow.

At a high level, it:

• Captures unhandled workflow errors using the n8n Error Trigger • Stores technical error details in an ErrorLog Data Table • Allows other workflows to write business/audit events into an AuditLog Data Table • Adds useful observability metadata such as workflow name, workflow ID, execution ID, error message, failed node, severity, and correlation ID • Redacts sensitive values such as passwords, tokens, API keys, and authorization headers before logging • Includes scheduled cleanup logic to purge old log records after a configurable retention period

This template is useful for production-grade n8n setups where multiple workflows need a consistent and reusable logging approach.

Set up steps

Setup should take around 10–15 minutes.