1

I'm working on a bot using the Microsoft Bot Framework. I'm trying to get it up and running on Slack, and got blocked by an issue regarding interactive buttons. In a waterfall dialog flow, I'm creating a choice prompt like below

    private async Task<DialogTurnResult> IdentifyUserTypeAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
    {
        var message = "Please select what kind of user you are"

        userTypes = await userTypeRepository.GetAllUserTypesAsync();
        var options = new PromptOptions
        {
            Prompt = MessageFactory.Text(message),
            Choices = ChoiceFactory.ToChoices(userTypes.Select(x => x.UserType.ToString()).ToList()),
            Style = ListStyle.HeroCard,
        };

        await state.ConversationState.SaveChangesAsync(stepContext.Context);
        return await stepContext.PromptAsync(UserTypeDialogId, options);
    }

On the Slack app, the buttons renders correctly, like in the image below.

Slack buttons

However, when I click the buttons, nothing happens. I see the request on my local slack client actually calls my slack app, and returns with a 200.

I have followed this tutorial on setting up the Slack app using ABS: https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-slack?view=azure-bot-service-4.0&tabs=abs

On the slack app I have the following configurations

Redirect URL:

Redirect url

Scopes:

Scopes

Events are enabled, and I have added the request URL. The black part is my bot handle, taken from ABS

Events

I have subscribed the following Bot events

BotEvents

The bot is configured to be always online:

Always Online

And lastly, I have enabled interactivity, and added the request URL, which seemed to be validated correctly by the Slack app.

Interactivity

Am I missing something? I have tried to start over multiple times, but I end up in the same situation, where the button doesn't seem to fire anything on my bot code. There's simply no incomming request to the Bot's webserver.

Ulbo
  • 346
  • 8
  • 20
  • https://github.com/microsoft/botbuilder-dotnet/issues/4246 Linking this here for visibility – JJ_Wailes Jul 08 '20 at 15:52
  • Does this answer your question? [Why doesn't the Azure Bot Service Slack connector forward Events and Interactive Messages?](https://stackoverflow.com/questions/62440845/why-doesnt-the-azure-bot-service-slack-connector-forward-events-and-interactive) – Kyle Delaney Jul 08 '20 at 20:14
  • It seems, as per the answer in the issue on Github that some deprecated APIs might be causing the issue – Ulbo Jul 13 '20 at 13:20
  • Is my answer acceptable? – Kyle Delaney Jul 18 '20 at 00:12

1 Answers1

1

A fix is on the way. In the meantime, there are two workarounds you can try. You can create a classic Slack app, or you can bypass the ABS Slack connector by using the Slack adapter instead.

You can see a discussion of this here: https://github.com/microsoft/BotBuilder-Samples/issues/2553

Kyle Delaney
  • 11,616
  • 6
  • 39
  • 66