Telegram messaging agent for text/audio/pictures
Workflow Description
An intelligent Telegram agent that receives and processes text messages, voice recordings, and images using OpenAI models for classification and response generation. It automatically converts audio and image files to text, extracts relevant data, and delivers smart replies to users.
How it works
- 1.Receive messages from Telegram via webhook and identify type: text, audio, or image
- 2.Convert audio files and images to text using OpenAI transcription and vision
- 3.Classify messages and determine appropriate handling using AI models
- 4.Generate intelligent responses and send them back through Telegram
- 5.Extract and store structured data from messages for downstream processing
Use cases
- Automate customer support by handling multi-format inquiries instantly
- Process invoices and documents sent as voice notes or images to extract key information
- Build a conversational chatbot that answers frequent questions in real-time
Requirements
- Active Telegram account with a valid bot token
- OpenAI API key with appropriate permissions
- HTTPS-enabled webhook endpoint to receive Telegram updates
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