简体   繁体   中英

Bot Framework v4 + Slack = No Buttons

Currently we have a bot that works on many channels (facebook, skype, teams, etc...) and now are integrating with Slack. The problem is the "imBack" buttons both within the hero card and suggested actions do not show up as interactive, instead they are just plain text.

I have gone thru the documentation, and put https://slack.botframework.com/api/Actions in the "Interactive Components" section as directed, but no joy.

This is using Bot Framework v4 (C# Bot Builder v4.5.1).

Also, i have tried Slack in the web browser and Desktop for Windows 10.

What am i missing to get buttons to show up?

There are certain channel specific guidelines to create a message. If I have to create a slack specific message please do refer slack's documentation also I need to tell bot framework that the message is channel specific, so i will wrap my message object inside channelData like this:

{
    "channelData": {
    "type": "message",
    "locale": "en-Us",
    "channelID": "email",
    "from": { "id": "mybot@mydomain.com", "name": "My bot"},
    "recipient": { "id": "joe@otherdomain.com", "name": "Joe Doe"},
    "conversation": { "id": "123123123123", "topic": "awesome chat" },
    "channelData":
    {
        "htmlBody": "<html><body style = /"font-family: Calibri; font-size: 11pt;/" >This is more than awesome.</body></html>",
        "subject": "Super awesome message subject",
        "importance": "high",
        "ccRecipients": "Yasemin@adatum.com;Temel@adventure-works.com"
    }
}

Refer Bot Framework's official documentation as well. Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM