Build a Telegram AI Agent With n8n (No Code)
Build a Telegram AI chatbot with n8n in under an hour. This step-by-step tutorial covers BotFather setup, the Telegram Trigger, the AI Agent node with memory, tool calling, media handling, and production deployment - no code required.
10+ years shipping production ML across TensorFlow, PyTorch, AWS, and GCP. Ships every A8gent agent before it becomes a lesson. GitHub
- Telegram is the easiest messaging channel for AI agents: the Bot API is completely free, there is no business verification, no message templates, and no 24-hour messaging window. You can go from zero to a working bot in under an hour.
- Bot creation takes two minutes with BotFather - send /newbot, pick a name and username, and you get an API token. That token is the only credential n8n needs.
- n8n's Telegram Trigger registers a webhook with Telegram automatically when you activate the workflow, so messages arrive in real time. Your n8n instance must be reachable over HTTPS - n8n Cloud works out of the box, self-hosted needs a public URL or tunnel.
- Use the Telegram chat ID as the session key in Window Buffer Memory so every user gets an isolated conversation history and the agent remembers context across messages.
- Each bot token supports only one active Telegram Trigger workflow at a time - if you need multiple workflows, create separate bots or route everything through one trigger with a Switch node.
- In groups, bots run in privacy mode by default and only see messages that mention or reply to them. Disable it with /setprivacy in BotFather (then re-add the bot to the group) if the agent should see everything.
Why Telegram Is the Easiest Channel for Your First AI Agent
Telegram has over 950 million monthly active users, and its Bot API is the most developer-friendly messaging platform in existence. If you have been eyeing our WhatsApp AI agent tutorial but got stopped by Meta Business verification, phone number provisioning, or template approval queues, Telegram is your fast lane. Everything WhatsApp makes you earn, Telegram gives you for free in two minutes.
The contrast is stark enough to put in a table:
| Requirement | Telegram Bot API | WhatsApp Business API |
|---|---|---|
| Account setup | Chat with BotFather, 2 minutes | Meta Business account + app creation |
| Business verification | None | Required for production (3-7 days) |
| Phone number | Not needed for the bot | Dedicated business number required |
| API cost | Free, unlimited conversations | Free tier, then $0.005-0.08 per conversation |
| Messaging window | None - message users anytime after they start the bot | 24-hour window, then approved templates only |
| Template approval | Not a concept | Meta review, 1-24 hours per template |
| n8n integration | Native Telegram Trigger + Telegram node | Webhook node + manual API calls |
That last row matters more than it looks. n8n ships a dedicated Telegram Trigger node and a Telegram action node with operations for sending messages, photos, documents, chat actions, and more. You never touch the raw HTTP API unless you want to. With WhatsApp you are parsing nested webhook payloads and hand-building POST requests to the Graph API. With Telegram, the plumbing is already done.
What does this unlock in practice? Personal AI assistants you message from your phone, customer support bots for communities, order status bots for e-commerce, internal ops bots that your team queries in a group chat, alert bots that answer follow-up questions instead of just broadcasting. Telegram is also the default channel for crypto, developer, and international communities, so if your audience lives there, an AI agent meets them where they already are.
In this tutorial we will build a complete Telegram AI agent in n8n: BotFather setup, the Telegram Trigger, an AI Agent node with a proper system prompt and per-user memory, a real tool (order status lookup), command and media handling, and production hardening with error handling and cost monitoring. If you have never touched the AI Agent node before, skim our n8n AI Agent tutorial first - this post assumes you know what a node is and how to connect credentials, nothing more.
Prerequisites: What You Need Before Starting
The list is short, which is the point of choosing Telegram:
1. A Telegram account. The free app on your phone or desktop. This is what you use to talk to BotFather and to test your bot. You do not need a second account or a separate number for the bot itself.
2. An n8n instance reachable over HTTPS. The Telegram Trigger works via webhooks: when you activate the workflow, n8n calls Telegram's setWebhook API and tells Telegram where to push updates. That URL must be publicly accessible with valid SSL. n8n Cloud satisfies this out of the box. Self-hosted n8n needs a public domain with HTTPS, or a tunnel like ngrok during development (ngrok http 5678, then set WEBHOOK_URL to the ngrok address and restart n8n). If you are running your whole stack privately, our self-hosted LLM agent stack guide covers reverse proxy and SSL setup in detail.
3. An LLM API key. OpenAI or Anthropic both work with n8n's AI Agent node. For a chat bot, GPT-4o-mini or Claude Haiku are the sensible defaults - fast, cheap, and more than smart enough for tool calling. We will look at exact costs in the production section.
4. Optional: a data source for your tool. We will wire the agent to a Google Sheet acting as an order database. Any HTTP API works equally well - if you already have a backend, you can point an HTTP Request tool at it instead.
Total budget for this build: $0 for Telegram, $0-24/month for n8n depending on hosting, and a few dollars a month in LLM tokens at hobby scale. Compare that with the WhatsApp path and you understand why Telegram is where most people should build their first messaging agent. If you want to sanity-check running costs before you start, plug your expected message volume into our n8n workflow cost calculator.
Creating Your Bot With BotFather (2 Minutes)
Every Telegram bot is created by talking to @BotFather, Telegram's official bot for managing bots. There is no dashboard, no form, no waiting. Here is the exact sequence:
Step 1: Open Telegram, search for @BotFather, and start a chat. Verify it has the blue verification badge - there are impersonators.
Step 2: Send the command:
/newbot
Step 3: BotFather asks for a display name. This is what users see in chats - "Acme Support" is fine, spaces allowed.
Step 4: BotFather asks for a username. This must be 5-32 characters, unique across all of Telegram, and must end in bot - for example acme_support_bot. Users find your bot at t.me/acme_support_bot.
Step 5: BotFather replies with your API token, which looks like this:
7213456789:AAHfGkQxT3vLm9WpZnB2cRdYe4KjUs8VqXo
This token is the bot's entire identity. Anyone who has it controls your bot, so treat it like a password: store it in n8n's credential vault, never paste it into workflow nodes directly, and never commit it anywhere. If it leaks, send /revoke to BotFather to rotate it.
While you are in the BotFather chat, three more commands are worth running now:
/setdescription - the text users see before pressing Start
/setcommands - registers slash commands with autocomplete, e.g.:
start - Start a conversation
help - Show what I can do
order - Check your order status
/setprivacy - controls whether the bot sees all group messages
Registering commands with /setcommands gives users a menu button and autocompletion in the chat, which makes your bot feel finished rather than hacked together. Leave /setprivacy at its default (Enabled) for now - we will come back to it in the groups section, because it is the single most common source of "my bot ignores group messages" confusion.
That is the entire platform setup. No app review, no webhooks to configure by hand, no sandbox numbers. You now have a live bot; it just does not do anything yet. Time to give it a brain.
Wiring the Telegram Trigger in n8n
Create a new workflow in n8n and add the Telegram Trigger node. It asks for a credential: create a new Telegram API credential and paste the token from BotFather. That is the only field.
In the trigger's parameters, select message under "Trigger On". The trigger supports other update types (edited messages, channel posts, callback queries from inline buttons, polls), but plain messages are all we need to start. Callback queries become relevant later if you add inline keyboards.
Here is what happens under the hood, because it explains most debugging you will ever do with this node. The Telegram Bot API offers two delivery modes: long polling (your server repeatedly calls getUpdates) and webhooks (Telegram pushes updates to your HTTPS endpoint). n8n uses webhooks. When you activate the workflow, n8n calls Telegram's setWebhook method with your instance's webhook URL. From then on, every message to your bot arrives as an HTTP POST to n8n within milliseconds. No polling loop, no delay, no wasted executions.
Two consequences of this design:
One trigger per bot. Telegram allows exactly one webhook URL per bot token. If you activate a second workflow with a Telegram Trigger using the same credential, it steals the webhook from the first. If you need multiple behaviors, either create multiple bots via BotFather or use a single trigger workflow that routes with a Switch node into sub-workflows.
Test URL vs production URL. When you click "Listen for test event" in the editor, n8n temporarily registers its test webhook; when the workflow is activated, it registers the production webhook. If your bot suddenly goes quiet after testing, the usual cause is that the workflow was left inactive - activate it and the production webhook is restored.
Send your bot a message ("hello") and inspect the trigger output. The payload is refreshingly flat compared to WhatsApp's four-levels-deep webhook JSON:
{
"update_id": 823401567,
"message": {
"message_id": 42,
"from": {
"id": 5512345678,
"first_name": "Sara",
"username": "sara_k"
},
"chat": {
"id": 5512345678,
"type": "private"
},
"date": 1782739200,
"text": "hello"
}
}
Three fields do all the work in this tutorial: message.text (what the user said), message.chat.id (where to send the reply, and our memory session key), and message.from.first_name (for personalization). Note that chat.id equals the user ID in private chats but is a different negative number in groups - always reply to chat.id, not from.id, or your group bot will answer people in their DMs.
Building the AI Agent: Model, System Prompt, and Memory
Now the core. Add an AI Agent node after the trigger and set the prompt source to a defined expression: {{ $json.message.text }}. The agent node needs three sub-connections: a chat model, memory, and (next section) tools.
Model choice. Attach an OpenAI Chat Model or Anthropic Chat Model node. For a Telegram bot the workload is short conversational turns with occasional tool calls, so start with GPT-4o-mini or Claude Haiku. Both handle tool calling reliably and respond in about a second. Reserve GPT-4o or Claude Sonnet for agents that reason over documents or chain multiple tools - you can always swap the model node later without touching anything else, which is one of the quiet superpowers of the n8n architecture we walk through in our complete guide to building AI agents with n8n.
System prompt. This is where most Telegram bots are won or lost. Telegram is a mobile chat surface: users expect short answers, and the default Markdown parsing has sharp edges (an unmatched asterisk in the LLM output can make sendMessage fail outright). Bake all of that into the prompt:
You are Ada, the support assistant for Acme Store, talking to
customers on Telegram.
Rules:
- Keep replies under 80 words. Use short lines and line breaks,
never long paragraphs.
- Plain text only. No Markdown, no asterisks, no headers.
Emojis are fine, sparingly.
- You can check order status with the lookupOrder tool. Always
ask for the order number if the user has not given one.
- Never invent order details. If the tool returns nothing, say
the order was not found and ask them to double-check the number.
- If the user is upset or asks for a human, tell them you are
connecting them to the team and end with the exact token
HANDOFF_REQUIRED.
- The user's first name is {{ $json.message.from.first_name }}.
Greet them by name on the first message only.
Memory. Attach a Window Buffer Memory (Simple Memory) node to the agent's memory slot. Set the session ID to a custom key: {{ $json.message.chat.id }}. This one expression gives every user (and every group) an isolated conversation history, so the agent remembers that Sara already gave her order number two messages ago, while Tom's chat stays completely separate. Set the context window length to 10 messages - Telegram conversations are transactional, and a bigger window mostly buys you higher token bills. One caveat: buffer memory lives in the n8n instance's memory, so it resets on restart. For persistent history across deploys, swap in Postgres Chat Memory with the same session key - the pattern is identical to the one in our n8n chatbot with AI Agent guide.
Sending the reply. Add a Telegram node after the agent with the operation Send Message. Chat ID: {{ $('Telegram Trigger').item.json.message.chat.id }}. Text: {{ $json.output }}. In the node's additional fields, set Parse Mode to "None" - combined with the plain-text instruction in the system prompt, this eliminates the entire class of Markdown parsing errors. Also enable Reply to Message with the original message ID if the bot will live in groups, so replies thread visibly under the question.
Activate the workflow and message your bot. You should get a coherent, named, context-aware reply in one to two seconds. That is a working Telegram AI chatbot with no code - four nodes on a canvas. Everything from here is making it genuinely useful.
Giving the Agent a Real Tool: Order Status Lookup
A chatbot that only chats is a toy. The difference between a language model and an agent is tools: the ability to fetch real data and take real actions mid-conversation. Let us wire up the order lookup the system prompt already promised.
Option A: Google Sheets tool (fastest to demo). Create a sheet named "Orders" with columns order_id, customer_name, status, carrier, eta. Attach a Google Sheets Tool to the AI Agent's tool slot, operation "Get Row(s)", with a filter on order_id set to "Defined by AI" (the fromAI expression). Name the tool lookupOrder and give it a description the model can reason about: "Looks up a customer order by order ID. Returns status, carrier, and estimated delivery date." The agent now decides on its own when to call it: user asks "where is my order 10482", the model extracts "10482", calls the tool, gets the row back, and composes a natural-language answer. The full pattern, including write-backs and error rows, is covered in our n8n AI agent with Google Sheets tutorial.
Option B: HTTP Request tool (for real backends). Attach an HTTP Request Tool instead, pointed at your API:
Method: GET
URL: https://api.acmestore.com/v1/orders/{orderId}
Placeholder definitions:
orderId - "The customer's order number, digits only"
Headers:
Authorization: Bearer {{ your credential }}
The model fills the {orderId} placeholder from conversation context. A typical tool response the agent will see:
{
"order_id": "10482",
"status": "in_transit",
"carrier": "DHL",
"tracking": "JD014600003RS",
"eta": "2026-07-03"
}
and a typical final answer: "Good news Sara - order 10482 shipped with DHL and should arrive by July 3. Tracking: JD014600003RS."
Two rules keep tool-equipped agents reliable. First, one tool, one job: a lookupOrder tool and a createTicket tool beat one mega-tool with a mode parameter, because the model picks between clearly-named options far more accurately than it fills obscure parameters. Second, tell the prompt what the tools cannot do: "You can look up orders but you cannot modify or cancel them - for changes, hand off to the team." Models fail most embarrassingly when they promise actions they have no tool for.
From here you can keep stacking tools: a Gmail tool to send receipts, a Calendar tool to book calls, a vector store tool for documentation questions. If the bot's main job is answering questions from a knowledge base, the right architecture is retrieval rather than a pile of lookups - see our n8n RAG agent guide for that build. And if you are constructing a full support operation with escalation, tagging, and CSAT logging, the customer support agent with n8n guide extends everything in this section.
Commands, Media, and the Typing Indicator
Three upgrades separate a demo bot from one that feels professionally built.
Slash commands. Telegram users expect /start and /help to work, and Telegram sends them as ordinary message text. Add a Switch node right after the trigger with rules on {{ $json.message.text }}: starts with /start goes to a static welcome branch (a plain Telegram Send Message node - no reason to spend LLM tokens on a canned greeting), starts with /help goes to a static capabilities message, everything else falls through to the AI Agent. This also protects you from the classic mistake of feeding /start into the agent, which produces a confused model wondering why the user said "slash start".
The typing indicator. LLM plus tool call can take three to eight seconds, and a silent bot feels dead. Telegram's sendChatAction method shows "typing..." at the top of the chat. In n8n, add a Telegram node with operation Send Chat Action (action: typing) between the Switch and the AI Agent. The indicator lasts about five seconds or until your message arrives, whichever comes first. This is a one-node change that measurably improves how responsive the bot feels, and it is much simpler than the acknowledgment-message workaround needed on WhatsApp.
Incoming media. Users will send photos of broken products and voice notes describing problems. Telegram's flow: the message contains a file_id, and the trigger node has a "Download" toggle that fetches the binary for you (for photos, it grabs the largest resolution automatically). Route by type with a Switch on which field exists:
message.text exists -> AI Agent (text path)
message.photo exists -> vision path
message.voice exists -> transcription path
anything else -> polite "I handle text, photos and
voice notes" fallback
On the vision path, pass the downloaded image to a vision-capable model (GPT-4o and Claude both accept images) with a task prompt like "Describe the product issue in this photo in one sentence", then feed that description into the main agent as context. On the voice path, send the audio binary to OpenAI's Whisper endpoint (POST https://api.openai.com/v1/audio/transcriptions) via an HTTP Request node, and pipe the transcript into the agent exactly as if the user had typed it. Telegram voice notes arrive as OGG/Opus, which Whisper accepts directly - no conversion step, unlike some other platforms.
Outgoing media is even easier: the Telegram node has first-class Send Photo, Send Document, and Send Audio operations that accept a URL or binary data. An order-status reply that attaches the shipping label PDF is a five-minute addition. For richer interactions, the Send Message operation supports inline keyboards - tappable buttons under the message ("Track package", "Talk to a human") that come back as callback queries, giving you unambiguous user intent without any parsing.
Groups vs DMs: Privacy Mode Explained
Everything so far works in one-to-one chats. Add the bot to a group and behavior changes in ways that generate a disproportionate share of support questions, so here is the full picture.
By default, every bot created through BotFather runs in privacy mode. In a group, a privacy-mode bot only receives: messages that start with a slash command targeting it (like /help@acme_support_bot), messages that @-mention it, and replies to its own messages. Ordinary group chatter never reaches your n8n workflow at all. This is not a bug and not an n8n limitation - it is Telegram's deliberate privacy design, and for most support bots it is exactly what you want, since the bot should respond when addressed, not eavesdrop.
If your use case genuinely needs every message (a moderation agent, a group summarizer, a sentiment monitor), you have two options. Send /setprivacy to BotFather and choose Disable, then remove and re-add the bot to each group - Telegram only applies the change on re-join, and skipping this step is the number one reason people think the setting "did not work". Alternatively, promote the bot to group admin; admin bots receive all messages regardless of the privacy setting.
Group behavior also needs prompt and workflow adjustments:
Session scoping. Because we keyed memory on chat.id, a group shares one conversation history among all members. Usually fine. If you want per-user memory inside a group, change the session key to {{ $json.message.chat.id }}-{{ $json.message.from.id }}.
Reply threading. Always set Reply to Message ID in group replies so it is obvious which question the bot is answering.
Mention stripping. In groups, the trigger text will contain @acme_support_bot. Strip it before the agent sees it with a Set node: {{ $json.message.text.replace('@acme_support_bot', '').trim() }}, otherwise the model occasionally addresses the bot's own username in its reply.
Rate limits. Telegram allows roughly 30 messages per second per bot globally, about one message per second per private chat, and 20 messages per minute per group. The group limit is the one that bites: a chatty agent in a busy group will hit it. Keep group replies consolidated (one message, not three), and if you broadcast to many chats, space sends with a Wait node. When you do exceed a limit, Telegram returns HTTP 429 with a retry_after value - which brings us to error handling.
Going to Production: Errors, Monitoring, and Cost
A bot that works in testing needs three additions before you point real users at it.
Error handling. Create a separate error workflow: an Error Trigger node feeding a Telegram Send Message to your own chat ID (message yourself from the bot once and read the chat ID from the execution log). Set it as the error workflow in your main workflow's settings. Now every failed execution - expired LLM key, tool API down, malformed output - pings your phone within seconds instead of rotting silently in the execution log. Inside the workflow, set the LLM and tool nodes to "Continue (using error output)" and route the error branch to a graceful fallback message ("Sorry, I hit a snag - try again in a minute"), because the worst production behavior is a bot that reads the message, shows typing, and then says nothing. For 429s from Telegram itself, enable Retry on Fail on the send node with a 2-second wait; that absorbs the common transient cases.
Monitoring. Log every turn - append timestamp, chat ID, user message, agent reply, tools called, and latency to a Google Sheet or Postgres table as the last node in the workflow. Then a scheduled weekly workflow can compute conversation volume, handoff rate (count of HANDOFF_REQUIRED), and top question categories, and post the digest to your own Telegram chat. Using the bot to report on the bot costs nothing and needs no extra infrastructure. Target under 3 seconds median response for text turns; when latency creeps up, the culprit is nearly always the model tier or an oversized memory window.
Cost. Telegram's share of the bill is exactly zero, so the running cost is LLM tokens plus hosting. Realistic numbers for a support-style agent (roughly 700 input tokens with system prompt, memory, and tool schemas, 150 output tokens, 1.5 model calls per turn including tool round-trips):
| Model | Cost per message | 1,000 msgs/mo | 10,000 msgs/mo | 100,000 msgs/mo |
|---|---|---|---|---|
| GPT-4o-mini | ~$0.0003 | ~$0.30 | ~$3 | ~$30 |
| Claude Haiku | ~$0.002 | ~$2 | ~$20 | ~$200 |
| GPT-4o | ~$0.004 | ~$4 | ~$40 | ~$400 |
| Claude Sonnet | ~$0.006 | ~$6 | ~$60 | ~$600 |
Add n8n hosting: $24/month on n8n Cloud Starter, or $5-10/month for a small VPS if you self-host. In other words, a Telegram AI agent handling 10,000 customer messages a month runs on mini-tier models for less than the cost of one hour of human support. Model your own volumes with the workflow cost calculator, and if you are debating cloud versus self-hosted for privacy or cost reasons, the trade-offs are laid out in our self-hosted stack guide.
Deployment checklist: workflow active (not just tested), production webhook registered (message the bot after activating to confirm), error workflow attached, bot token stored as a credential and nowhere else, /setcommands registered, logging node in place, and - if self-hosting - EXECUTIONS_MODE=queue with Redis once you pass a few thousand messages a day so concurrent webhooks queue instead of colliding.
Common Problems and How to Fix Them
The bot receives nothing. Ninety percent of the time the workflow is not activated - test mode webhooks are temporary. Activate it, send a fresh message, check the executions list. If still nothing on self-hosted n8n, your instance is not reachable over public HTTPS or WEBHOOK_URL is unset. You can verify what Telegram thinks by opening https://api.telegram.org/bot<TOKEN>/getWebhookInfo in a browser: it shows the registered URL and, crucially, last_error_message if deliveries are failing.
The bot worked, then silently stopped. Almost always a second workflow (or another tool - a testing script, a previous platform) called setWebhook or getUpdates with the same token and stole delivery. One bot token, one consumer. Deactivate the imposter, re-activate your n8n workflow, done.
"Bad Request: can't parse entities" when sending. The LLM emitted Markdown that Telegram's parser rejects (an odd number of asterisks or underscores). Fix at both ends: Parse Mode "None" on the send node, and the plain-text rule in the system prompt.
The agent forgets everything between messages. The memory session ID is missing or static. It must be an expression resolving to the chat ID, not a hard-coded string - a fixed key merges every user on Earth into one shared conversation, which produces genuinely surreal support transcripts. Also remember buffer memory clears on n8n restart; use Postgres memory if that matters.
The bot ignores group messages. Privacy mode, as covered above. Either mention the bot, disable privacy via /setprivacy and re-add it to the group, or make it an admin.
Replies land in the wrong place. You replied to from.id instead of chat.id. In private chats they are identical so the bug hides; in groups they diverge and the bot starts DMing people who asked questions publicly.
429 Too Many Requests. You hit the per-chat or per-group send limits, usually by sending multiple messages per turn in a group. Consolidate replies, add Retry on Fail with backoff, and space bulk sends with a Wait node.
Tool calls never fire. The model does not know when to use the tool. Sharpen the tool description (it is a prompt, not a label), name tools as verbs (lookupOrder, not sheet1), and state in the system prompt exactly when each tool applies. If the model still freelances answers, upgrade one model tier - tool-calling reliability is the first thing cheaper models sacrifice.
Next Steps: From Working Bot to Production Agent System
You now have the full recipe: a free bot from BotFather, real-time delivery through the Telegram Trigger, an AI Agent with per-chat memory and real tools, media and command handling, and a production setup with error alerts and a cost model that rounds to pocket change. The same architecture scales from a personal assistant to a support channel handling tens of thousands of conversations - the nodes do not change, only the tools and the monitoring around them.
Where to go from here depends on what you are building:
Extend this bot. Add a RAG pipeline so it answers from your docs (n8n RAG agent guide), wire it into your support stack with escalation and ticket creation (customer support agent guide), or clone the workflow onto WhatsApp for the customers who live there (WhatsApp AI agent tutorial) - having read this post, you will appreciate exactly which parts Meta makes harder.
Skip the blank canvas. Our n8n AI agent templates include a ready-to-import Telegram agent with the trigger, agent, memory, tool slots, and error workflow pre-wired - import, add your two credentials, activate.
Learn the craft properly. The n8n AI Agents course goes from this tutorial's level to multi-agent systems, evaluation, and client-ready deployments, with the Telegram and WhatsApp builds as graded projects.
Have us build it. If you need a production Telegram agent for your business and would rather ship next week than learn n8n this month, work with us - we scope, build, and hand over documented workflows your team can maintain.
Whichever route you take, build the Telegram version first. It is the cheapest, fastest feedback loop in messaging automation, and every hour you invest transfers directly to every other channel you add later.
FAQ
Is the Telegram Bot API really free?
Yes, completely. There are no API fees, no per-conversation charges, no tiers, and no message volume billing at any scale. Your only running costs are LLM tokens and n8n hosting. This is the biggest practical difference from the WhatsApp Business API, which charges per conversation after the free tier.
Do I need to write any code to build this?
No. The entire build uses n8n's visual nodes: Telegram Trigger, Switch, AI Agent, memory, tool nodes, and Telegram Send Message. The only text you write is the system prompt and node expressions like the chat ID mapping. Optional extras like a Code node for custom formatting exist but are never required.
Does my n8n instance need a public URL?
Yes, for production. The Telegram Trigger works via webhooks, so Telegram must be able to reach your instance over HTTPS. n8n Cloud handles this automatically. For self-hosted n8n, use a domain with SSL behind a reverse proxy, or ngrok during development. Pure polling is not how the n8n trigger operates.
Can one Telegram bot run multiple n8n workflows?
Not directly - Telegram permits one webhook per bot token, so only one active Telegram Trigger workflow per bot. Either create multiple bots via BotFather (one per workflow) or use a single trigger workflow with a Switch node that routes commands and message types into Execute Workflow sub-workflows.
Why does my bot ignore messages in group chats?
Privacy mode, which is on by default. In groups, the bot only receives commands, @-mentions, and replies to its own messages. Send /setprivacy to BotFather and disable it, then remove and re-add the bot to the group for the change to apply - or promote the bot to group admin, which also grants it all messages.
Which LLM should I use for a Telegram bot?
Start with GPT-4o-mini or Claude Haiku. Telegram turns are short and conversational, and both models handle tool calling well at roughly $0.30-2 per thousand messages. Upgrade to GPT-4o or Claude Sonnet only if the agent chains multiple tools or reasons over documents, and swap is trivial - just replace the chat model node.
Can the bot message users first, or only reply?
It can message any user who has pressed Start on the bot at least once, at any time, with no template approval and no 24-hour window. Users who have never started the bot cannot be contacted - Telegram blocks unsolicited bot messages entirely, which is why there is no bot spam problem on the platform.
How is this different from building the same agent on WhatsApp?
The AI Agent, memory, and tool layers are identical - only the channel layer changes. WhatsApp adds Meta Business verification, a dedicated phone number, per-conversation pricing, template approval for outbound messages, and a 24-hour reply window. Build and refine the agent on Telegram first, then port it; our WhatsApp tutorial covers the extra steps.
