At a glance
- Trigger
- Webhook (Listen for Telegram Events)
- Nodes
- 29
- Apps
- Telegram and OpenAI
- AI nodes
- 6
- Credentials
- 2 types
- Category
- Chatbots and messaging
Apps and integrations
Node types used
How it works
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Telegram Webhook Tools
Setting your Telegram Bot WebHook the Easy Way
Receive Telegram Message with Webhook
Set Webhook for Testing
Set Webhook for Production
Setup notes
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
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
- my_bot_token: Your bot token from BotFather
- url_to_send_updates_to: Your HTTPS endpoint that handles bot updates
Verification To verify the WebHook setup, use
A successful response looks like
This method provides a simple and efficient way to handle Telegram bot updates automatically through webhooks rather than manual polling.
Nodes in this workflow
The 29 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- Check User & Chat ID (If)
- Error message (Telegram)
- Listen for Telegram Events (Webhook)
- Set Webhook Test URL (HTTP Request)
- Get Telegram Webhook Info (HTTP Request)
- Image Schema (Edit Fields (Set))
- gpt-4o-mini (OpenAI Chat Model)
- Get Audio File (Telegram)
- Get Image (Telegram)
- Analyze Image (OpenAI)
- Transcribe Recording (OpenAI)
- gpt-4o-mini1 (OpenAI Chat Model)
- Test Webhook Status (Telegram)
- Production Webhook Status (Telegram)
- Set Webhook Production URL (HTTP Request)
- Edit Fields (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 (Convert to File)
- Extract from File to Base64 (Extract from File)
- Text Classifier Audio (Text Classifier)
- Text Classifier (Text Classifier)
- Telegram Token & Webhooks (Edit Fields (Set))
- Get Webhook Status (Telegram)
- Validation (Edit Fields (Set))
- Message Router (Switch)
Credentials you need
- OpenAI API – used by Analyze Image, Transcribe Recording, gpt-4o-mini and gpt-4o-mini1
- Telegram Bot API – used by Audio Other Message, Audio Task Message, Error message and Get Audio File and others
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.