What problem does it solve?
n8n tasks often rely on the browser/UI, which can be brittle and slow. This skill enables direct SQL access to the n8n PostgreSQL datastore, providing faster, more reliable workflow management.
Core Features & Use Cases
- Direct SQL access to manage n8n workflows without UI automation.
- Modify workflows, update nodes or connections programmatically, and debug issues.
- Check recent executions and verify workflow health; restart n8n when needed.
Quick Start
Connect to your n8n PostgreSQL database and run example SQL commands to list active workflows, update nodes, or review executions.
Examples:
docker exec <postgres-container> psql -U n8n -d n8n -c "SELECT id, name, active FROM workflow_entity WHERE active = true ORDER BY "updatedAt" DESC;"
docker exec <postgres-container> psql -U n8n -d n8n -c "UPDATE workflow_entity SET nodes = '<JSON>' WHERE id = '<workflow-id>';"
docker exec <postgres-container> psql -U n8n -d n8n -c "SELECT "startedAt", "stoppedAt", status FROM execution_entity WHERE "workflowId" = '<workflow-id>' ORDER BY "startedAt" DESC LIMIT 5;"