Last Updated on June 8, 2022
What is Webhooks?
Webhooks are an excellent way of connecting your app with external apps. A Webhook is essentially a POST request sent to a callback URL. In this post, we will see how you can connect chatbots with Webhooks. Connecting your bots with Webhook will help you robust and advanced workflows, where you can exchange data with external apps or your database to perform dynamic actions.
We will be using a chatbot platform that has the capability of building a chatbot and a provision of connecting the chatbot with Webhooks. Kommunicate is one such platform. It has its own chatbot builder – Kompose, which is also capable of supporting Webhooks.
In Kommunicate, Webhooks provide a simple way to allow users to send messages to your web service in return to perform powerful custom actions.
In this guide, I will show you how to connect your Kompose chatbot to webhooks. The webhook URL I will use in this guide is to connect our chatbot is provided by Beeceptor for testing purposes.
You can refer to this link on how to build a chatbot using Kompose if you have not created one yet. refer to the video below:
Steps to Connect Chatbots to Webhooks
Step 1: Create a Webhook Endpoint
Create a Webhook endpoint URL and make sure it is published in a Webhook server.
I generated a mock API endpoint URL using Beeceptor as it provides ready use Webhook, and you can get a response payload. Please make sure the API endpoint should be configured to handle a JSON POST request.
Step 2: Set up Webhooks in Kompose Chatbot
Login to the Kommunicate Dashboard >> Bot Integration >> Kompose >> Select the bot >> Click ⚙️ Settings >> Webhook.
Here you will find the required setting to connect your Webhook URL with Kompose. Enable the Webhook by clicking on the toggle button and paste the endpoint URL in the space given. You can further provide request header values for authentication in the request body.
Now your connection should be ready to go. It should display Webhook settings updated successfully.
Click the save button to keep your changes.
Step 3: Test Your Webhook Connection
Now your Webhook is ready to test. A triggered interaction that has a Webhook should send, as the response, the message from your Webhook.
In this simple manner, you can connect bot to Webhooks, and perform decisive custom actions to make your chatbot more dynamic, robust and user friendly.
At Kommunicate, we are envisioning a world-beating customer support solution to empower the new era of customer support. We would love to have you on board to have a first-hand experience of Kommunicate. You can signup here and start delighting your customers right away.