Reply to Telegram messages with an AI-powered OpenAI agent
Workflow Description
An automation that listens to Telegram messages and forwards them to an intelligent agent powered by OpenAI for smart responses. It supports document search, contextual memory, calculations, and sends results back to the user directly on Telegram.
How it works
- 1.Receive incoming messages from Telegram users automatically
- 2.Process and split text into vectors for intelligent semantic search
- 3.Route the query to an AI agent that uses OpenAI with additional tools
- 4.Search vector databases or Wikipedia depending on the context and query type
- 5.Send the agent-generated response back to the user via Telegram
Use cases
- Smart assistant bot that answers user questions directly in Telegram with accurate information
- Document-based inquiry system: upload files, ask questions about them, and get instant answers
- Administrative assistant that handles calculations, logical operations, and generates quick reports
Requirements
- Active Telegram bot token or webhook URL that is accessible and running
- Valid OpenAI API key (GPT-3.5 or newer for optimal performance)
- Optional Qdrant vector database server (local or cloud-hosted) for advanced semantic search
- The workflow includes additional tools (calculator, Wikipedia) that must be enabled or configured
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 (27)
Telegram Trigger
Set
Ultimate Assistant
Agent
Email Agent
Tool Workflow
Contact Agent
Tool Workflow
Content Creator Agent
Tool Workflow
Tavily
HTTP Request
Calendar Agent
Tool Workflow
Download File
Set
Transcribe
OpenAI
Calculator1
Tool Calculator
Set 'Text'1
Set
Switch1
Switch
Response1
Set
Wikipedia
Tool Wikipedia
Qdrant Vector Store
Vector Store Qdrant
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
OpenAI Chat Model
OpenAI
Embeddings OpenAI1
OpenAI
Qdrant Vector Store1
Vector Store Qdrant
Embeddings OpenAI
OpenAI
Window Buffer Memory
Memory Buffer Window
Download File1
Set
Code
Code
If
If
Edit Fields
Set
Edit Fields1
Set