This n8n workflow creates an intelligent chat interface for interacting with an SQLite database using GPT-4. It automates data retrieval and analysis from a sample database (chinook.db), enabling users to ask questions in natural language and receive detailed responses.
The process begins with a manual trigger, which downloads a ZIP file containing the chinook.sql database, extracts it, and saves it locally. Once set up, the workflow remains ready to answer user queries. When a chat message is received, the local database is loaded, and the user input is combined with the database binary data. This information is processed by a LangChain AI Agent configured to run SQL queries and generate natural language answers.
A memory buffer node maintains context across multiple interactions, allowing for complex multi-query conversations. The setup includes sticky notes with instructions to guide users and clarify workflow functions, making it suitable for use cases like data analysis, reporting, or educational tools where natural language querying of a database is needed.
Reviews
There are no reviews yet.