Telegram in a project: connecting a bot

SENSEVER

The official Sensever channel: guides and API documentation for Chat, Requests, Flow, Studio, bots and messaging channels.

읽는 데 3 분

Telegram in a project: connecting a bot

Customers message your company's bot on Telegram, and the requests arrive in Sensever. You reply from Requests, and the customer gets the reply from the bot. Sensever sets up the webhook itself — all you need is the bot token.

What you need

  • A Telegram account.

  • Owner or admin rights in the Sensever project.

Step 1. Create a bot

  1. Open @BotFather in Telegram and send the /newbot command.

  2. Enter the bot's name — customers will see it, for example "Sadovaya Coffee".

  3. Enter the bot's username in Latin letters; it must end in bot, for example sadovaya_coffee_bot.

  4. BotFather sends a token like 1234567890:AA…. Copy all of it.

Already have a bot? It works too: you can find its token in @BotFather → /mybots → the bot → API Token.

Step 2. Connect the bot in Sensever

  1. Projects → the project → "Channels" → the "Messaging channels" block.

  2. On the grey Telegram tile, click "Connect".

  3. Paste the token into the "Bot token" field.

  4. Choose a department or leave "Shared queue".

  5. Click "Connect". The message "Telegram connected" appears, and the tile turns colored.

If the bot already works with another service

Telegram delivers a bot's messages to only one place. If the bot is connected to another service, Sensever shows "This bot already receives messages through another service". Check "Switch this bot from another service to Sensever Chat" and click "Connect" again. The previous service stops receiving this bot's messages.

If someone later connects the bot to another service again, the "Sensever Channels" bot tells you that another service is receiving the bot's messages.

Step 3. Check it

Message the bot from your own account. The message appears in the project's requests, and a Telegram button appears in the widget on your site (if "Show in widget" is checked on the tile).

What is passed

  • From the customer: text, photos, videos, voice messages, files, stickers, location, contacts, message edits, reactions.

  • To the customer: text, edits to your replies, reactions, files. Photos, videos, audio and documents are sent as files, and a document keeps its name. A file larger than 20 MB is sent as a link that is valid for 48 hours.

  • A reply deleted in the request disappears for the customer if it is less than 48 hours old.

  • While an agent is writing a reply, the customer sees "typing…".

  • If the customer replies to a specific message, the request shows it as a reply.

  • Read receipts: Telegram doesn't tell bots whether the customer has read a message, so requests from Telegram have no read marks.

  • Agent reactions: Telegram accepts only its own set of emoji from bots.

Possible errors

Message

What to do

The messenger didn't accept the token

The token wasn't copied in full or was reissued (/revoke in @BotFather). Copy the current token and connect again

This bot is already connected to another project

Remove the bot from that project or create a separate bot

The project already has a bot for this messenger

Remove the current bot with the trash can on the tile and connect the new one

The messenger is rate-limiting requests

Wait a minute and try again

If the customer has blocked the bot, your reply won't reach them — "Not sent" appears below the message, and the channel keeps working for other customers.

General channel settings — department, showing in the widget, button order, notifications — are described in the article "Project messaging channels: messengers in Requests".

댓글

작성자