Telegram as an inbound channel
To use Telegram as an inbound channel:
Create a bot
Before deploying a chatbot to Telegram, you need to create a Telegram bot.
- Open Telegram and enter
BotFather
in the search bar. - Send the
/newbot
command to BotFather. - Think of a bot name and send it to BotFather.
- This name will be displayed in contacts and chats.
- 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
orTestBot
. - It can be from 5 to 32 characters long.
- 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
.
- A token is a character set like
tip
If you have lost the token, send the
/token
command to BotFather.
BotFather will generate a new token.Create a channel
-
In the JAICP dashboard, click Channels → Inbound → Connect channel.
-
In the Messengers and social networks section, select Telegram.
-
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.
cautionYou have to deploy a script before starting the bot. At this stage, the system builds the bot, checks the script syntax, and performs tests. -
Click Create.
-
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.