Interactive Message Templates (Adding buttons to whatsapp chat)

Hello EveryOne,

I am trying to add buttons in my chatbot over the WhatsApp channel, Ref: Interactive Message Templates - WhatsApp Business API - Documentation - Facebook for Developers. But it seems like Twilio and rasa interface is not updated for this, or at least I am not able to find that. before I try some custom code I wanted to confirm if someone has done this before. am I in the right direction? if I develop custom code will it work on the Twilio server or my extra payload will filter out. any help here will be appreciated, I really think this is a good to have feature on our bot.

Thanks SHUBHAM

I’d also be interested in the answer for this! I’ve been trying to do the same thing without any success.

I am also interested for the same how to rendering buttons in WhatsApp

Help on this please.

I Think Twilio have updated the UI where you can add WhatsApp buttons, you have to create templates in the dashboard and submit it for approval, once approved when you will send the exact message Twilio will append the buttons.

And to understand the buttons on the rasa end I had to create a custom channel. All you have to add is one if condition in the existing Twilio channel and rename it. if Rasa haven’t updated it yet.

text = request.form.get("Body", None)

if not text:
      text = request.form.get("ButtonText", None)

Hope this will :slightly_smiling_face:

1 Like

What if buttons are dynamic generated via api and custom actions

you can submit the message and buttons with var for approval, hello {name}.

Is there a specific reason you are using twilio? You can switch to the new WhatsApp Cloud API directly from meta. There the endpoints have more options and buttons are possible without approval. But Rasa does not have a connector for the WhatsApp Cloud API yet. But a custom connector should not be super complicated.

Yes, That is also a good idea. This time I will try to work with WhatsApp Cloud API directly and share the WhatsApp custom channel code here.

/tt{{“test”:api_res_code}} this kind I have in custom action what template to provide to this button to get it rendered as button

Hi @shubham47 are you able to write custom code please share it here. I am also trying to implement dynamic buttons in whatsapp using rasa.

hi @shubham47 could you please help me in writing the custom channel for showing buttons in Twilio

@vaidehi . Please share your code as well.

Hey. Could this be used in creating WhatsApp buttons with the Twilio API? Or could you suggest any methods to do so?

It’s ideal to have sharing icons, like whatsapp for sites and apps. Like celebrity site, pkbiography has social media sharing icons. To check the code go to inspect and view source code,