AcademyWorkflowsData and reporting

Natural Language Database Queries with PostgreSQL

Business teams who need answers from a PostgreSQL database without writing SQL.

  • Recommendedour rating
  • 3,658views on n8n
Open on n8n.io ↗

Paste it straight onto an n8n canvas with Ctrl+V or Cmd+V.

natural-language-database-queries-with-dual-agent-ai-postgresql-integration.json

Loading the file...

What it does

An n8n workflow in which a main AI agent reads a plain-language question and applies query limits. A sub-agent then writes the PostgreSQL query, and the results come back as a formatted table with a capped number of rows. Conversation memory is stored in Postgres, so follow-up questions keep their context.

Use cases

  1. 01Ask which products sell most, in plain language
  2. 02Get formatted tables from a database without SQL
  3. 03Let non-technical staff ask questions about their data

Connects

Postgres · Telegram · AI Agent · Call n8n Workflow Tool · OpenAI · Postgres Chat Memory · OpenRouter Chat Model · Think Tool

Questions about
Natural Language Database Queries with PostgreSQL.

What is Natural Language Database Queries with PostgreSQL used for?

Business teams who need answers from a PostgreSQL database without writing SQL. An n8n workflow in which a main AI agent reads a plain-language question and applies query limits. A sub-agent then writes the PostgreSQL query, and the results come back as a formatted table with a capped number of rows. Conversation memory is stored in Postgres, so follow-up questions keep their context.

How do I import Natural Language Database Queries with PostgreSQL into n8n?

Copy the workflow JSON from this page and paste it onto the n8n canvas with Ctrl+V or Cmd+V. Then connect your credentials in each node.

Is Natural Language Database Queries with PostgreSQL safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.