Zapier Put REQUEST to Botpress Webhook Integration...
# 🤝help
b
Hello Guys So i want to send a PUT Request by "Webhooks by Zapier" to the integration "Webhooks" from Botpress. Zapier will fire a PUT request to the custom URL that is generated by the "Webhooks" Integration of Botpress. How can i store the data i receive from Zapier back into workflow variables in Botpress so i can use this in my conversation? I need Botpress to somehow wait for the response of Zapier to then continue when that is complete. Many thanks Miguel
b
Hi man, maybe this helps you

https://youtu.be/8Hh7iE8_WnQ?t=1380

h
const url = "http://yourwebhook.demo/sdkljsdkfsjd" const params = {....} await axios.put(url, params) .then((response) => { if(response.status === 200) { console.log(response) workflow.yourVariable = response.data } }) .catch(function (error) { console.log(error); });
f
I'm currently trying to achieve the same thing. Do you have more detailed instructions how to get the variables to Botpress? Where exactly do you add the code? I'm using make.com and added a http module where I insert the webhook url and in the body the variables I want to pass to Botpress: { name: "{Name}", email: "{email}", phone: "{phone}" }; and got this response: "Bundle 1Collection Status code 200 HeadersArray Cookie headersArray Data {"error":"Request failed with status code 502"} fileSize 47" Is there a better way to send the request to Botpress and when the request is succesful, how can I retrieve the information inside Botpress?
h
This is a basic of JavaScript. https://masteringjs.io/tutorials/axios/then Can you show me your code?
In Make: You need to put this into the Webhook Response and not in HTTP Modul Webhook Request (Trigger) -> Your Logic -> Webhook Response
f
what you mean by Webhook Request (Trigger). I can choose only the webhook reponse and there I can not add the webhook url

https://cdn.discordapp.com/attachments/1134264994494685214/1134487175422034002/Bildschirmfoto_2023-07-28_um_16.06.17.png

h
I wrote you in DM
b
Hello Guys, thank you so much. Everything works now 🙂
b
thanks for the mmessage, but someone could please giveme astep by step way of doiing this? I am very new in here
b
hey @brave-continent-4436. Here is a step by step guide. 1) Create a webhook in make.com thats going to collect you data from an outside datasource (like a google spreadsheet) 2) Catch the webhook in make.com by executing a code block in botpress that sends data to that webhook. 3) whenever the data is found in make.com, create another operation thats going to form the response to the webhook with the newly found data in for example the spreadsheet. 4) The response will get back into botpress as the response from that webhook. You can then use that response and store it into a workflow variable or anything possible within botpress. Hope that helps. Miguel
2 Views