How To Create A Hyperlink For My Dialogflow Chatbot In Responses

前端 未结 2 430
粉色の甜心
粉色の甜心 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.

提交回复
热议问题