⚒️ Create structured logging system with Supabase and Log4j2-style levels

236 views · ⚒️ Engineering

Description

Create centralized, structured logs directly from your n8n workflows, using Supabase as your scalable log database.

Whether you’re debugging a workflow, monitoring execution status, or tracking error events, this template makes it easy to log messages in a consistent, structured format inspired by Log4j2 levels (DEBUG, INFO, WARN, ERROR, FATAL).

You’ll get a reusable sub-workflow that lets you log any message with optional metadata, tied to a workflow execution and a specific node.

What this template does

Use Cases

Requirements

To use this template, you’ll need:

The table shema and SQL scripts are given in the template file.

How to Use This Template

{
  "workflow_name": "sync_crm_to_airtable",
  "execution_id": {{$execution.id}},
  "node_name": "Airtable Insert",
  "log_level": "INFO",
  "message": "New contact pushed to Airtable successfully",
  "metadata": {
    "recordId": "rec123",
    "fields": ["email", "firstName"]
  }
}

🔗 Nodes Used

Execute Sub-workflow, Supabase, Execute Workflow Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup