📜 ⬆️ ⬇️

How to make Telegram and Telephony even faster

In a recent session, SvyatoslavVasiliev showed how to set up Telegram-notifications of missed calls using the popular IFTTT service and several spells. The concept of “pull the url, and the bot will write to you what is transferred to json payload” I really liked. Prototyping and “on the knee” notifications in a few minutes. And not only about telephony. In exactly the same way, you can make notifications about a “snooze” service, a DDOS attack, or about the release of Hubrastaty to the “best”. IFTTT is a very good thing, but you have to click a lot. If you look at the original article, the number of screenshots is impressive. Under the cut, I'll show you how to do the same thing in just a few teams.

IFTTT is a powerful visual processor that allows you to integrate a variety of services in fancy ways. Pay for such versatility will have multiple clicks. If we are only interested in Telegram, then you can use a highly specialized alternative: the @integram_bot bot (the official website of the service).

We add the bot to ourselves and immediately get the question “What will we integrate?”. Choose a webhook, after which a child bot with a talking name @bullhorn_bot immediately comes to us and shares a Slack-compatible link that can be pulled from anywhere and immediately receive messages from it with the text specified in the request:


With telephony, too, everything is easy. One of the main features of the Voximplant cloud platform is JavaScript running in the cloud. If you use the number rented from Vox, or connect your own, then the issue of notification of a call is solved by calling one method:
')
Net.httpRequest('https://integram.org/ccccccccccc', onComplete, {
headers: 'Content-Type: application/json;charset=utf-8',
method: 'POST',
postData: JSON.stringify({
text: ", !",
}),
});
view raw example.js hosted with ❤ by GitHub

In this simple way, modern technologies allow you to assemble tests in a few minutes and lines of code. Of course, for production it is highly recommended its own Telegram bot backend. But, as you know, you still need to live up to production! And it must be done quickly.

Source: https://habr.com/ru/post/326060/


All Articles