How To Create A Hyperlink For My Dialogflow Chatbot In Responses

前端 未结 2 425
粉色の甜心
粉色の甜心 2021-01-27 21:11

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

相关标签:
2条回答
  • 2021-01-27 21:17

    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.

    0 讨论(0)
  • 2021-01-27 21:40

    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.

    0 讨论(0)
提交回复
热议问题