Block 1 - OpenAI Chat Model
- Type / Role
- @n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
AI Q&A Chatbot Workflow – Build Your Own AI Agent Trained on Private Documents This powerful AI automation add on upgrades your [Telegram Bot Starter Template](https://n8n.io/workflows/2402 tele...
@n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.stickynote, n8n-nodes-base.googledrive, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.extractfromfile, n8n-nodes-base.set
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Victor Gold.
Original n8n.io sourceThis powerful AI automation add-on upgrades your Telegram Bot Starter Template by integrating a fully functional AI chatbot and a context-aware AI agent that answers user questions using your internal documents.
Unlike generic bots, this chatbot uses your own data to respond with deeply personalized, context-relevant information — perfect for support, onboarding, internal knowledge access, and client-facing interactions.
It connects to any PostgreSQL database — including Neon.tech, Supabase, or a self-hosted Postgres setup — allowing you to build custom AI-powered FAQ assistants, internal support bots, or knowledge-based customer service tools.
The secret is Contextual Retrieval — a powerful technique where your documents are stored in a way that preserves meaning and context. This allows the AI to fetch highly relevant, source-backed responses, eliminating hallucinations and guesswork.
> Data is embedded, chunked, and saved in a vector database (Postgres + PGVector), enabling smart semantic search tailored to your needs.
📖 Learn more about this approach in this article by Anthropic →
You'll find step-by-step instructions inside the workflow.
This workflow is modular and ready to expand. Build powerful assistants by connecting additional workflows:
Explore more AI workflows and agents on my Gumroad →
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.
Showing the first 24 of 29 workflow blocks. Download the JSON for the full node graph.
| Workflow | Telegram AI chatbot with document-based answers using OpenAI and PGVector RAG |
|---|---|
| Complexity | advanced |
| Nodes | 29 |
| Categories | Support Chatbot, AI RAG |
| Author | Victor Gold |
| Published | 08 Jun 2025 |
Use the JSON export at /data/workflows/4799/4799.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.
AI Q&A Chatbot Workflow – Build Your Own AI Agent Trained on Private Documents This powerful AI automation add on upgrades your [Telegram Bot Starter Template](https://n8n.io/workflows/2402 tele...
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 Support Chatbot, AI RAG use case.