Nl2sql

★ 7.9 · n8n · complex · 25 nodes

Nl2sql is an n8n automation template that takes a plain-language question via webhook, generates a SQL query using an AI model, executes it against a Postgres database, and returns the result — no manual SQL writing required. Reach for it when an analyst wants to query data by typing a question like "show last month's sales by region", when you need to give non-technical teammates self-serve access to structured data, or when prototyping a natural-language interface on top of an existing Postgres database. Trigger: webhook. Integrations: DeepSeek, Google Gemini (SQL generation), Postgres (query execution). The workflow imports as a standard n8n JSON template; credentials for the chosen LLM and Postgres must be configured before use. Direction is text-to-data (NL → SQL → result), not a visual query builder or SQL editor. Works well for teams already running n8n and Postgres; not suited for non-Postgres databases without adaptation, and generated queries should be validated before granting broad production access.