Closed aldvintumbelaka closed 2 years ago
Found this issue, might be related #326 but looks like it's using Slack interactive message
Hi @youyu16 Yup I've set the webhook URL as well. But, if I set the URL to use https://slack.botframework.com/api/Action as per the documentation, it will not work, but if I set it to my ngrok URL, it will work, but looks like it's missing the request body object that is required by the adapter process activity.
it only has payload, callbackid as the request body. meanwhile, the processActivity required activity_type, etc.
Thanks
@aldvintumbelaka any exception occur when you sent that action message? you can find it in web console
Also, if its not work for slack.botframework.com. please check the oauth settings, have you set the endpoint in redirect url please make sure the interactive is on as below
When I click the button on slack I will get full activity with all the things bot needs and the original message from Slack inside ChannelData Filed. could you please put and example of what you received here?
@aldvintumbelaka this is part of the message what I got
Looks like it's a bit different in mine. Here's the form data for a normal message
And here's the form data from a button
@youyu16 The problem is when I try to pass it to the botframework adapter process activity,
it returns me with this message: validateAndFixActivity(): missing activity type
When i do a check, here's the different between the normal message request body and request body that I got from the slack button when clicked. This is the normal message request body:
And this is what i got when a button is clicked in slack
Looks like it's automatically being wrapped inside the payload object.
The problem is, in the process activity function from botframework module, it get the req.body straight away.
Hi @aldvintumbelaka , I just followed all steps in section Create a Slack application using the Azure portal in the doc, from the scratch: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-slack?view=azure-bot-service-4.0#create-a-slack-application-using-the-azure-portal. This is my test result:
1 For sending hero card, it works well. I can click the button and send back title '1'. I'm using C# SDK and this code should construct the same activity with you provided:
2 For sending SuggestedActions, yes I repro the bug. The button is not rendered. We will try to fix it.
Since we're following the same doc, let's assume our configuration is well, so there are 2 suspicious aspects: 1 There are bugs in js SDK. 2 There are bugs in adapter. So I want to know, are you using Slack adapter or Azure portal? I mean in this doc, are you following Create a Slack application using the Azure portal(which I just tested) or Create a Slack application using the Slack adapter?
Hi @youyu16 I'm using the azure portal, not the slack adapter. But, i'm using node js, not the C# SDK. Do you think it might be the issue?
Hi @aldvintumbelaka , Since everything goes well in C# SDK in my side, let me try to use js SDK to see if we can repro it. If can't, this shows we missed something in configuration...
Hi @aldvintumbelaka , I've tried node js SDK, but everything still went well.
I use sample here: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs/02.echo-bot And I use your code: But everything worked in my side, with bot echoing '1'.
@aldvintumbelaka , Hi, any update about this issue? Is there more detail that can help us troubleshoot this issue?
Hi @ssss141414 sorry i have a limited internet access during new year break, I'm testing it again now. I'll try to redo all the configuration and do another check.
Hi @ssss141414 I've got it working now. Looks like there is a miss-configuration issue in the redirect url and event subscriptions. Thanks for your help. I'll now close this issue.
Hi,
I'm having a problem where I have prompt button or hero card button in Slack. When the user click the button, it doesn't send any response back to the bot.
Here's my code (using Hero Card)
Tested it using step.prompt as well using both Hero Card style or I leave style as undefined
I try testing it using suggested action as well, but it doesn't render properly in Slack (only render as bullet points)
I also have enabled the Event Subscriptions in Slack
And also enabled Interactivity with https://slack.botframework.com/api/Action as the Request URL
Is there anything that I do wrong on the setup or something? I'm pretty sure I've followed all steps in here https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-slack?view=azure-bot-service-4.0
Note: this is working totally fine in Test in Web Chat, in Direct Line, and Microsoft Teams.
Thanks