Smart Telegram Responses Using AI Language Models
Workflow Description
An automation that receives inquiries via Telegram and processes them using advanced language models with vector-based knowledge retrieval, delivering accurate and contextual answers instantly to users.
How it works
- 1.Receive incoming message from designated Telegram channel
- 2.Convert message to embeddings using OpenAI Embeddings service
- 3.Search relevant content in Pinecone Vector Store database
- 4.Process query through LLM Chain and retrieve answer from Groq model
- 5.Send intelligent response back to user on Telegram
Use cases
- Automated customer support that answers client questions 24/7 through Telegram
- Internal knowledge assistant providing information from company documents to employees
Requirements
- Telegram bot with valid API token
- OpenAI API key for text embeddings
- Pinecone account for vector storage and retrieval
- Groq API key for the language model
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