Custom Rasa/webchat and facebook messenger carousel

How can i setup a custom action that sends this carousel:

test_carousel = { “type”: “template”, “payload”: { “template_type”: “generic”, “elements”: [{ “title”: “Title”, “subtitle”: “Subtitle”, “image_url”: “/static/images/test.png”, “buttons”: [{ “title”: “Link name”, “url”: “http://link.url”, “type”: “web_url” }, { “title”: “postback name”, “type”: “postback”, “payload”: “/greet” } ] }, { “title”: “Title”, “subtitle”: “Subtitle”, “image_url”: “/static/images/test.png”, “buttons”: [{ “title”: “Link name”, “url”: “http://link.url”, “type”: “web_url” }, { “title”: “postback name”, “type”: “postback”, “payload”: “/greet” } ] } ] } } dispatcher.utter_message(attachment=test_carousel)

to rasa webchat and to facebook messenger with facebook carousel format in the same action?

Facebook carousel format:

curl -X POST -H "Content-Type: application/json" -d '{
            "subtitle":"We have the right hat for everyone.",
            "default_action": {
              "type": "web_url",
              "url": "",
              "webview_height_ratio": "tall",
                "title":"View Website"
                "title":"Start Chatting",

hay @jpvgc45 do you have solutions for this post?

Try python method in custom action from i.e. sanic or flask modules.

1 Like

Thank you for your reply @earroyoh . I’ve got a solution for this as you mention python custom action.

1 Like

dear @earroyoh unfortunately I can’t make it. I have been added this code like this:

But getting this response from the messenger.

What was the mistake, any idea?