Telegram Bot

1. Description

It is designed to set up a chat in the Telegram messenger.

Consists of fields (Fig.1):

  1. Name;
  2. URI;
  3. Flow.

Fig. 1. Telegram Bot tab

1.1. Name

Here, you enter the name that will be displayed in the registry of the Chat Gateways page.

1.2. Telegram BOT API Token

To get Telegram BOT API Token, you must create a new bot in Telegram. To create a new bot:

Open the Telegram messenger, log in to your account, or create a new one.

Enter @BotFather in the search field and select a bot (Fig. 2).

Fig. 2. BotFather 

The official Telegram Bot will have a blue confirmation sign next to the name in the form of a checkmark.

Click the Start button to activate the BotFather bot.

In response, you will receive a list of commands for managing bots.

Select or enter and send the /newbot command.

Give the bot a name - clients will see this name when interacting with the bot. And the bot's nickname - you can use it to find the bot in Telegram. The nickname must be unique, not repeat the existing ones in the database, and end with the word "bot".

After you choose a proper name, the bot will be created. You will receive a message with a link to the bot t.me/<bot_nickname>, recommendations for setting up an avatar, a description, and a list of commands for setting up the bot.

As well as the token that needs to be copied (Fig.3).

Fig. 3. BOT API Token

BOT API Token key for an existing bot:

Go to the @BotFather bot and enter the /token command. You will see buttons with created bots. Select the bot you want to connect to.

Copy the value of the token.

Enter the acquired token in the Telegram BOT API Token field.

1.3. URI

The unique URI of the account. Generated automatically and used inside the Webitel system.

1.4. Flow

Here you choose which Flow will be processed when the Chat Gateway is used.

When you click on the Flow field, a drop-down list opens from which the flow is selected. If the required flow is not in the drop-down list, use the Flow field as a search field.

How to create a new Flow can be found here.

2. Opportunities

2.1. Change settings

Goal

Change a Name/Telegram BOT API Token/URI

Preconditions
  1. Access to the Admin application;
  2. Access to the Chat Gateways section in the Admin application;
  3. Permission to create or edit in the Chat gateways section;
  4. Have at least one Chat Gateway for Telegram Bot or create a new one.

Steps


  1. Click on the field you want to change.
  2. Make the necessary changes.
  3. Click the Save button.

Result

Data saved.

2.2. Change a Flow 

Goal

Change a Flow

Preconditions
  1. Access to the Admin application;
  2. Access to the Chat Gateways section in the Admin application;
  3. Permission to create or edit in the Chat gateways section;
  4. Have at least one Chat Gateway for Telegram Bot or create a new one;
  5. Have a Flow.

Steps


  1. Click on the Flow field. A drop-down list opens.
  2. Select the required option from the drop-down list.
  3. Click the Save button.

Result

Data saved