Block 1 - When chat message received
- Type / Role
- @n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
- Config choices
- Version 1.1
This workflow is provided as-is. Please review and test before using in production.
 with RAG + SQL.
Peliqan.io is used as a "cache" of all business data. Peliqan uses one-click ELT to sync all your business data to its built-in data warehouse, allowing for fast & accurate RAG and "Text to SQL" queries.
The workflow will write source data to Supabase as a vector store, for RAG searches by the chatbot. The source URL (e.g. the URL of a Notion page) is added in metadata.
The AI Agent will decide for each question to use either RAG or Text-to-SQL or a combination of both. Text-to-SQL is performed via the Peliqan node, added as a tool to the AI Agent. The question of the user in natural language is converted to an SQL query by the AI Agent. The query is executed by Peliqan.io on the source data and the result is interpreted by the AI Agent.
RAG is typically used to answer knowledge questions, often on non-structured data (Notion pages, Google Drive etc.). Text-to-SQL is typically used to answer analytical questions, for example "Show list of customers with number of open support tickets and add customer revenue based on invoiced amounts".
Visit https://peliqan.io/n8n for more information.
Disclaimer: This template contains a community node and therefore only works for n8n self-hosted users.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Query business data with OpenAI chatbot using RAG and text-to-SQL via Peliqan |
|---|---|
| Complexity | advanced |
| Nodes | 19 |
| Categories | Internal Wiki, AI Chatbot |
| Author | Peliqan |
| Published | 30 Jul 2025 |
Use the JSON export at /data/workflows/6706/6706.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
![Peliqan n8n chatbot with RAG and Text To SQL](https://images.spr.so/cdn cgi/imagedelivery/j42No7y dcokJuNgXeA0ig/99465134 7cb5 46cd a26c c44c11a3317e/Peliqan n8n AI Agent template with RAG and Te...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI Chatbot use case.