https://discord.gg/botpress logo
#👀feature-requests
Ability to Process Contacts & Locations from Meta WhatsApp
# 👀feature-requests
a

astonishing-accountant-44048

05/30/2023, 9:29 AM
When I'm in a flow and I respond to my bot with a Contact or a Location, this isn't picked up by the flow ("Waiting for user input" is still displayed). Can we stream these special event types from Meta to Botpress since they are text (JSON-formatted representations)?
c

calm-park-34551

05/30/2023, 9:39 AM
you can send the botpress an object type. But from external api, from conversation I don't know...
example: data = { city: "Madrid", state: "España", street: "c/cuesta", number: 25, }; param = { "type":"object", "name":data, };
In botpress you capture the parameters:
Copy code
{
  "type": "session",
  "name": "city",
  "value": "{{event.payload.name.city}}"
}
a

acceptable-gold-88171

05/30/2023, 1:38 PM
Great question @astonishing-accountant-44048 and thanks for responding @calm-park-34551 . I'll ask around and get back to you (I want to confirm if there is a working solution right now)!
r

rich-battery-69172

05/30/2023, 2:07 PM
@colossal-egg-20510 @acceptable-gold-88171 i think that's on the integrations side, as we're open-sourcing them people will be able to add events we miss
c

colossal-egg-20510

05/30/2023, 5:39 PM
Yes, that's new events / actions that can be added to integrations once we release them publicly. 🎉
a

acceptable-gold-88171

05/31/2023, 1:55 PM
Once the integrations are up and running, the plan is to add special nodes in the Studio that can catch these events and redirect the user to the right location.
i

incalculable-bird-83091

11/28/2023, 8:41 PM
Greetings Team, What is the recommended route for me to pursue when I need my bot to receive currently non-supported response types from whatsapp like {images, audio, etc} https://botpress.com/docs/cloud/channels/whatsapp/#from-whatsapp-to-botpress
e

early-train-33247

12/01/2023, 12:52 AM
Hey @incalculable-bird-83091 I think it's just not possible at the moment...
@famous-zoo-73118 or @colossal-egg-20510 are there any suggestions?
f

famous-zoo-73118

12/01/2023, 10:49 PM
Yes, not possible at the moment, but it's in our roadmap to add support for more Whatsapp message types
f

fresh-article-37001

01/01/2024, 12:31 PM
@early-train-33247 @famous-zoo-73118 Is it possible for me to just extract the whatsapp image id from the incoming image? I can do the rest of the work in my server-side to fetch the actual image. Currently when a user sends a message, botpress doesn't handle it and ignores it and shows that messages otf type image are unhandled in the logs.
I am using the event.payload to try and extract the id but it doesn't work because the event isn't being handled at all and is ignored. So if I send an image the conversation doesn't change, the next card isn't executed until I send something else.
So what I am asking is if it is possible to allow us to manipulate the event payload of the image from whatsapp and treat it as a normal message. This simple tweak would allow me to take images as input and I am willing to make a tutorial on it aswell if this tweak is made.
@rich-battery-69172 @colossal-egg-20510
And same goes for other document types like pdfs... If botpress can treat them as a normal message I will be able to handle all message types by extracting the id of the message and using the Facebook Graph API to fetch the image in my server-side.
e

early-train-33247

01/04/2024, 8:07 PM
Hey @fresh-article-37001, the detailed info is much appreciated!!
Unfortunately there is no workaround at the moment, but Processing media messages is in our backlog already!
If you are feeling scientific, you could try the following: - Create a Before Incoming Message hook that checks if the current integration is whatsapp and if there is an image in the payload. If there is, it saves the image id to a variable
- Then structure your flow like this
But I'm not sure whether sending an Image will make the bot proceed from the "Waiting for User input" card (which could be a regular Capture card) to the expression below. Let me know what you find
f

fresh-article-37001

01/04/2024, 9:16 PM
Thanks for the suggestion Guilhermy, but it still doesn't work. With message types such as text and button clicks, the middleware is being executed properly and is printing out to the console as well (A thing I added to see if it's being executed). But when I use message types such as images, the middleware is not executed. You're solution seemed perfect and it felt so close to being able to extract the whatsapp image id. Any help would be appreciated. I am willing to try the craziest workarounds to make this work.
f

famous-zoo-73118

01/08/2024, 5:12 PM
Hi @fresh-article-37001, we fast tracked this and we have just released support for media messages in our Whatsapp integration. You can start using this right away, here's the documentation: https://docs.botpress.cloud/docs/cloud/channels/whatsapp/#media-images-audio-documents
q

quick-musician-29561

01/08/2024, 6:11 PM
🔥 🔥 🔥
f

fresh-article-37001

01/09/2024, 10:04 AM
Thanks alot Abe and botpress team!
5 Views