Telegram integration via your own bot
- Configuring integration
- Processing of personal messages
- Processing group chats
- Processing comments to channel posts
Telegram is a popular instant messaging service that can be integrated with Usedesk to receive your customers' messages.
The integration allows you to receive and respond to messages in the Usedesk chat room. This integration is free.
1. Go to «Extensions» section and make sure that the Telegram extension is enabled.
- Go to Telegram and find the bot named @BotFather;
- Press /start;
- select /newbot;
- think up, and send the name of the bot;
If the bot accepts the name, enter the username. The main thing is to have a bot or _bot at the end of the name;
- @BotFather will send a message with a token of your bot. Copy it.
4. Click on Telegram.
5. Add the previously copied token and press «Save».
6. If your bot is going to be added to groups, it must have rights to messages in the Telegram chat. To do this, in the bot settings in BotFather, in the «Allow groups?» section, allow adding your bot to groups, and in the «Group Privacy» section, turn off privacy mode so that the bot can receive all messages from the group:
Done, the bot is connected! Now you can write to him to test the channel.
You can process requests from Telegram using a bot both in the «Tickets» section and in the «Chat» section. It is more convenient to communicate with clients in a chat — the interface of this section is close to the interface of the messenger, and the «Reply» and «Copy» functions are also available in it.
To reply to any incoming or outgoing chat message, right-click on it and click «Reply»:
To copy a text message, right-click on it and click «Copy»:
- If you don't have a client in your system, it will be created separately,
- The nickname of the group will be pulled into the card of the group chat client.
The «Reply» and «Copy» functions are also available in group chats.
The «Reply» function has one interesting and very convenient feature — you can use it to process comments to posts in your channel directly from the Usedesk.
Setting up discussions in the telegram channel
1. Go to the channel management section in Telegram.
2. Add a group in the «Discussion» section.
3. Create a new group chat. It will be linked to your channel.
4. By default, Telegram will name the group with the name of your channel + add the word «Chat». If necessary, you can change the name and add a description of the chat. Click «Create».
5. After creating a group chat, the posts in the channel will have a «Leave a comment» function.
6. If someone leaves a comment on a post, the number of comments will be displayed under the post.
7. By clicking on the comment bar, you will see the discussion thread of the post.
Connecting the bot to the channel group chat
1. Go to the Telegram group chat management and click on «Add members».
2. In the search bar, enter the name of your bot, click on it and click «Add».
To process comments to posts, be sure to use the «Reply» function. Otherwise, your message from Usedesk will not get into the discussion under the post, but will appear only in the group chat itself.
Usedesk will show which agent responded to the client's comment via the bot. And in Telegram, the bot's name will be displayed above the response. This is what the response to the subscriber's comment looks like in the Telegram interface:
If a message fails to send, it will become an internal comment with a red background. An error message will appear in the upper right corner — it will either explain the cause of the error or offer to write to us in support to resolve the issue. Possible types of errors:
- The message could not be sent. Please write to us at firstname.lastname@example.org;
- The message could not be sent: the bot is blocked.