DEV Community

Devashish Datt Mamgain
Devashish Datt Mamgain

Posted on

How to Integrate a Dialogflow bot with Telegram

Telegram has been growing in popularity ever since it was launched close to a decade ago. The app has nearly 540 million users, which is a staggering number. The app offers a powerful alternative to WhatsApp and Facebook Messenger and claims to be more secure than both of these platforms. Speed and security are Telegram’s USPs.

Without further ado, here are the steps to integrate Telegram with Kommunicate.

The integration presented in this blog post will teach you how to:

Create a New Bot for Telegram
Connect a Bot to Kommunicate
How to connect a chatbot to Kommunicate
Open Your Kommunicate Dashboard

Step 1: Click Integrations

Image description

Step 2: Click the Telegram card setting link
Image description

Step 3: Paste the API key into the Telegram integration card from the Kommunicate Dashboard and click the “Save and Integrate” button.

Image description

How to create a new bot for Telegram

Open Telegram messenger, sign in to your account or create a new one.

Step 1: In the search bar, search for @botfather

Image description

 Step 2: Click the Telegram card setting link

Note: official Telegram bots have a blue checkmark beside their name

Step 2: Select the BotFather channel and click /start.

Image description

Click on the “Send” button.

Step 3: Select /newbot – create a new bot.

Image description

Step 4: Add a bot name to call (Kommunicate_Telegrambot) and enter the bot name to display (Kommunicate321_Telegrambot)

Image description
Step 5: Copy the API key that is generated under “Use this token to access the HTTP API”

After creating the Telegram bot, follow the steps to trigger the Dialogflow chatbot.

Image description

Step 1: Click on the link to open the chatbot you created on Telegram

Image description

Step 2: Click on START to initiate a chat, once you click on START, you will send a message to Kommunicate. Next, the Dialogflow chatbot will start answering with the Welcome message you trained on the Dialogflow side.

Make sure you have selected the Dialogflow chatbot on the RULES section of the Kommunicate dashboard. Check here to build and integrate the Dialogflow chatbot if you still need to create one.

Image description

This is how your Kommunicate dashboard will look after the integration is complete:

Image description

You have now created your new bot for Telegram.

Latest comments (0)