Chat with Database Using AI

n8n AI Data Management Engineering

Contributed by Sabrina Ramonov 🍄. From the community directory at agents.sabrina.dev, republished with permission and full credit.

This workflow allows you to ask questions about data stored in a database using AI.

To use it, you'll need an OpenAI API key (although you could also swap in a model from another service).

Supported databases:

- Postgres

- MySQL

- SQLite

The workflow uses n8n's embedded chat, but you could also modify it to work with a chat service such as Slack, MS Teams, or WhatsApp.

Note that to use this template, you need to be on n8n version 1.19.4 or later.

Tools used: OpenAI, Slack, Microsoft Teams

Download the workflow template (JSON)

Original tutorial

Want this running in your business? KOBA42 builds and operates automations like this one.