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 '{
  "recipient":{
    "id":"<PSID>"
  },
  "message":{
    "attachment":{
      "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"
              }              
            ]      
          }
        ]
      }
    }
  }
}' "https://graph.facebook.com/v2.6/me/messages?access_token=<PAGE_ACCESS_TOKEN>"