0
votes

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?

1
Have you considered using AdaptiveCards rather than the HeroCards? My understanding is that these are now supported on Kik and Slack - Digitalsa1nt
we have, but as this was just a switch of the toggle, wanted to see what functionality we got just for "free", without having to rewrite the UI effort. - NiteLordz

1 Answers

0
votes

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": "[email protected]", "name": "My bot"},
    "recipient": { "id": "[email protected]", "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": "[email protected];[email protected]"
    }
}

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