Twilio Integration - Files Receiving
# 🤝help
Hi everyone, I'm integrating Botpress with WhatsApp through Twilio, but it seems that the current Twilio integration doesn't handle file receiving. I'm looking to manage this myself using an Execute Code card. However, my issue is that
is empty when I send a file in WhatsApp, despite Twilio sending all necessary data to Botpress's webhook. The payload sent by Twilio looks like this:
Copy code
  "MediaContentType0": "image/jpeg",
  "NumMedia": 1,
  "MessageType": "image",
  "WaId": "0000000",
  "SmsStatus": "received",
  "Body": "",
  "To": "whatsapp:+000000000",
  "NumSegments": 1,
  "ReferralNumMedia": 0,
  "From": "whatsapp:+0000000",
  "MediaUrl0": "",
  "ApiVersion": "2010-04-01"
So my question is, how can I capture, for example, the
in my code?
Hi, Yes we don't support that currently. However, we support it in the direct integration:
Thank you for the response. The problem with the direct integration is that it uses Meta's Cloud API, and currently, Meta has restrictions for sending/receiving messages from/to Turkey phone numbers. As a result, Botpress's WhatsApp integration is not an option for me, and I have to integrate through Twilio, as they offer On-Promise API for WhatsApp integration. Is there a way to access all the payload that was sent by Twilio in the Execute Code card? Or is there any other solution that could work?
What would you like to do with the image?
Having the image URL, I will make an API request to my server and send the image along with additional user-provided information to the support team via email.
Currently, my setup is pretty simple. I have a "Wait for User Input" card followed by an "Execute Code" card where I try to capture the payload sent by Twilio. But as I mentioned above
event.payload = { "text": "" }
is empty