Skip to content

Telegram

Telegram is one of the simplest channels to set up. You create a bot through Telegram’s official @BotFather account, copy the token it gives you, and paste it into your config. Talon handles all polling and message delivery from there.

Open Telegram and start a conversation with @BotFather.

Send the command:

/newbot

BotFather will prompt you for:

  • A display name for the bot (this is shown in conversations, e.g. “My Talon Bot”)
  • A username for the bot (must end in bot, e.g. my_talon_bot)

After completing the prompts, BotFather replies with a message containing your bot token:

Done! Congratulations on your new bot. You will find it at t.me/my_talon_bot.
Use this token to access the HTTP API:
1234567890:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Copy the full token string.

Add your bot under channels.telegram.accounts in talon.json:

{
"channels": {
"telegram": {
"accounts": {
"my-bot": {
"bot_token": "1234567890:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
}

Restart Talon and send a message to your bot in Telegram. It will respond immediately.

FieldRequiredDescription
bot_tokenYesThe token provided by @BotFather
allow_fromNoList of Telegram user IDs allowed to message the bot
modelNoOverride the default AI model for this account

To allow only yourself to use the bot, add your Telegram user ID to allow_from. You can find your user ID by messaging @userinfobot.

{
"channels": {
"telegram": {
"accounts": {
"my-bot": {
"bot_token": "1234567890:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"allow_from": ["123456789"]
}
}
}
}
}

Telegram enforces a 4096 character limit per message. Talon automatically splits responses that exceed this limit into multiple sequential messages, so long AI responses are delivered in full without any configuration needed.

You can run multiple Telegram bots simultaneously by adding more entries under accounts:

{
"channels": {
"telegram": {
"accounts": {
"personal-bot": {
"bot_token": "111111111:AAFxxxxxx",
"allow_from": ["123456789"]
},
"team-bot": {
"bot_token": "222222222:AAFyyyyyy",
"allow_from": ["123456789", "987654321"]
}
}
}
}
}