Empty Webhook Response Data Obj
# 🤝help
p
Hi guys, I'm successfully sending a webhook message to botpress from my twilio server via the webhook integration, and receive a response back from my bot. But there is an empty data object in the response? What works: 1. Getting or making the conversation and id(https://discord.com/channels/1108396290624213082/1222855520524701777) 2. sending axios post request to webhook integration url. 3. botpress triggered via the webhook trigger card and processes the text. 4. in botpress logs i see a response from my bot sending back (attached: BP_logs) 5. back on the server (where i send the webhook originally from) i get the response from botpress webhook, but it has an empty data object? (attached: No_Data_Obj) What I'm expecting: The bots response has the "Text" response inside the data object in the webhook response. My guesses: - Am i suppose to set a more patient timeout for the webhook? - Do i need to specify a different method for botpress to return the response via? Are webhook data responses not possible? https://cdn.discordapp.com/attachments/1226373037671190608/1226373038287618068/BP_logs.png?ex=662487e5&is=661212e5&hm=43ba33db0ac9a03d67794aebbfb0b7a35504e15322bfe7a8b0724617ae6c1b5d& https://cdn.discordapp.com/attachments/1226373037671190608/1226373038690406440/No_Data_Obj.png?ex=662487e5&is=661212e5&hm=7d9df7eee49a4e24652538e5b6d197d9a32d90f69318f990285978f269635c42&
f
Can you attach another screenshot of how your flow looks, and a screenshot of how you are sending the data back?
r
@proud-beach-98934 webhook responses are not yet supported, but it's something we're considering. Would you mind sharing your use-case for this? BTW we have the Twilio integration, in case you're looking for using Twilio to connect over SMS with customers https://app.botpress.cloud/hub/integrations/22b3717a-bc88-42b1-a4f8-eca229746093
@rich-battery-69172 Ah, that would be really nice. The use case is customer SMS or Voice interaction direct with botpress via Twilio. Here is the usecase overall design: 1. Customer SMS or Call to my Twilio business number 2. initiates Twilio IVR studio flow 3. In IVR flow a twilio "Services function" is called to handle sms or voice input from users phone. A twilio function is code that runs on their server 4. In this function i do an api call to botpress to get-or-create conversation based on customers cell number 5. use that conversation and users sms or voice input to post it via axios to the webhook integration url to send message to botpress, but i currently get no data in the successful response. 6. response would have botpress response text, twilio provides a framework to respond the botpress text response to users cell as either a sms or AI voice response. 7. User then responds with another query or ends call 8. if another sms or voice query we start again at step 3
With code that initiates from my Twilio services function, what are some possible ideas to receive the botpress response data? Could i use the webchat (botpress) api integration instead of webhook integration?
Is this where make.com that everyone talks about comes into play for me haha?
r
@proud-beach-98934 thanks that's super clear and helpful! Would using the Twilio Botpress direct integration be possible instead of using Twilio IVR studio? I'm assuming the reason to use this is because of voice support? another option would be to use the Botpress Chat API integration, which supports responses using websocket. I can show you how to use this
p
Correct id like to try voice! I took a shot at the Twilio integration, but i couldnt figure it out. I found the docs for the twilio integration to be very short and not clear. https://botpress.com/docs/cloud/channels/twilio/ Did not find much talk online about it
Botpress Chat API integration sounds hopeful
Botpress Chat API integration is different than the webchat integration by botpresss?
r
Yes, it's meant to implement custom chat interfaces like mobile apps etc, but can also be used for your use-case
p
f
Following 🙂
r
The integration is in beta so we'll have to grant you access before 🙂 let me check with my team for options, i can get back to you tomorrow?
p
Ouuuuu
Darn this sounds fun
Yup tomorrow works! Thanks 🙂
Is the recently released Messaging API integration the same thing as what @rich-battery-69172 mentioned earlier as the Botpress Chat API?
f
I think so, but I am honestly not sure. It would make sense
r
@proud-beach-98934 I checked with the team and the new webchat API would actually slve this use-case!
npm i @botpress/webchat
The documentation is still pending, i'll get back to you next week with the full docs on how to implement it with the webchat api
p
Cool thanks, I'll create a guide for whatever I end up building with it
59 Views