Slack Integration, no response to events subsrciption

Hello !

I just installed botpress on windows and and I just wanted to try to connect a bot to slack. I tried the slack integration with the welcome-bot following this tutorial : https://botpress.com/docs/channels/slack

I created a https link with ngrok and set it up on the externalUrl field in botpress.config.json, I enabled the channel-slack module in “data/global/config/channel-slack.json” and put in the SigningSecret from my Slack app. I restarted the bp and slack channel seems to be enabled.

But then when I go to the Events subscription page of my slack app to configure callback setting up the request URL like this : https://5723d863b41e.ngrok.io/api/v1/bots/welcome-bot/mod/channel-slack/bots/welcome-bot/events-callback as showed in the docs, it doesn’t respond :

on Ngrok :

debug log : ( I also tried with “/api/v1/bots/welcome-bot/mod/channel-slack/bots/welcome-bot/events-callback”

Is there something I’m missing ?

Thank you

2 Likes

Hey @Macalli

I managed to get a response from my bot:

Here’s how I got it working:

1 - I set the externalUrl to http://localhost:3000 and enabled the module channel-slack in YOUR_BP_INSTALL/data/global/botpress.config.json
2 - I started an instance of ngrok.
3 - (This step is pretty obscur) : I copied file YOUR_BP_INSTALL/data/global/config/channel-slack.json and pasted it in YOUR_BP_INSTALL/data/bots/YOUR_BOT/config/channel-slack.json
4 - I set enable: true in this config file (the one in your bot directory)
5 - I set the botToken to my client Id and signingSecret field to my signing secret.
6 - I pasted the following URL in slack http challenge input bot: YOUR_NGROK_HTTPS_ENDPOINT/api/v1/bots/YOUR_BOT/mod/channel-slack/bots/YOUR_BOT/callback

This should help you make your bot work.

I’ve gotta say, this is the first time I set up a bot for Slack and the experience is really painfull. Because I know the code quite well, I had to debug my way with breakpoints just to understand whats going on…

I’ll talk about this to the dev team and see if we can make it better in a near futur.

In the mean time, feel free to post again on this forum if you have any question!

Thanks for your contribution to the forum,

François

1 Like

Thanks a lot ! It worked :slight_smile:

Just a detail, but in this case, the request URL should be :

YOUR_NGROK_HTTPS_ENDPOINT/api/v1/bots/YOUR_BOT/mod/channel-slack/bots/YOUR_BOT/events-callback

1 Like