Simple Webhook integration tutorial
# 📖tutorials
f
In this tutorial, we explore the powerful Webhook integration in Botpress, which allows you to send data from external sources to your Botpress bot in real-time. We cover the essential steps to set up the Webhook integration, including creating a new bot, installing the integration, and configuring the necessary settings. We demonstrate how to send data to your Webhook using JavaScript and the Axios library, as well as how to test your Webhook using an HTTP client like Postman or Insomnia. We walk through the process of creating a custom JSON payload and sending it to the Webhook URL. Next, we dive into utilizing the received Webhook data within your Botpress bot. We show you how to create a flow that handles the incoming Webhook events and how to access the data using the event.payload object. We also cover best practices for securing your Webhook using a secret password. Finally, we provide a practical example of storing the received Webhook data in a Botpress table using the Insert Record card. We discuss the importance of using the dedicated Tables API for more efficient data management. Whether you're new to Botpress or looking to enhance your bot's capabilities, this video tutorial will equip you with the knowledge and skills to leverage Webhooks for seamless real-time data integration in your Botpress bot. HTTP POST Request: import axios from "axios"; const options = { method: 'POST', url: 'https://webhook.botpress.cloud/fc028378-76f1-4c51-bc6f-095897e237fe', headers: {'Content-Type': 'application/json'}, data: { email: {sender: 'decay@email.com', content: 'Random email content'}, category: 'Request' } }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); Code used in the Insert Records card: {{event.payload.body.email.sender}} {{event.payload.body.email.content}} {{event.payload.body.category}} Docs: https://botpress.com/docs/cloud/channels/webhook/ YouTube Video:

https://youtu.be/5bvUjAmpLC8

q
Really useful YouTube video! 🦸‍♂️ 🛠️ 🫡 I think now those who have been requesting more instructions for this can start using Botpress Webhooks and, for example, update their Make, Zapier, WhatsApp projects to use this method to see if it works even better 💎
g
Hi, I am trying to discover the event after sending from make.com and nothing will come up still
My webhook just won’t pick it up
f
I am going to be working on a project in school today and tomorrow, but I will need some breaks along the way, where I can probably put together a little tutorial about it
g
Brother get your school work done don’t worry I have 3rd year uni work to do aswell, I’m gna keep trying this make stuff sorted aswell I might send you a dm later or something
But that tutorial would be beautiful so whenever u can bro
357 Views