📄 SKILL.md

← Vault

name: n8n-supabase-workflow-debug

description: Debug n8n workflows connecting to Supabase REST API — common bugs, SQL updates, and workflow_history management on self-hosted Docker n8n


n8n + Supabase REST API Integration Debugging

Context

Debugging n8n workflows that connect to Supabase via REST API on self-hosted n8n (VPS Docker).

Common Issues and Solutions

1. n8n Supabase Node Bugs

The native n8n-nodes-base.supabase node has bugs with filters (select conditions) and fieldsUi parameters — errors like:

Debugging Commands

`bash

Check workflow executions

docker exec n8n-postgres psql -U n8n -d n8n -c \

'SELECT id, "workflowId", status, finished, mode, "startedAt", "stoppedAt" FROM execution_entity WHERE "workflowId" = '\''{id}'\'' ORDER BY "startedAt" DESC LIMIT 5;'

Check execution data (error details)

docker exec n8n-postgres psql -U n8n -d n8n -c \

'SELECT data FROM execution_data WHERE "executionId" = {exec_id};'

`

n8n REST API Authentication

Login via API to get session cookie:

`bash

curl -s -c cookies.txt https://n8n.example.com/rest/login \

-X POST -H "Content-Type: application/json" \

-d '{"emailOrLdapLoginId": "user@email.com", "password": "pass"}'

`

Then use -b cookies.txt for subsequent authenticated requests.

Supabase Anon Key Format

sb_ prefix = Share Bucket (wrong), sbp_ prefix = Project API key (also not the anon key).

The anon key is a JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... — decode the second part to find project ref.