People write to you on Telegram. Connect a Telegram bot to tufu and it answers them from your docs, with links to
the pages the answer came from. When someone needs a person, /human or the Talk to a human button hands the
chat to your team. You reply from tufu, and your reply arrives in the same Telegram chat.
Telegram is part of the Team plan.
Make a Telegram bot#
The bot is yours: it has the name and picture you give it, and you manage it in Telegram, with @BotFather.
- In Telegram, open @BotFather and send
/newbot. - Pick a name, then a username. Telegram wants the username to end in "bot", for example
loothost_help_bot. - BotFather replies with a token, a long line that starts with numbers and a colon. Copy all of it.
Anyone with the token can control the bot, so keep it to yourself. If it leaks, send /token to @BotFather for a new
one and connect again.
Connect it to tufu#
- In tufu, open Settings → Integrations and press Set up Telegram. You need to be a team admin.
- Pick the tufu bot that answers there, paste the token, and press Connect.
- tufu checks the token with Telegram and shows your bot's @username. Write to it in Telegram to try it.
tufu keeps the token encrypted and never shows it again. Each of your tufu bots can answer as one Telegram bot, and a Telegram bot answers for one tufu bot. To move it, press Disconnect first: Telegram stops sending its messages to tufu, and your conversations stay.
Ask a question#
- In a private chat with your bot, people just write. Every message is a question or a follow-up.
- In a group, add the bot to the group. It answers only when someone mentions it (
@loothost_help_bot how do I restart?), replies to one of its messages, or sends/human. Everything else in the group is left alone. /start, the button people press when they first open your bot, gets the bot's greeting.
Telegram's privacy mode shows a bot only its commands and replies to it in a group, unless the bot is an admin
there. To answer mentions too, make the bot a group admin, or send /setprivacy to @BotFather and turn it off, then
add the bot to the group again. tufu's Telegram page tells you when privacy mode is on.
A long answer comes in several messages, with the sources at the end of the last one. Under the answer:
- Talk to a human hands the chat to your team. It shows when the bot can hand off (you set that in the bot's settings).
- When the bot offers choices, they come as buttons under its message. Press one to pick it.
A conversation keeps going until the chat has been quiet for a day; the next message starts a new one in your inbox. Each reply the bot writes counts toward your plan, the same as a reply in a chat (how many answers).
Hand off to a person#
Someone sends /human, or presses Talk to a human. The bot may also hand off by itself when it can't help, as
on your website.
Your team gets the usual ping, by email or in Slack, from Telegram: @username (or the group's name). The conversation waits in your inbox under Needs you. While a person has it, the bot stays quiet, and what people write goes to your inbox.
Reply from tufu#
Reply from the inbox, from the notification email, or from Slack, as for any handoff. tufu sends your reply to the Telegram chat as Your first name at your team: your reply. You can't reply from Telegram itself.
When you resolve the conversation, or hand it back to the bot, the chat gets a short line saying so.
If the person blocked your bot, or the group is gone, your reply can't be sent. The inbox shows a note on the conversation.
Privacy#
tufu reads only the messages meant for the bot: everything in a private chat with it, and in a group the messages that mention it, reply to it or use its commands. Every other group message is dropped as it arrives, without being stored. For the messages it keeps, tufu stores the text, the Telegram chat and message IDs, the sender's Telegram user ID, and their username (their first name when they have none) or the group's name.
These conversations belong to your team. tufu doesn't train AI models on them. They stay in tufu as long as your team keeps them, even after you disconnect the bot, and they're deleted when you delete your team. Let people know that what they ask the bot reaches your team through tufu.
Troubleshooting#
- The bot doesn't answer in a group: check privacy mode (above), and that people mention the bot or reply to it.
- "Telegram didn't accept that token": copy the token again from @BotFather, the whole line. A token you
replaced with
/tokenstops working. - Nothing happens after connecting: make sure your team is on the Team plan. Disconnect and connect again to reset the connection.