Resources/Connect Telegram to Appalix
Tutorial8 min read · All plans

How to Connect Telegram to Appalix

Give your Appalix AI agent a Telegram presence. Anyone who messages your bot on Telegram gets an instant AI response — privately, in groups, or in channels. Setup takes about 10 minutes and requires no code.

What you'll need

  • An Appalix account on any plan
  • A Telegram account (the app or web version)
  • Access to @BotFather on Telegram — Telegram's official bot for creating bots

Step 1 — Create a Telegram Bot with @BotFather

Every Telegram bot is created through @BotFather, Telegram's official bot management bot.

  1. Open Telegram and search for @BotFather, or tap this link: t.me/BotFather.
  2. Send the command: /newbot
  3. BotFather will ask you for a display name — this is the name users see (e.g. Acme Support).
  4. Next, choose a username — must end in bot (e.g. AcmeSupportBot).
  5. BotFather will reply with a bot token. It looks like:
    7412345678:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Copy this token — you'll paste it into Appalix in Step 3.
Keep your bot token private. Anyone with this token can send messages as your bot. Never share it publicly, paste it in a public document, or commit it to a repository.

Step 2 — Create a Telegram Integration in Appalix

  1. In Appalix, go to Integrations in the left sidebar and click Add integration.
  2. Select Telegram as the platform.
  3. Give the integration a name — for example, Telegram Support Bot.
  4. Select the bot you want to power this channel (the AI agent you've configured).
  5. Paste your bot token into the Bot token field.
  6. Leave Webhook secret blank — Appalix auto-generates a secure random secret.
  7. Click Create integration.

Appalix creates the integration and shows you an Edit page. Here you'll find two values you need for the next step:

  • Webhook URL — e.g. https://api.appalix.ai/webhooks/telegram/<your-id>
  • Webhook secret token — the auto-generated secret shown in read-only text

Step 3 — Register the Webhook with Telegram

Telegram needs to know where to send messages. You register your webhook by calling the Telegram Bot API once. You can do this from your browser, a terminal, or any HTTP client.

Option A — Using your browser (easiest)

Paste the following URL into your browser's address bar, replacing the placeholders:

https://api.telegram.org/bot<BOT_TOKEN>/setWebhook?url=<WEBHOOK_URL>&secret_token=<WEBHOOK_SECRET>

Telegram will respond with { "ok": true, "result": true }. That's it — the webhook is live.

Option B — Using curl

curl -X POST \
  "https://api.telegram.org/bot<BOT_TOKEN>/setWebhook" \
  -d 'url=<WEBHOOK_URL>' \
  -d 'secret_token=<WEBHOOK_SECRET>'
Where to find the values:
  • BOT_TOKEN — copied from @BotFather in Step 1
  • WEBHOOK_URL — shown on the Edit integration page in Appalix
  • WEBHOOK_SECRET — shown as Webhook secret token on the Edit integration page

Step 4 — Test the integration

  1. Open Telegram and search for your bot by its username (the one you chose in Step 1).
  2. Tap Start and send any message — for example: "Hi, what can you help me with?"
  3. Your Appalix AI agent should reply within a second or two.
Not getting a response? Check:
  • Your Appalix integration has a bot connected (required for responses)
  • The webhook was registered successfully — Telegram returned "ok": true
  • The bot token in Appalix matches the one from @BotFather exactly
  • The Appalix API is reachable at api.appalix.ai

How it works

When a user sends a message to your Telegram bot:

  1. Telegram POSTs the update to your Appalix webhook URL.
  2. Appalix verifies the secret token, then extracts the message text.
  3. The message is routed to your configured AI agent (with RAG, memory, and lead capture enabled if you've set them up).
  4. The AI reply is sent back to the user via the Telegram sendMessage API.

The entire round-trip typically completes in 1–3 seconds. Appalix acknowledges Telegram's webhook instantly so no retries are triggered.

Using the bot in groups

You can add your Telegram bot to a group or supergroup. By default, bots in groups only receive messages that start with / (commands) or that mention the bot by its username.

To let the bot respond to all messages in a group:

  1. Message @BotFather: /setprivacy
  2. Select your bot and choose Disable.
  3. Remove and re-add the bot to the group for the change to take effect.
Tip: Keep Privacy Mode enabled for private support bots — this means the bot only sees messages directed at it and reduces noise.

Lead capture on Telegram

Lead capture works the same way across all Appalix channels. When a user shares their email address or phone number in the Telegram chat, Appalix automatically extracts it and routes it to your configured CRM (HubSpot, Monday.com, Zapier, etc.).

To enable this, go to Integrations → Edit → CRM integration and choose your CRM provider.

Frequently asked questions

Does this work with Telegram channels (broadcast channels)?

Telegram channel posts trigger the bot only if the bot is an administrator of the channel. The bot can read messages but replying in a channel isn't supported — channels are one-way broadcast tools. For two-way conversations, use private chats or groups.

Can I use the same Telegram bot token on multiple Appalix integrations?

No. Telegram only allows one active webhook per bot token. If you need separate bots for different use cases, create a new bot with @BotFather.

Does Appalix store Telegram message history?

Yes — all conversations are saved to your Appalix dashboard under Conversations. You can review transcripts, search messages, and monitor sentiment just like any other channel.

What if I regenerate the bot token in @BotFather?

The old token is immediately invalidated. Go to your Appalix integration, paste the new token into the Bot token field, save, then re-run the setWebhook call with the new token.

Can the bot handle images, stickers, or voice messages?

Currently Appalix processes text messages only. Non-text updates (photos, stickers, voice, video) are acknowledged but not processed. The user will receive no response for those message types.

✈️

Ready to launch your Telegram bot?

Create a new integration in Appalix, paste your @BotFather token, and register the webhook. Your AI agent will be live on Telegram in under 10 minutes.

Create Telegram integration →
📬

Stay ahead of the curve

Get new guides, case studies, and product updates delivered to your inbox every two weeks.

No spam. Unsubscribe any time.