Caraousel widget with Facebook messenger

Hello, I have been trying to use carousels in one of my rasa bots, channeled to Facebook messenger, I have tried several ways but couldn’t make it work. This is what I get:

Here is my actions.py:

class ActionCarousel(Action):

    def name(self) -> Text:

        return "action_products_carousels"

    def run(self, dispatcher, tracker: Tracker, domain: "DomainDict") -> List[Dict[Text, Any]]:

        message = {

            "type": "template",

            "payload": {

                    "template_type": "generic",

                    "elements": [

                        {

                            "title": "Welcome!",

                            "image_url": "https://petersfancybrownhats.com/company_image.png",

                            "subtitle": "We have the right hat for everyone.",

                            "default_action": {

                                "type": "web_url",

                                "url": "https://petersfancybrownhats.com/view?item=103",

                                "webview_height_ratio": "tall",

                            },

                            "buttons": [

                                {

                                    "type": "web_url",

                                    "url": "https://petersfancybrownhats.com",

                                    "title": "View Website"

                                }, {

                                    "type": "postback",

                                    "title": "Start Chatting",

                                    "payload": "DEVELOPER_DEFINED_PAYLOAD"

                                }

                            ]

                        }

                    ]

            }

        }

        dispatcher.utter_message(attachment=message)

        return []

Hi @dummyali! Please see this link for your reference I know you already are but check the syntax for the same : Generic Template - Messenger Platform - Documentation - Facebook for Developers

Try implement small template first and the go add the caraousel, it will help you to find the issue more easily.

Hello nik, thanks for replying but its still the same, and I referred to that doc only, would really appreciate if you could see my code above and point out where I am going wrong, Thanks

@dummyali I suggested you please try use small template example first so that you will see its showing on Facebook messenger or not and then add more syntax, did you tried?

@dummyali You only need FB for integration ( any specific reason) or you can used any other front end to?

Yes I did try small template, but that doesnt change anything, I only need FB for integration