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.
Create new Channel.
Added new user in App home(new in slack, worked with dialogflow for me).
Added the URL in event subscription like this:
subscribed to following bot events.
Added localhost to redirect URL
Activate Incoming webhok:
Installed the app to a channel
Copied the Bot User OAuth Access Token to my credentials file:
then started the bot using rasa run on port 5005 where ngrok is running
I get the response from slack into rasa (rasa run actions terminal, trying to run some google drive api
I get following error in rasa run terminal window
And no message is fetched back in rasa window.
Please help its urgent
spokey
(Spokey)
March 12, 2020, 8:58am
2
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 :
spokey
(Spokey)
March 12, 2020, 9:52am
6
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
spokey
(Spokey)
March 12, 2020, 10:32am
8
I’m always using rasa x for starting the bot and not rasa run
It is not recognizing the port by rasa x i.e port 5002
ngrok & rasa x response
spokey
(Spokey)
March 12, 2020, 10:49am
11
I’m using rasa x command and running ngrok with port 5005
@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
erohmensing
(Ella Rohm-Ensing)
March 16, 2020, 8:44am
16
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