Skip to content

Search documentation

Find a guide in the Raileon documentation

Set up a Telegram bot

This guide walks you through putting your Raileon assistant inside Telegram, from scratch. You'll create a bot, copy its token, add it to a group or message it directly, and connect it in your dashboard. No technical knowledge is needed — just follow each step in order.

Coming soon

Channels aren't switched on yet. These guides are published early so you can get familiar with the setup — the steps won't work until channels go live in your dashboard. We'll remove this note the moment they do.

Before you start

  • Have the Telegram app installed on your phone, or open web.telegram.org in your browser and sign in.
  • Be signed in to your Raileon dashboard in another tab — you'll switch to it later.
  • Set aside about ten minutes. You won't need to install anything or write any code.

Step 1 — Create your bot with BotFather

In Telegram, every bot is created through an official Telegram account called BotFather. You'll have a short back-and-forth chat with it, and it will hand you your bot at the end.

1

Open a chat with BotFather

In Telegram, tap the search bar at the top and type BotFather. Open the result named BotFather that has a blue checkmark next to it (the checkmark means it's the official, verified account — don't use a copycat).

2

Start the chat

At the bottom of the BotFather chat, tap the Start button (or type /start and send it). BotFather replies with a list of commands it understands.

3

Send the new-bot command

In the message box, type /newbot and send it.

BotFather replies:

Alright, a new bot. How are we going to call it? Please choose a name for your bot.

4

Choose a display name

Send the name you want people to see — for example, your company name like Acme Support. This is the friendly name shown at the top of chats, and you can change it later.

BotFather replies:

Good. Now let's choose a username for your bot. It must end in bot. Like this, for example: TetrisBot or tetris_bot.

5

Choose a username ending in “bot”

Send a username for the bot. It has to be unique across all of Telegram and must end in the letters bot — for example, acme_support_bot. If the name is already taken, BotFather will say so and ask you to try another one; just send a different name until it accepts one.

When it accepts your username, BotFather replies with a success message that includes a long line called your token (covered in the next step).

Step 2 — Copy your bot token

After your username is accepted, BotFather's message contains a line that looks roughly like this:

123456789:AAH-aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567

That long string is your bot token — the secret key that lets Raileon act as your bot.

  1. Tap (or click) directly on the token in the BotFather message — Telegram copies it for you. On a computer, you can also select the whole line and copy it with Ctrl + C (or Cmd + C on a Mac).
  2. Keep this chat handy in case you need to copy it again.

Treat the token like a password

Anyone who has this token can control your bot. Don't post it in a public chat, screenshot it, or email it around. You'll only ever paste it into your Raileon dashboard. If it's ever exposed, message BotFather, send /revoke, pick your bot, and it will issue a fresh token — then reconnect in Raileon with the new one.

Step 3 — Add the bot where it will work

Your bot needs to be somewhere it can hear messages. There are two ways to use it, and you can do both.

Option A — Message the bot directly (one-to-one)

  1. In Telegram's search bar, type the username you chose (for example, acme_support_bot) and open it.
  2. Tap Start at the bottom (or send any message like hello).

In a direct chat like this, your bot replies to every message you send it.

Option B — Add the bot to a group

  1. Open the group you want the bot in (or create a new group).
  2. Open the group's name at the top to view its info, then choose Add Members.
  3. Search for your bot by its username, select it, and confirm.
  4. Once it's in the group, send one message in that group — for example, hello. This matters: Telegram only shows Raileon the chats your bot has actually seen activity in, so the bot has to receive at least one message before it appears in your dashboard's chat list.

In a group, your bot replies to every message in that group once it's connected and turned on, so add it to groups where that's what you want.

Important: let the bot read group messages

By default, Telegram limits what a bot can see inside groups. If you want your assistant to reply to everyday group messages, you must turn that limit off:

  1. Go back to the BotFather chat.
  2. Send /mybots and tap your bot in the list.
  3. Tap Bot Settings, then Group Privacy.
  4. Tap Turn off. BotFather confirms with “Privacy mode is disabled.”

For this change to take full effect in a group the bot is already in, remove the bot from the group and add it back. If you skip this step, the bot will only see messages in the group that directly mention it or reply to it, and it won't be able to answer general questions. (This setting doesn't affect one-to-one chats — those always work.)

Step 4 — Connect the bot in Raileon

Now switch to your Raileon dashboard.

1

Open the Channels page

In the dashboard, go to Channels. At the top you'll see the heading “Connect a bot.”

2

Choose Telegram as the platform

Find the dropdown labeled Platform and make sure Telegram is selected. (Telegram is already selected by default.)

3

Paste your token

Click the box labeled Bot token — it shows the placeholder “Paste your bot token.” Paste in the token you copied from BotFather in Step 2. The box hides the characters as you paste, like a password field; that's expected.

4

Click Connect

Click the Connect button. Raileon checks the token directly with Telegram to confirm it's valid. When it succeeds, you'll see a confirmation that includes your bot's username (for example, “Connected Telegram bot @acme_support_bot”), and the token box clears itself for safety.

If Raileon says the token is invalid or unauthorized, recheck that you copied the whole line from BotFather with nothing missing, then try again.

Your token is now stored encrypted and kept private to your workspace alone.

Step 5 — Choose which chats the bot serves

Right after connecting, look for the section headed “Channels Telegram can serve.” Raileon asks Telegram which chats your bot has seen and lists them.

  1. While it's checking, you'll briefly see “Finding channels…”
  2. If you see your group or direct chat in the list, you're all set — continue below.
  3. If the list is empty, you'll see: “No chats yet. Add your bot to a group (or message it directly), then try again — Telegram only reveals chats your bot has seen.” This almost always means no message has reached the bot yet. Go back to Telegram and send a message to the bot or in the group (Step 3). Then return to the dashboard, paste your token into the Bot token box again, and click Connect once more — Raileon will re-check Telegram and refresh the list. (The token box was cleared after your first connection, so you'll need to paste it in again; copy it from your BotFather chat if you no longer have it.)

For each chat you want the assistant to handle:

  1. Find the chat in the list. Its name (or, if it has no name, its ID) is shown on the left.
  2. On the right, leave the audience dropdown set to Staff. (There's a “Customer (coming soon)” option — you can select it and it will reply, but it's an early preview with fewer controls, so use Staff for now.)
  3. Click the Add button for that chat. It briefly shows “Adding…” and then the chat moves into your connected list.

Repeat for any other chats you want the bot to serve. A chat that's already set up shows “Added” instead of an Add button.

Step 6 — Confirm it's connected and on

Scroll to the section headed “Connected channels.” Each chat you added appears as its own row:

  • On the left: the platform and chat — for example, “Telegram · 123456789” — with its audience and template below it, like “Staff · operations”.
  • On the right: a status badge reading ACTIVE (in green) and a Pause button.

A green ACTIVE badge means the assistant is live in that chat. If you ever want to stop it temporarily, click Pause — the badge turns to PAUSED and the bot stops replying there without disconnecting. Click Resume to switch it back on.

Step 7 — Test it

With a chat showing ACTIVE, go test it in Telegram:

  • In a direct chat, send the bot any message — for example, “What are your opening hours?” It replies to every message you send it.
  • In a group (with Group Privacy turned off as in Step 3), send a normal message. Once connected and active, the bot replies to every message in that group.

You'll often see a brief “typing…” indicator while the assistant works on your answer — that's normal, it means your message was received and is being handled. Replies always come back under your own brand.

How the Telegram bot decides to reply

In Telegram, your bot replies to every text message in a direct chat and to every text message in any group it's an active member of. It never replies to other bots, and it ignores anything that isn't plain text (photos, stickers, files, and edited messages are skipped for now). If you don't want the bot answering everything in a particular group, Pause that chat from your dashboard or remove the bot from the group.

Troubleshooting

A few common snags and what to do:

  • No chats appear in the list. Telegram only reveals chats your bot has actually seen. Send a message to the bot (or in the group), then paste your token into the Bot token box and click Connect again to refresh the list.
  • The bot ignores group messages. Turn off Group Privacy in BotFather (Step 3), then remove and re-add the bot to the group so the change takes effect.
  • Raileon rejects the token. Recopy the full token line from BotFather with nothing trimmed, and make sure Telegram is selected as the platform before clicking Connect.
  • The bot went quiet after working before. Check the Connected channels list — if the chat shows PAUSED, click Resume.

If you're still stuck, reach the Raileon team and we'll help you get your bot running.