Chatspark
K
K

Telegram

Connect your AI agent to Telegram by creating a Telegram bot through BotFather and pasting your token into ChatSpark. Setup takes about five minutes.

6 min read

Updated September 2026

Overview

The Telegram channel deploys your ChatSpark AI agent as a Telegram bot. Users can find and message your bot directly in Telegram, and the agent responds automatically using your training data. All conversations appear in your ChatSpark dashboard.

Telegram is popular with tech-savvy audiences, developer communities, and users in regions where Telegram is a primary communication app. It also supports groups and channels, making it useful for community-based support.

Plan Requirement
The Telegram channel is available on Pro and Enterprise plans only. Upgrade your plan from Settings before starting this setup.

Prerequisites

You only need a Telegram account to get started. No developer portal or special permissions are required.

Setup Instructions

Step 1: Create a Telegram Bot with BotFather

Telegram bots are created and managed through @BotFather, the official Telegram bot management account.

  1. Open Telegram and search for @BotFather, or open t.me/BotFather
  2. Start a chat with BotFather and send the command /newbot
  3. BotFather will ask for a name for your bot. Enter the display name you want users to see (for example, Acme Support)
  4. BotFather will then ask for a username for the bot. Usernames must end in bot and be unique across Telegram (for example, AcmeSupportBot)
  5. Once the bot is created, BotFather will send you a message containing your Bot Token. Copy it. It looks like this: 1234567890:ABCDefGhiJklMnOpQrStUvWxyz
Keep Your Bot Token Private
Your bot token gives full control over your Telegram bot. Do not share it publicly or commit it to version control. If it is ever compromised, you can generate a new one using the /revoke command in BotFather.

Step 2: Create Your Agent in ChatSpark

  1. Go to AI Agents in your ChatSpark dashboard
  2. Click Create Agent
  3. In the Settings tab, find the AI Agent Type dropdown
  4. Select Telegram

Step 3: Add Your Bot Token

  1. Scroll down in the Settings tab to find the Telegram Integration section
  2. Paste your bot token into the Telegram Bot Token field

Step 4: Train and Save

  1. Add training data on the Training tab so your agent knows how to respond
  2. Click Save to activate the agent

That is all you need to do. ChatSpark automatically registers the webhook with Telegram when you save. Your bot is now live.

Webhook Registration is Automatic
You do not need to set up a webhook manually. When you save your agent, ChatSpark calls the Telegram API to register the webhook for you. Users can start messaging your bot immediately after saving.

Step 5: Test Your Bot

  1. Open Telegram and search for your bot using the username you created in BotFather
  2. Tap Start and send a test message
  3. Your agent should respond based on its training data

How It Works

When a user sends a message to your Telegram bot, Telegram forwards it to ChatSpark through a webhook. ChatSpark processes the message through your agent and sends the response back to the user through the Telegram Bot API. The user sees the reply in their Telegram chat with your bot.

Customizing Your Bot

You can set a description, profile photo, and about text for your bot directly in BotFather using the following commands:

  • /setdescription — Sets the text shown on the bot start screen
  • /setabouttext — Sets the text shown on the bot profile page
  • /setuserpic — Sets the bot profile photo

These are optional but recommended. A well-configured bot profile helps users understand what to expect before they send their first message.

Troubleshooting

Bot token is invalid

Double-check that you copied the full token from BotFather without any extra spaces. The token format is a number, a colon, and then a long alphanumeric string. If the token was shared or compromised, generate a new one in BotFather using /revoke and update the token in ChatSpark.

Bot is not responding to messages

Confirm your agent has training data added and has been saved successfully. Also make sure the token in ChatSpark matches the token BotFather assigned to the bot. If they are out of sync, re-paste the token and save again.

The username I want is already taken

Telegram bot usernames must be unique. Try variations such as adding your company name, region, or a descriptive word. The username only affects how users search for the bot and can be changed later using /setusername in BotFather.

Telegram Support
For questions about BotFather or the Telegram Bot API, visit the Telegram Bot documentation.

Previous

Instagram DMs

Next

Slack