Integrate ChatBotKit with your Telegram bot to create powerful conversational AI chatbots. Engage effectively with your Telegram audience. Follow the steps to set up your bot on Telegram and integrate it with ChatBotKit.

Integrating ChatBotKit with your Telegram bot allows you to create a powerful conversational AI chatbot that can engage with your Telegram audience effectively. This documentation outlines the steps required to set up your bot on Telegram and integrate it with ChatBotKit.

Features

The ChatBotKit Telegram Integration offers a range of features to help you build and manage conversational experiences on Telegram:

  • Contact Collection: Automatically gather contact details such as name and phone number from users who interact with your bot.
  • Session Duration: Set a custom session window so users can continue the same conversation for a specified period before a new session begins.
  • File Attachments: Enable your bot to automatically process images and other media files shared during conversations.
  • Vision Models: Use vision-capable models to analyze and respond to images sent by users.
  • Allowed Senders: Restrict which Telegram users, groups, or channels can send messages to your integration. Use @username, @numericId, or #chatId patterns - or leave empty to block all and use * to allow everyone.
  • Group Chat Support: Add your bot as an administrator to a Telegram group and interact with it using @botname mentions.
  • Telegram Business: Enable Business Mode in your Telegram bot settings to support Telegram Business conversations.

Prerequisites

Before starting the integration process, ensure you have:

  • A valid Telegram account.
  • Access to ChatBotKit.

Step 1: Creating Your Telegram Bot

  1. Start a Chat with BotFather: BotFather is the official bot on Telegram that allows users to create and manage their bots. To start, search for @BotFather in the Telegram app and initiate a conversation.
  2. Create a New Bot: Type /newbot and send it to BotFather. You'll be prompted to give your bot a name and then a username. The username must end with bot (e.g., example_bot).
  3. Save Your Bot Token: Upon successful creation, BotFather will provide you with a token. This token is essential for integrating your bot with ChatBotKit. Keep it secure and accessible.

Step 2: Integrating Your Telegram Bot with ChatBotKit

  1. Log In to ChatBotKit: Navigate to your ChatBotKit Integrations.
  2. Add Telegram Integration: Click the "New Integration" button and select "Telegram Bot" from the list of available integrations.
  3. Configure Integration Details:
    • Bot Token: Enter the bot token you received from BotFather.
    • Name (Optional): Provide a name for your integration. This is useful for identifying it later, especially if you manage multiple bots.
    • Description (Optional): You can also add a description for your own reference.
  4. Save and Activate Integration: After entering the required details, save the integration. Your Telegram bot is now connected to ChatBotKit but not yet active.
  5. Activate Integration: Click the "Setup" button. This action automatically configures a webhook for your Telegram bot, allowing ChatBotKit to receive messages sent to your bot.

Your Telegram bot is now integrated with ChatBotKit, ready to engage with your audience. Explore ChatBotKit’s features to enhance your bot’s capabilities, such as adding custom responses, integrating with other services, and analyzing user interactions to improve engagement.

FAQ

Can the bot be used in a Group Chat

Yes you can use your telegram agent in a group chat setting. Make sure that you add the bot as administrator to the group. You can interact with the bot by using @botname followed by the specific message.

Does the Telegram integration support Telegram Business?

Yes, the integration supports Telegram Business. To enable this functionality, you need to turn on Business Mode in your Telegram bot settings.