Kressa
Kressa

Reputation: 21

How To Create A Hyperlink For My Dialogflow Chatbot In Responses

I created a chatbot using dialogflow and I added a website link to the response, I have integrated the bot in Telegram and the website link is working perfectly, but on the web demo, it is not. Is it possible that when I integrate the chatbot on a website using Kommunicate, the hyperlink will work?

Upvotes: 2

Views: 13287

Answers (2)

Jithin balakrishnan
Jithin balakrishnan

Reputation: 71

Kommunicate has a link button template, create a Dialogflow intent using below metadata.

{
    "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
            }
        ]
    }
}

The openLinkInNewTab: false to open any link in the same tab. Default value is true, which will open the links in the new tab. Here is more information about the same.

Also, you can render HTML content as a message and Kommunicate will render the HTML in the UI. Here is the metadata for that.

Upvotes: 4

jacobytes
jacobytes

Reputation: 3241

Sadly the web demo only supports plain text responses, so adding an clickable url within your chatbot for the webdemo isn't possible. Luckily, this is a limitation for web demo, so any other integration that do support URL's in their chats will work as you have seen with Telegram.

Upvotes: 1

Related Questions