> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dmly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Telegram

> Connect a Telegram bot to DMLY with a BotFather token so Telegram chats land in your Inbox.

Telegram connects with a bot token instead of a login. You create a bot in Telegram with
@BotFather, paste the token it gives you into DMLY, and every message people send that bot
lands in your [Inbox](/inbox/overview) alongside [WhatsApp](/channels/whatsapp) and your
other channels.

Telegram is a secondary channel for most businesses — WhatsApp stays the one to set up
first — but it is the cheapest channel to add, and it has fewer rules than Meta's.

## Before you start

You need a Telegram account and a bot. Message [@BotFather](https://t.me/BotFather) in
Telegram, follow the prompts to create a bot, and keep the token it sends you. It looks
like `123456:ABC-DEF1234ghIkl…`.

<Warning>
  The bot token is the bot. Anyone holding it can read your Telegram conversations and send
  messages as your business. Don't paste it into a chat, a ticket, or an email. DMLY stores
  it encrypted and never sends it back to your browser — once it's in, you can't read it out
  again. If it ever leaks, ask @BotFather to revoke and reissue the token, then paste the new
  one into DMLY.
</Warning>

## Connect the bot

<Steps>
  <Step title="Open Integrations">
    Go to **Integrations → Channels** and start adding a channel. Scroll the list to
    **Telegram** — *Connect a bot to chat & automate on Telegram*.
  </Step>

  <Step title="Paste the token">
    Put the token from @BotFather in **Bot token**. Add a **Name (optional)** if you want the
    channel labelled something other than the bot's own name — for example `Support bot`.
  </Step>

  <Step title="Connect">
    Select **Connect**. DMLY checks the token with Telegram before saving it. A wrong or
    revoked token is rejected on the spot with an error on the field.
  </Step>
</Steps>

DMLY also registers the bot's webhook with Telegram at this point, which is what makes
messages arrive. If that step doesn't succeed, the bot still connects and the confirmation
message tells you to re-register once your app is on a public HTTPS address. On
`dash.dmly.io` this succeeds normally.

<Note>
  Re-pasting a new token for the **same** bot reconnects the existing channel — your
  conversations, contacts and bot setup stay put, and it doesn't use up another channel
  against your plan. Only a genuinely new bot counts as a new channel.
</Note>

## What you get

<Columns cols={2}>
  <Card title="Unified Inbox" icon="inbox" href="/inbox/overview">
    Telegram chats arrive in the same Inbox as everything else, with assignment, statuses
    and quick replies.
  </Card>

  <Card title="Flows and automations" icon="diagram-project" href="/automation/flow-builder">
    Keyword-matched flows, quick automations and your published bot all run on Telegram.
  </Card>

  <Card title="Broadcasts" icon="bullhorn" href="/broadcasts/overview">
    Telegram supports broadcasts — no message templates and no approval queue, unlike
    WhatsApp.
  </Card>

  <Card title="Growth links" icon="link" href="/growth/overview">
    Growth tools build `t.me/<bot>?start=<ref>` links, and DMLY attributes the contact when
    someone opens the bot through one.
  </Card>
</Columns>

Two things worth knowing that make Telegram easier than Meta channels:

* **No 24-hour messaging window.** Once someone has started your bot, you can message them
  at any time. There is nothing to reopen and no template to get approved.
* **Contacts can share their phone number in one tap.** When someone sends their contact card
  to the bot, DMLY saves the number onto the Contact if the Contact doesn't have one yet —
  and only if the card is their own, not a forwarded third party's.

Telegram has no comments surface, so comment automations don't apply here.

## Set up the bot

Once the channel exists, open **Bot setup** with Telegram as the active channel. It has four
sections — **Welcome**, **Default reply**, **Ice breakers**, **Persistent menu** — plus a
**Live preview** that shows what the chat looks like. Select **Save changes** when you're
done.

### Welcome

Turn on **Send a welcome message when someone taps Start (/start)** and write the
**Message**. Telegram sends this the first time someone opens the chat or taps Start.

### Default reply

This is the one that surprises people: **Default reply works on Telegram and only on
Telegram.** The same section exists on Facebook and Instagram, where nothing reads it. Here
it genuinely fires.

Turn on **Reply automatically when no keyword or flow matches** and write the message — for
example *Thanks for your message! A teammate will reply soon.* Under **Send**, choose:

* **Once per 24 hours per contact** — the default. One auto-reply per person per day, no
  matter how many messages they send.
* **Every time** — every unmatched message gets one.

The message supports merge tokens, so you can greet people by name. It only fires as a last
resort: after opt-out keywords, menu commands, flows and quick automations have all had their
turn, and never for a contact who has paused the bot or opted out.

<Accordion title="What DMLY tries before the default reply">
  Every inbound Telegram message runs through this order, and stops at the first thing that
  handles it:

  1. Opt-out keywords — `/stop`, `stop`, `unsubscribe` or `cancel` sent on their own
  2. A `/start` growth link, for attribution
  3. A persistent-menu `/command`
  4. Your flows — a run the contact is already in, or a published flow whose keyword matches
  5. Quick automations
  6. The welcome message (on a bare `/start`), otherwise the default reply

  So a default reply going out means nothing above it matched. If you're seeing it too often,
  the fix is usually a missing keyword on a flow rather than a default-reply setting.

  Opting out cancels the contact's active flow runs and suppresses automated messages —
  agents can still reply by hand. Sending `/start` or `start` afterwards clears it. Watch out
  for this when writing flows: asking people to reply `CANCEL` opts them out instead.
</Accordion>

### Ice breakers

Ice breakers are suggested questions shown as tappable buttons under the welcome message.
Each one has a **Question** and either a **Text reply** or **Start flow** (then **Choose
flow**). Tapping a button sends its reply or starts the flow.

<Warning>
  Add at most **four** ice breakers. The editor lets you keep adding past that, but saving a
  fifth is rejected and you only get a generic error — your other changes on the page don't
  save either. Keep it to four.
</Warning>

### Persistent menu

On Telegram this is the bot's command list — the ☰ button next to the message box. Turn on
**Show a persistent menu in the conversation** and add your items; each label becomes a
`/command`, and saving pushes the command list to Telegram. Give items short, plain labels,
because that's what people will see as commands.

## Turn it off

Disconnecting the bot from its channel card unregisters the webhook with Telegram and removes
the channel from DMLY. The bot itself still exists in Telegram — delete it with @BotFather if
you want it gone for good.

## When messages don't arrive

Telegram writes a log line for every inbound message, so **Configurations → Logs** is the
fastest way to tell whether Telegram reached DMLY at all.

* **Log rows are there, but nothing in the Inbox** — the message arrived and something
  downstream is the problem. Check the flow or automation that should have handled it.
* **No log rows at all** — Telegram isn't reaching DMLY. Reconnect the bot by pasting the
  token again, which re-registers the webhook. See
  [No inbound messages](/channels/no-inbound-messages).

<Tip>
  Test with a second Telegram account, not the one that owns the bot. Send `/start` and watch
  the conversation appear in your Inbox.
</Tip>
