AI Agents

Telegram messaging agent for text/audio/pictures

39 nodes 217 124 Webhook
Download

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. 1.Receive messages from Telegram via webhook and identify type: text, audio, or image
  2. 2.Convert audio files and images to text using OpenAI transcription and vision
  3. 3.Classify messages and determine appropriate handling using AI models
  4. 4.Generate intelligent responses and send them back through Telegram
  5. 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

Telegram OpenAI If

Details

Trigger Webhook
Nodes 39
Apps 3
Views 217
Downloads 124

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (39)

/

Check User & Chat ID

If

#1

Error message

Set

#2

Sticky Note

Sticky Note

#3

Listen for Telegram Events

Webhook

#4

Set Webhook Test URL

HTTP Request

#5

Sticky Note2

Sticky Note

#6

Get Telegram Webhook Info

HTTP Request

#7

Sticky Note5

Sticky Note

#8

Image Schema

Set

#9

Sticky Note3

Sticky Note

#10

Sticky Note1

Sticky Note

#11

gpt-4o-mini

OpenAI

#12

Get Audio File

Set

#13

Get Image

Set

#14

Analyze Image

OpenAI

#15

Transcribe Recording

OpenAI

#16

Sticky Note6

Sticky Note

#17

gpt-4o-mini1

OpenAI

#18

Test Webhook Status

Set

#19

Production Webhook Status

Set

#20

Set Webhook Production URL

HTTP Request

#21

Edit Fields

Set

#22

Audio Task Message

Set

#23

Audio Other Message

Set

#24

Text Task Message

Set

#25

Text Other Message

Set

#26

Image Message

Set

#27

Convert to Image File

Convert To File

#28

Extract from File to Base64

Extract From File

#29

Text Classifier Audio

If

#30

Text Classifier

If

#31

Telegram Token & Webhooks

Set

#32

Get Webhook Status

Set

#33

Validation

Set

#34

Sticky Note4

Sticky Note

#35

Sticky Note7

Sticky Note

#36

Sticky Note8

Sticky Note

#37

Sticky Note9

Sticky Note

#38

Message Router

Switch

#39