How to Connect n8n to Telegram: Build Bots and Alerts (2025 Guide)

Telegram is the easiest messaging platform to automate — no business verification, no approval queues, and a bot API that's genuinely pleasant to work with. Pair it with n8n and you can build personal alert systems, customer bots, and AI assistants in an afternoon.

Step 1: Create a Telegram bot

Open Telegram, search for @BotFather, send /newbot, and follow the prompts. BotFather hands you an API token that looks like 123456:ABC-DEF.... Keep it secret — anyone with this token controls your bot.

Step 2: Add the credential in n8n

Create a new Telegram credential in n8n and paste the token. That's the entire authentication setup — no OAuth dance required.

Step 3: Send your first message

Add a Telegram node → "Send Message". You'll need a chat ID. To find yours, message your bot once, then call the Telegram Trigger (below) to capture the chat.id from the incoming update. Save it for outbound alerts.

Ready to automate?

Get the n8n Telegram Bot with persistent memory and productivity tools — a real assistant, not just an alert relay.

Get the Template on Gumroad →

Receiving messages: the Telegram Trigger

Add a Telegram Trigger node and select the update types you care about (usually "message"). n8n registers the webhook with Telegram automatically. Now every message users send your bot starts a workflow — with the text, sender, and chat ID available downstream.

Building an AI assistant with memory

The magic is combining Telegram Trigger → AI Agent → Telegram Send. To make it feel like a real assistant, add persistent memory: store the conversation history in a database (Postgres, Redis, or even a Google Sheet) keyed by chat ID, and load it before each AI call. Without memory, your bot forgets everything between messages.

Rich messages: buttons, images, and files

  • Inline keyboards: add buttons users can tap. Great for menus and confirmations.
  • Photos and documents: the Telegram node can send files from a URL or binary data from a previous node.
  • Markdown: set parse mode to Markdown for bold, italics, and code blocks.

Handling voice and images (multimodal)

Telegram bots receive voice notes and photos too. Download the file via the Telegram node, pass audio to Whisper for transcription or images to a vision model, then respond. This is how you build a bot that lets users snap a receipt or send a voice memo and get a structured result back.

Practical first projects

  • Personal alert bot for server errors, sales, or deploys
  • Expense tracker: photo a receipt → structured spreadsheet row
  • Customer FAQ bot backed by your docs (RAG)

Ready to automate? Get this template on Gumroad

This ready-to-import n8n workflow saves you hours of setup. Import it, connect your accounts, and go live.

Get the Template on Gumroad →