Rasa Slack Bot Integration

Hello Everyone.

I am using rasa to connect to slack using Ngrok.

My bot is properly responding with RASA X. These are steps i have done to connect with slack.

  1. Create new Channel.
  2. Added new user in App home(new in slack, worked with dialogflow for me).
  3. Added the URL in event subscription like this:
  4. subscribed to following bot events.
  5. Added localhost to redirect URL
  6. Activate Incoming webhok:
  7. Installed the app to a channel
  8. Copied the Bot User OAuth Access Token to my credentials file:
  9. then started the bot using rasa run on port 5005 where ngrok is running
  10. I get the response from slack into rasa (rasa run actions terminal, trying to run some google drive api
  11. I get following error in rasa run terminal window
  12. And no message is fetched back in rasa window.

Please help its urgent

add the channel you want to post in into the credentials file under the slack token like:

slack_token: "token" slack_channel: "#nameofchannel"

I did that too. Still no response

What command should i run in cli to start the bot. I m using rasa run.

I tried this also :

rasa run -m models --enable-api --cors “*” --debug

The bot respose is shown in the command prompt but doesnt get fetched in the slack

Here is my folder. I dont have a run.py file which i found in some of the forum responses.

My codes and window look like this:

endpoints file :

credentials file :

Maybe in OAuth&permissions Tab in Slack try to set the redirect URL to only the ngrok url like http://fcd4e2c6.ngrok.io

I don’t have the run.py file either. Also i havent set the action_endpoint stuff in the endpoints.yml file. But it works for me.

Still not working. I will do a fresh start

I’m always using rasa x for starting the bot and not rasa run

Okay will try that now

It is not recognizing the port by rasa x i.e port 5002

ngrok & rasa x response

I’m using rasa x command and running ngrok with port 5005

Still not responding.

@Rasa @JiteshGaikwad @Juste

Can someone help here

@akelad @erohmensing can some one tell me whats the issue and how should i resolve it. I have the same issue like this Rasa bot not responding on slack

can some one from rasa look into the issue please. @Tobias_Wochinger @amn41

Hi @athenasaurav, can I ask why you are running Rasa X locally and not the recommended way on a server?

When it comes to running rasa x, although Rasa X runs on port 5002, rasa still runs on 5005, so that is the port you want to set up with ngrok.

Hi… @erohmensing Thanks you very much for your reply. I m just testing it locally. And i m running rasa run and using the same port but i m not getting reply back in slack. Although rasa logs shows that rasa is receiving all the messages and correctly predicting all intents like greet and action listen further on. I will try on server also today.

To all rasa user who have this issue. Problem solved. It is issue of bot token scope and user token scope.

Following are the images of the bot token scope that i added in Oauth & Permission:

Following are the images of the user token scope that i added in Oauth & Permission:

Redirect URL :

Event Subscription :

In credentials.yml file:

Enable rest Enable slack Bot User OAuth Access Token and add from Oauth Page Lastly, add

rasa:
  url: "http://localhost:5005/webhook" 

in end of file

click manage destribution and click on add to slack:

Lastly intall app. You can also set app icon and colors etc in basic information tab.

The bot user appers only after we add the scopes and it has been moved to App Home.

1 Like