Romain Huber
Romain Huber

Reputation: 207

Response from Slack message Menu with DialogFlow

I have developped a chat bot using Slack + Dialogflow + a back in nodeJS, and I'm able to send and receive message from the user. I can also use buttons without any problem. But when I create a message menus with dynamique options, and I select one of them, I get the following message : "Empty data received on Action Endpoint".

The JSON used to create the message menus is from the slack documentation. None of the value should hit a known intent, so i'm expecting something like "Sorry I don't understand" from the failback intent.

{
        "payload": {
            "slack":
                {
                    "text": "Would you like to play a game?",
                    "response_type": "in_channel",
                    "attachments": [
                        {
                            "text": "Choose a game to play",
                            "fallback": "If you could read this message, you'd be choosing something fun to do right now.",
                            "color": "#3AA3E3",
                            "attachment_type": "default",
                            "callback_id": "game_selection",
                            "actions": [
                                {
                                    "name": "games_list",
                                    "text": "Pick a game...",
                                    "type": "select",
                                    "options": [
                                        {
                                            "text": "Hearts",
                                            "value": "hearts"
                                        },
                                        {
                                            "text": "Bridge",
                                            "value": "bridge"
                                        },
                                        {
                                            "text": "Checkers",
                                            "value": "checkers"
                                        },
                                        {
                                            "text": "Chess",
                                            "value": "chess"
                                        },
                                        {
                                            "text": "Poker",
                                            "value": "poker"
                                        },
                                        {
                                            "text": "Falken's Maze",
                                            "value": "maze"
                                        },
                                        {
                                            "text": "Global Thermonuclear War",
                                            "value": "war"
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
        }
    }

I do not understand why the selected option is not send to Dialogflow and I don't know what I'm missing. Note that I can't find the response in the dialogflow history.

Thank you in advance.

Upvotes: 2

Views: 576

Answers (1)

Romain Huber
Romain Huber

Reputation: 207

After contacting both Slack and Dialogflow support, this functionnality is not supported by Dialogflow yet. I found a solution by adding a middleware between Slack and Dialogflow, which takes care of message menus and sends the other messages to Dialogflow.

Upvotes: 3

Related Questions