Smart Telegram agent for processing text, audio, and image messages
Workflow Description
An automation that receives text messages, audio files, and images via Telegram, analyzes them using artificial intelligence, classifies their content, and generates intelligent responses tailored to each message type.
How it works
- 1.Receive message, audio file, or image through a webhook from Telegram
- 2.Convert audio files to text and extract content from images using OCR
- 3.Automatically classify the message to identify request type or topic
- 4.Process the text through OpenAI's language model to understand intent and context
- 5.Generate a customized intelligent response based on message classification
- 6.Send the response back to the user through Telegram
Use cases
- Customer support teams automatically respond to text, voice, and image inquiries from clients
- Process and categorize customer complaints for routing to appropriate departments
- Analyze files and images sent by customers and provide instant information or feedback
- Build a multimodal virtual assistant that answers FAQs across multiple message formats
Requirements
- Active Telegram account with a registered bot
- Valid OpenAI API key with appropriate permissions
- Configured webhook in Telegram connected to n8n infrastructure
- Bot permissions enabled for reading audio files and processing images
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 (39)
Check User & Chat ID
If
Error message
Set
Sticky Note
Sticky Note
Listen for Telegram Events
Webhook
Set Webhook Test URL
HTTP Request
Sticky Note2
Sticky Note
Get Telegram Webhook Info
HTTP Request
Sticky Note5
Sticky Note
Image Schema
Set
Sticky Note3
Sticky Note
Sticky Note1
Sticky Note
gpt-4o-mini
OpenAI
Get Audio File
Set
Get Image
Set
Analyze Image
OpenAI
Transcribe Recording
OpenAI
Sticky Note6
Sticky Note
gpt-4o-mini1
OpenAI
Test Webhook Status
Set
Production Webhook Status
Set
Set Webhook Production URL
HTTP Request
Edit Fields
Set
Audio Task Message
Set
Audio Other Message
Set
Text Task Message
Set
Text Other Message
Set
Image Message
Set
Convert to Image File
Convert To File
Extract from File to Base64
Extract From File
Text Classifier Audio
If
Text Classifier
If
Telegram Token & Webhooks
Set
Get Webhook Status
Set
Validation
Set
Sticky Note4
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
Sticky Note9
Sticky Note
Message Router
Switch