Introduction and first steps to deploying a Telegram Endpoint with Cognigy.AI

This tutorial explains how to connect a virtual agent to Telegram.

Within the Cognigy.AI platform, one is able to connect Cognigy resources to the Telegram channel by using the Webhook Endpoint integration.

Telegram Profiles

Since every Telegram user has their own profile, the included information can be used in a virtual agent in order to provide a more personalized user experience.

Get Profile Data

The Telegram Profile Data exposes a contact's profile information, such as their name and mobile phone number, in your Flow. You can access this profile information in and in your Flow. The table below shows some common information you will find in this object.

Key Description
message.message_id The internal ID of the sent message.
message.from The information object of the Telegram user. The Telegram user's ID.
message.from.is_bot Whether the Telegram sender is a bot or not.
message.from.first_name The configured first name of the Telegram user.
message.from.language_code The configured language of the Telegram user, which could be used in order to switch the locale, for example. The general chat information, which is almost similar to the from object. The ID of the chat, which is the same as the in private chats. The same as message.from.first_name in private chats. The type of chat. Typically, this is set to "private". The timestamp of the sent message.

The Telegram user's text message. It is automatically used as input.text in the Endpoint.

Update Contact Profiles

In order to store the profile information permanently, one could use the UpdateProfile node to do so. However, the Telegram user needs to be asked for acceptance before one is allowed to store personal information. 



Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful