Rasa Slack Integration

Hello Community, I have created a video tutorial on the integration of Rasa bot over Slack, Check it out.

Check out the Restaurant Bot demo integrated with Slack:

Note: While developing this bot, I had used Rasa v.1.9.7 and there was some issue with the slack connector of Rasa, I have found a temporary fix, I have mentioned this in the issue.

I hope this helps :blush:.

2 Likes

Super helpful, should be linked from the docs.

Now how do I make my buttons work??

Three hours later, I still can’t make the buttons work! You hint at the end of the video. Can I see your domain.yml file? My buttons work fine in the rasa shell but not with Slack. When I click on the button, I get the following exception thrown in the console running

rasa run --enable-api --cors "*" -vv

Traceback (most recent call last):
  File "/home/cck197/rasa/venv2/lib/python3.6/site-packages/sanic/request.py", line 173, in load_json
    self.parsed_json = loads(self.body)
ValueError: Expected object or value

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cck197/rasa/venv2/lib/python3.6/site-packages/sanic/app.py", line 976, in handle_request
    response = await response
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/cck197/rasa/venv2/lib/python3.6/site-packages/rasa/core/channels/slack.py", line 356, in webhook
    metadata = self.get_metadata(request)
  File "/home/cck197/rasa/venv2/lib/python3.6/site-packages/rasa/core/channels/slack.py", line 329, in get_metadata
    slack_event = request.json
  File "/home/cck197/rasa/venv2/lib/python3.6/site-packages/sanic/request.py", line 167, in json
    self.load_json()
  File "/home/cck197/rasa/venv2/lib/python3.6/site-packages/sanic/request.py", line 176, in load_json
    if not self.body:
sanic.exceptions.InvalidUsage: Failed when parsing body as json

My buttons look like this:

  utter_ask_permission:
    -
        text: "How would you feel if I asked you some questions?"
        buttons:
          -
            payload: /startc
            title: "Go on"

hey @cck197, I have updated the slack connector so that it will parse the button click response from the slack successfully. I will show it in the other part of the video. Sorry as of now I can’t share slack connector file as there are some changes needs to be done, but I will share it soon :sweat_smile:

1 Like

Any updates on the button stuff? :slight_smile:

Any plans on getting these Videos back up on YT? Maybe they are out of date, which is understood