WorkflowTelegramOpen

Telegram n8n bot for text, voice and images

This n8n workflow is a Telegram agent that handles text, voice messages and photos, built on a webhook rather than polling. It is for builders who want one bot that transcribes audio and understands images before answering, with tools to set up the webhook included.

What it does

A webhook listens for Telegram events and checks the user and chat ID. A switch routes text, audio and images: audio files are fetched and transcribed, images are fetched and described with gpt-4o-mini against an image schema, and the result goes to the agent for the reply. Helper nodes set a test webhook URL and read webhook info.

How to use it

Set the bot webhook with a GET request to the Bot API using your BotFather token and HTTPS URL, then add OpenAI and Telegram credentials.

More in Telegram and the n8n workflow library.

Full text

Front matter
name: 🤖 Telegram Messaging Agent for Text/Audio/Images
description: Triggered by a webhook. Connects Condition, Convert To File, Extract From File, HTTP request, Switch, Telegram, Webhook. # Receive Telegram Message with Webhook # Telegram Webhook Tools ## Setting your Telegram Bot WebHook the Easy Way # Process Audio # Process Image # How to set up a Telegram Bot WebHook ## WebHook Setup Process **Basic Concept** A WebHook allows your Telegram bot to automatically receive updates instead of manually polling the Bot API. **Setup Method** To set a WebHook, make a GET request using this URL format: ``` {{ $env.WEBHOOK_URL }} ``` Where: - `my_bot_token`: Your bot token from BotF
category: Automation
kind: Workflow
software: Condition|Convert To File|Extract From File|HTTP request|Switch|Telegram|Webhook

🤖 Telegram Messaging Agent for Text/Audio/Images

Triggered by a webhook. Connects Condition, Convert To File, Extract From File, HTTP request, Switch, Telegram, Webhook. # Receive Telegram Message with Webhook # Telegram Webhook Tools

Setting your Telegram Bot WebHook the Easy Way

# Process Audio # Process Image # How to set up a Telegram Bot WebHook

WebHook Setup Process

Basic Concept A WebHook allows your Telegram bot to automatically receive updates instead of manually polling the Bot API.

Setup Method To set a WebHook, make a GET request using this URL format:

{{ $env.WEBHOOK_URL }}

Where:

  • my_bot_token: Your bot token from BotF

Steps

  • Check User & Chat ID (if)
  • Error message (telegram)
  • Sticky Note (stickyNote)
  • Listen for Telegram Events (webhook)
  • Set Webhook Test URL (httpRequest)
  • Sticky Note2 (stickyNote)
  • Get Telegram Webhook Info (httpRequest)
  • Sticky Note5 (stickyNote)
  • Image Schema (set)
  • Sticky Note3 (stickyNote)
  • Sticky Note1 (stickyNote)
  • gpt-4o-mini (noOp)
  • Get Audio File (telegram)
  • Get Image (telegram)
  • Analyze Image (noOp)
  • Transcribe Recording (noOp)
  • Sticky Note6 (stickyNote)
  • gpt-4o-mini1 (noOp)
  • Test Webhook Status (telegram)
  • Production Webhook Status (telegram)
  • Set Webhook Production URL (httpRequest)
  • Edit Fields (set)
  • Audio Task Message (telegram)
  • Audio Other Message (telegram)
  • Text Task Message (telegram)
  • Text Other Message (telegram)
  • Image Message (telegram)
  • Convert to Image File (convertToFile)
  • Extract from File to Base64 (extractFromFile)
  • Text Classifier Audio (noOp)
  • Text Classifier (noOp)
  • Telegram Token & Webhooks (set)
  • Get Webhook Status (telegram)
  • Validation (set)
  • Sticky Note4 (stickyNote)
  • Sticky Note7 (stickyNote)
  • Sticky Note8 (stickyNote)
  • Sticky Note9 (stickyNote)
  • Message Router (switch)

Import

Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).

Source and license

Source: https://github.com/Zie619/n8n-workflows/blob/main/Telegram/1182_Telegram_Webhook_Automation_Webhook.md

Author: Zie619, n8n workflow collection. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.