https://discord.gg/botpress logo
Sending WA template message
# 💻developers
e
Hi Botpress devs! 👋 I ran into a problem while using the WhatsApp integration. I'd like to trigger a Message Template to be sent via the WhatsApp cloud API that has a few quick reply buttons. When the user taps a button, it would kick off a workflow in botpress. However, I need to pass through a few pieces of context to the workflow (resource identifiers, etc.). In the [API docs](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates#interactive), it looks like you can attach a
payload
value to the template buttons, which will be passed to the webhook callback when tapped, however I'm not seeing this payload data in the incoming event in botpress anywhere, and I don't see it mentioned in the docs. I think I've found where in the whatsapp integration code I would need to pass through the payload value, and opened a PR for it [here](https://github.com/botpress/botpress/pull/13803). But I was curious if other folks have run into this or know of a better way to handle this scenario. Thanks!
l
What are the button types you have in your template? event.payload should get you the details
e
They're all configured as "Custom". Unfortunately in
event.payload
I currently only see a
text
key. This is what led me to open that PR. I think the extra nested
payload
value just needs to be passed through and it should work https://cdn.discordapp.com/attachments/1364624795119124631/1364862969644843069/image.png?ex=680b3731&is=6809e5b1&hm=4adebc4fbcbd50e2bfd8109533b72da8cc994ac09d0d2ed4d2a0f9c216f80b87&