Intelligent Telegram responses using a knowledge base
Workflow Description
An automation that receives messages from a Telegram channel, processes content through AI models, searches a vector knowledge base, and automatically sends smart customized replies to users in real time.
How it works
- 1.Receive incoming messages from Telegram using the dedicated trigger
- 2.Convert message text to numerical vectors using OpenAI's embedding model
- 3.Search the knowledge base stored in Pinecone for relevant answers
- 4.Process context and queries through an LLM chain to generate intelligent responses
- 5.Send the generated reply back to the user via Telegram
Use cases
- Automatic answers to frequent customer questions on Telegram
- Smart customer support using company knowledge bases
- Advisory bot providing reliable information from predefined documents
Requirements
- Active Telegram account with Bot API authentication
- Valid OpenAI API key for embeddings and language models
- Configured Pinecone database with indexed information
- Reference documents or texts to build the knowledge base
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (20)
Telegram Trigger
Set
Embeddings OpenAI
OpenAI
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
Stop and Error
Stop And Error
Question and Answer Chain
Chain Retrieval Qa
Vector Store Retriever
Retriever Vector Store
Pinecone Vector Store1
Vector Store Pinecone
Groq Chat Model
Lm Chat Groq
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Check If is a document
If
Change to application/pdf
Code
Telegram get File
Set
Embeddings
OpenAI
Telegram Response
Set
Telegram Response about Database
Set
Stop and Error1
Stop And Error
Pinecone Vector Store
Vector Store Pinecone
Limit to 1
Limit