How to add only buttons in custom actions

Hey there! I’m currently working on a bot and I added a carousel action in actions.py and it worked. But when I tried to only add a button and attach an url to it its trowing erorrs. Im a bit confused now. If the buttons work inside this carousal then why is it not working when I try with only buttons ? Rasa team kindly look into the matter.

class ActionCarousel(Action):
    def name(self) -> Text:
        return "action_carousels"
    
    def run(self, dispatcher, tracker: Tracker, domain: "DomainDict") -> List[Dict[Text, Any]]:
        message = {
            "type": "template",
            "payload": {
                "template_type": "generic",
                "elements": [
                    {
                        "title": "Carousel 1",
                        "subtitle": "join now",
                        "image_url": "https://pixabay.com/images/search/flowers/",
                        "buttons": [ 
                            {
                            "title": "Happy",
                            "url": "https://google.com/",
                            "type": "web_url"
                            }
                      
                        ]
                    }  
                ]
                }
        }
        dispatcher.utter_message(attachment=message)
        return []

The above code works really great. but it is throwing erorr in the below format

class ActionCarousel(Action):
    def name(self) -> Text:
        return "action_carousels"
    
    def run(self, dispatcher, tracker: Tracker, domain: "DomainDict") -> List[Dict[Text, Any]]:
        message = {
            "type": "template",
            "payload": {
                "template_type": "buttons",
                "elements": [
                    {
                        "buttons": [ 
                            {
                            "title": "Happy",
                            "url": "https://google.com/",
                            "type": "web_url"
                            }
                      
                        ]
                    }  
                ]
                }
        }
        dispatcher.utter_message(attachment=message)
        return []

I want a button such that when a user clicks on it it should automatically redirect to an url rather than sending a url to the user and asking him to click on it

Thank You

@amn41