Skip to content
P
Databases

PostgreSQL

PostgreSQL is a powerful open-source SQL database that n8n can read from and write to directly — ideal for reliable, structured automation data.

Some links on n8n.school are affiliate links. If you sign up or purchase through them, we may earn a commission at no extra cost to you. We only recommend tools we genuinely believe help you automate better.

Best use case with n8n

Storing structured automation data reliably — running custom SQL from n8n for reporting, lookups, and high-volume workflows.

PostgreSQL is the open-source SQL database that powers a huge share of the software world — including n8n's own data layer. When you need reliable, structured storage and the full power of SQL, the Postgres node is your tool.

When to reach for raw Postgres

  • You need complex queries, joins, or aggregations for reporting.
  • You're handling high volume where spreadsheet APIs would choke.
  • You want vector search via pgvector for AI memory.
  • You're comfortable writing SQL and want maximum control.

Postgres vs Supabase vs Airtable

  • PostgreSQL (this node) — raw SQL power, you bring the host.
  • Supabase — managed Postgres with auth, storage, APIs, and a dashboard. Postgres with batteries included.
  • Airtable — friendly UI for non-technical teams; not a true SQL database.

Already self-hosting n8n?

You likely already run Postgres as n8n's backing store. You can point the Postgres node at a separate database (not n8n's own) to store your workflow data with full SQL control.

Key features

  • Full SQL via the n8n Postgres node
  • Insert, update, upsert, select & delete
  • Transactions and joins
  • pgvector extension for AI embeddings
  • Works with any managed Postgres host
  • Open source — no vendor lock-in

Pros & cons

Pros

  • Rock-solid, battle-tested, and free
  • Handles serious volume and complex queries
  • pgvector enables AI/RAG use cases
  • Also powers n8n's own data store

Cons

  • Requires SQL knowledge
  • You manage hosting (unless using a provider)
  • No friendly UI like Airtable out of the box

Alternatives

S
Supabase
Databases

Supabase is an open-source Postgres backend with auth, storage, and vector search — a powerful database layer for n8n and AI workflows.

Pricing: Free tier (2 projects, 500MB DB); Pro ~$25/mo per project; usage-based above limits

A
Airtable
Databases

Airtable is a flexible database-spreadsheet hybrid that's ideal as a no-code data store for n8n automations — CRMs, content calendars, and trackers.

Pricing: Free plan (1,000 records/base); Team ~$20/user/mo; Business ~$45/user/mo (annual)