Skip to main content

Create structured logging system with Supabase and Log4j2-style levels

Workflow preview

Workflow preview
100%
Create structured logging system with Supabase and Log4j2-style levels preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 err...

Best for

  • Engineering automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.supabase, n8n-nodes-base.errortrigger, n8n-nodes-base.code, n8n-nodes-base.executeworkflow

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Elodie Tasia.

Original n8n.io source

1.1 Workflow description

Title
Create structured logging system with Supabase and Log4j2-style levels
Workflow name
Create structured logging system with Supabase and Log4j2-style levels

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

  • Provides a sub-workflow that inserts log entries into Supabase.

  • Each log entry supports the following fields:

    • workflow_name: Your n8n workflow identifier
    • node_name: last executed node
    • execution_id: n8n execution ID for correlation
    • log_level: One of DEBUG, INFO, WARN, ERROR, FATAL
    • message: Textual message for the log
    • metadata: Optional JSON metadata (flexible format)
  • Comes with examples for diffrerent log levels: Easily call the sub-workflow from any step with a Execute Workflow node and pass dynamic parameters.

Use Cases

  • Debug complex workflows without relying on internal n8n logs.
  • Catch and trace errors with contextual metadata.
  • Integrate logs into external dashboards or monitoring tools via Supabase SQL or APIs.
  • Analyze logs by level, time, or workflow.

Requirements

To use this template, you'll need:

  • A Supabase project with:
    • A log_level_type enum
    • A logs table matching the expected structure
  • A service role key or supabase credentials available in n8n.

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

How to Use This Template

  • Clone the sub-workflow into your n8n instance.
  • Set up Supabase credentials (in the Supabase node).
  • Call the sub-workflow using the Execute Workflow node.
  • Provide input values like:
{
  "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"]
  }
}
  • Repeat anywhere you need to log custom events.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - When Log Traced

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 4 - Create Log

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 5 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Error Trigger

Type / Role
n8n-nodes-base.errorTrigger - errorTrigger
Config choices
Version 1

Block 7 - Log Fatal

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Call Logger SubWorkflow 1

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

Block 10 - Log Info

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Call Logger SubWorkflow 2

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

3. Summary Table

Workflow Create structured logging system with Supabase and Log4j2-style levels
Complexity intermediate
Nodes 11
Categories Engineering
Author Elodie Tasia
Published 13 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8568/8568.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Create structured logging system with Supabase and Log4j2-style levels do?

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 err...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering use case.