Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect a bot to Slack Interactions #3971

Open
anil-mndl opened this issue May 2, 2024 · 2 comments
Open

Connect a bot to Slack Interactions #3971

anil-mndl opened this issue May 2, 2024 · 2 comments
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@anil-mndl
Copy link

anil-mndl commented May 2, 2024

ABS when configured to "Add and configure interactive messages" as stated in the documentation Connect a bot to Slack doesn't forward interactive messages to the bot service.

Sample information

  1. Sample type: samples
  2. Sample language: all languages
  3. Sample name: n/a

Describe the bug

As per the documentation, Slack interactions initiate an HTTP POST request when users interact with interactive components. The request URL is pointed to https://slack.botframework.com/api/Actions which should forward those requests to the URL mentioned in 'Messaging Endpoint' for the bot. This request forwarding doesn't happen.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new 'Azure Bot' in Bot Services in Azure portal
  2. Add 'Messenging Endpoint' bot configuration.
  3. Add 'Slack' as in the channels - a new Slack app need to be created and credentials properly filled in
  4. In the Slack app 'Interactivity & Shortcuts' menu, add 'https://slack.botframework.com/api/Actions' in the Request URL as mentioned in the documentation.
  5. Render a simple interactive Slack block card - see attached image for a sample card.
  6. Click on the interactive button.

Expected behavior

When a user clicks on the button in the interactive block card, Slack initiates a HTTP POST request which should route to the 'Messenting Endpoint' as setup bot configuration. Apparently, no such message is sent from the Bot Services.

Screenshots

image
image

Additional context

https://stackoverflow.com/questions/62440845/why-doesnt-the-azure-bot-service-slack-connector-forward-events-and-interactive

@anil-mndl anil-mndl added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels May 2, 2024
@Amrit10737726 Amrit10737726 self-assigned this May 23, 2024
@NishankSiddharth
Copy link

Hi, can someone please take a look at this issue?
Interactive events are not getting sent to bot service.

@stevkan
Copy link
Collaborator

stevkan commented Dec 18, 2024

I was able to repro this issue. As mentioned in the previous posts, (Slack) interactions are not reaching the bot. When an interaction (with buttons) is sent to the client, the user should be able to click the button(s) which would then send an interaction event to the request URL, https://slack.botframework.com/api/Actions (i.e., the Connector/ABS). However, when the button is pressed it results in an error message displayed beside the button(s) with the following error: "The app responded with Status Code 400".

The below exported 'webapp-console.log' shows what appears to be a dispatch_failed error related to a blocks.actions API request. The timestamp on this error aligns with the timestamp of the interaction in the client. Clicking the button in an interaction from another developer/app not related to BotFramework resulted in no issues which suggests the issue isn't specifically a client issue but an issue with the API request being made from the client.

[12/18/24, 12:48:21:798] info: [API-Q] (T9BL4RFFS) 235000e0-1734554901.797 blocks.actions called with reason: dispatch_action_to_developer 
[12/18/24, 12:48:21:798] info: [API-Q] (T9BL4RFFS) 235000e0-1734554901.797 blocks.actions is ENQUEUED 
[12/18/24, 12:48:21:810] info: [API-Q] (T9BL4RFFS) 235000e0-1734554901.797 blocks.actions is ACTIVE 
[12/18/24, 12:48:21:814] info: Breadcrumb: ui.click: div.p-plain_text_element > span  
[12/18/24, 12:48:22:001] info: [API-Q] (T9BL4RFFS) 235000e0-1734554901.797 blocks.actions is REJECTED: API not ok dispatch_failed 
[12/18/24, 12:48:22:002] error: (T9BL4RFFS) {"error":"235000e0-1734554901.797 blocks.actions not ok: dispatch_failed"} 

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

4 participants