Search code examples
dialogflow-eskommunicate

How can we add a web link as a button in Google Dialog flow Chatbot


I want to add a link as a button in google dialogflow chatbot and it was integrated with kommunicate. Please help me how we add a link as a button.When user clicks that button he has to redirect to another page.Like this i have to add a link as button


Solution

  • Use the below metadata to render the Link Buttons: Send custom data to bot platform via rich message response

    {
        "message": "click on the buttons",
        "platform":"kommunicate",
        "metadata": {
            "contentType": "300",
            "templateId": "3",
            "payload": [{
                    "type": "link",
                    "url": "https://www.google.com",
                    "name": "Go To Google"
                },
                {
                    "type": "link",
                    "url": "https://www.facebook.com",
                    "name": "Go To Facebook",
                    "openLinkInNewTab": false
                }
            ]
        }
    }
    

    Use openLinkInNewTab: false to open any link in the same tab. Default value is true, which will open the links in the new tab.