Telegram automation
Workflow Description
Advanced automation template integrating Telegram bot with multiple AI models to process user queries. Loads documents, chunks them, generates embeddings, and delivers responses through a retrieval chain distributed across OpenAI and Groq services.
How it works
- 1.Receive messages from Telegram through dedicated trigger node
- 2.Load and split documents into processable chunks
- 3.Create vector embeddings and store them in Pinecone
- 4.Search vector database and retrieve contextual information
- 5.Process query through LLM chain with Groq model
- 6.Send reformulated answer back to user via Telegram
Use cases
- Customer support bot answering questions based on company knowledge base
- Personal research assistant analyzing documents and extracting information
- Automated consultation system handling internal employee inquiries
Requirements
- Telegram account with bot API token
- API keys from OpenAI and Groq for language models
- Pinecone account for vector storage and retrieval
- Prepared document files for loading and processing
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