How to receive telephony and SMS events in Telegram

Modified on Wed, 21 May at 3:08 PM

Basic Functionality

The functionality of KOMPaaS integrations allows you to send any events to the Telegram bot using an integration action. It's very easy to set up:

  1. In the 'Integrations' section → 'Marketplace' tab, select the 'Telegram' integration. 

  2. Click on 'Create integration' and click 'Save' in the modal window. 

  3. Click on the created integration and copy the special code that will be automatically generated there. In the same modal window, you can select the Virtual PBX for which you want to receive messages (optional - if not selected, messages will be received for all) and in which cases you need them to be sent. 

  4. Find @kompaas_api_bot and send it the copied code with the '/token' command. Receiving the message 'Authorization passed!' indicates that the bot is working. 

  5. Next, you need to subscribe to the events you're interested in by creating a trigger in the 'Integration triggers' section. For example, we want to receive SMS messages in Telegram that come to our number along with the sender's number.

    1. Create a new trigger, select 'SMS', click 'Next'. 

    2. Now you need to fill in the following data:

      1. Integration action name.

      2. Select the integration (there can be multiple).

      3. Fill in the message - you can use the variables listed below, as well as your own text.

      4. Click 'Save'.

 

Adding the Bot to a Group

The KOMPaaS bot can send notifications to group chats. To make it start sending them, you need to do the following:

  1. Add the bot to the group.

  2. Grant it administrator rights.

  3. After the bot writes 'Your code was not found, check the data', send the code (token) related to the bot you're interested in. You need to get it from the 'Integrations' section → 'Marketplace' tab → 'Telegram'. 


  4. The bot will respond with 'Authorization passed!' when authorization is successful. After that, it will send notifications.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article