botframework-sdk: [DCR] Allow for Slack Block Kit API

Issue

Per: https://github.com/microsoft/botbuilder-js/issues/1014

Note: Based on testing, the issue isn’t that the user is using a ChoicePrompt. It’s that we don’t map the API.

Slack has a new Block Kit API. It accepts formats like:

{
  "type": string,
  "image_url": string,
  "alt_text": string
}

Currently, in Slack we allow channel-specific:

Attachments

"channelData": {
   "text": "Now back in stock! :tada:",
   "attachments": [
        [...]
   ]

Actions

"channelData": {
    "payload": {
        "actions": [
            [...]
        ],

Proposed change

Allow for:

"channelData": {
   "text": "Now back in stock! :tada:",
   "blocks": [
        [...]
   ]

Component Impact

Several on the Intercom Repo (not sure exactly what). I don’t believe any updates will be necessary to public SDK as all the changes are in channelData. In my own testing, blocks goes through, but Slack doesn’t know what to do with it, so I think it just needs to be mapped properly.

Customer Impact

Will allow Slack Customers to use new Block Kit API

Tracking Status

Dotnet SDK

  • PR
  • Merged

Javascript SDK

  • PR
  • Merged

Java SDK

  • PR
  • Merged

Python SDK

  • PR
  • Merged

Emulator

  • PR
  • Merged

Samples

  • PR
  • Merged

Docs

  • PR
  • Merged

Tools

  • PR
  • Merged

[dcr]

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 24
  • Comments: 17 (12 by maintainers)

Most upvoted comments

+1 on getting this resolved, this is a huge blocker for us as an organization.

This conversation has been started with @benbrown and others.

hi Ben! If this is something that is going to be implemented I would like to know if you can give us an idea of the timeframe? Thanks!

@jmnsf Based on my understanding of the roadmap right now, the activities endpoint will not be updated with support for Block Kit any time soon.

You may want to consider moving to the adapter linked above - it will give you access to all of the newer Slack features.

@cleemullins are there plans to do this at the BotFramework level, i.e. using channelData as with most other functionality (and also as described in the issue)? We can already use the Slack API directly for this, but one would think sidestepping the platform goes against the point of having one in the first place.

There’s also the REST API which has no support for this either.

Note: If your bot is in Node, you can use the BotKit Slack Adapter, since it supports the Block Kit API.