Skip to main content

Telegram as an inbound channel

To use Telegram as an inbound channel:

  1. Create a bot.
  2. Create an inbound channel.
  3. Test the bot.

Create a bot

Before deploying a chatbot to Telegram, you need to create a Telegram bot.

  1. Open Telegram and enter BotFather in the search bar.
  2. Send the /newbot command to BotFather.
  3. Think of a bot name and send it to BotFather.
    • This name will be displayed in contacts and chats.
  4. Think of a bot username and send it to BotFather.
    • A username is a short name used to mention the bot and displayed in profile links.
    • It may only contain Latin characters, underscores, and numbers.
    • It must end with bot, for example: test_bot or TestBot.
    • It can be from 5 to 32 characters long.
  5. BotFather will send a link to your bot and a token. Copy the token, you will need it when creating a channel in JAICP.
    • A token is a character set like 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw.
tip
If you have lost the token, send the /token command to BotFather. BotFather will generate a new token.

Create a channel

  1. In the JAICP dashboard, click Channels → Inbound → Connect channel.

  2. In the Messengers and social networks section, select Telegram.

  3. Specify the settings:

    • Name is the channel name.
    • Access token is the token that you previously received in the chat with BotFather.
    • Branch is the project branch you want to deploy into the channel (master by default). You can also select a Git tag or enter a specific commit hash.
    • Agent is a customer engagement platform. You can leave this field empty.
    • Deployment is one of the two deployment options:
      • Automatic: when you save the changes into the project.
      • Manual: with the Deploy button in the channel description.
    caution
    You have to deploy a script before starting the bot. At this stage, the system builds the bot, checks the script syntax, and performs tests.
  4. Click Create.

  5. Wait for the pop-up window with the result of the deployment. If it is successful, the chatbot is ready to use.

Test the bot

Open the chat with the bot in Telegram and send it the start command. After that, your chat with the bot should begin.

Telegram payment

You can accept payments from Telegram users for services or goods you provide.