How to Deploy Haptik's Bot on Telegram
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
- Getting Started
- Bot Building
- Conversation Design
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Agent Setup
- Analytics & Reporting
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
Table of ContentsPrerequisites for having a Telegram botHow to set up an Instagram bot?Setting up the Telegram bot with BotFatherCreating a bot on HaptikAdding deployment details on HaptikRegistering webhooks for the botTesting the Telegram bot
Prerequisites for having a Telegram bot
The prerequisites include:
- A registered account on Telegram. Click here to log in.
How to set up an Instagram bot?
The steps for Setup are divided into five different sections:
- Setting up the Telegram bot with BotFather.
- Creating a bot on Haptik.
- Adding deployment details on Haptik.
- Registering webhooks for the bot.
- Testing the Telegram bot.
Setting up the Telegram bot with BotFather
Step 1: Navigate to your Telegram account, search for BotFather and click on it and click on Start to start a conversation, as shown.
Step 3: The BotFather will then ask you to give a name to your bot, followed by a username. After you have entered the username, the bot will be created. You will also receive an API Access Token as shown below, which you will have to copy and store, as you will need this further.
Creating a bot on Haptik
Adding deployment details on Haptik
For configuring Telegram as a channel, you will have to open your Haptik bot, and navigate to Business Manager > Channels > Platform Deployments.
Step 1: Select Telegram from the Platform dropdown, as shown. Also, make the Active toggle on.
- Telegram Base URL: Add https://api.telegram.org/ as Telegram Base URL.
- Telegram Access Token: Add the API Access Token that you received when you made the Telegram bot.
Step 3: After adding the deployment details, make sure you Train your bot.
Registering webhooks for the bot
Now that you are done with most of the integration, the final thing that you need to do is set up Webhooks. After setting up Webhooks, your Haptik bot connected to the Telegram bot will be able to listen to events, as and when they occur on your bot deployed on Telegram. This allows the bot to respond to user queries efficiently and quickly.
In order to register webhooks, you need to follow a few steps:
Step 1: Navigate to the Postman app, run the given command, and make sure you get the response as Webhook was set, as shown in the image.
<Telegram Base URL>/bot<Telegram Access Token>/setWebhook?url=<Callback URL>
Once you are done with this step, your integration is successful, and now you can test the bot.
Testing the Telegram bot
In order to test the Telegram bot, navigate to Telegram and search for the username you had set for your Telegram bot, and click on Start to start a conversation.
Next, you can test your bot with the flows that you have added, and see how the bot responds.
Well, if your bot works as expected, your integration is successful. Congratulations!