Telegram messaging agent for text/audio/pictures
Workflow Description
An intelligent Telegram agent that receives and processes messages in multiple formats—text, audio, and images—using advanced OpenAI models to deliver smart, context-aware responses tailored to each message type.
How it works
- 1.Receive incoming Telegram messages via webhook and identify their type (text, audio, or image)
- 2.Convert audio files and images into processable formats and extract text content from media
- 3.Classify messages and route them to appropriate OpenAI models for intelligent processing and understanding
- 4.Generate customized responses based on the original message content
- 5.Send intelligent replies back to the user through Telegram
Use cases
- Build a smart assistant for a Telegram channel or group that understands user questions in multiple formats
- Automate processing of voice requests and visual queries with instant, reliable responses
- Create an intelligent customer support system that handles text inquiries, voice messages, and product images
Requirements
- An active Telegram account with a valid bot API key
- A valid OpenAI API key to access GPT models
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