Chatbots
πΌ Slack Bot
πΌοΈ Setup
- Create a workspace on Slack if you donβt have one already by clicking here.
- Create a new App on your Slack account by going here.
- Select
From Scratch
, then enter the Bot Name and select your workspace. - On the left Sidebar, go to
OAuth and Permissions
and add the following scopes underBot Token Scopes
:
- Now select the option
Install to Workspace
and after itβs done, copy theBot User OAuth Token
and set it in your secrets asSLACK_BOT_TOKEN
. - Clone the example slack repo from here.
- Run NPM install and start the server. The application starts and prints by default a
NGROK reverse proxy URL
to the console. - On the Slack API website go to
Event Subscriptions
on the left Sidebar and turn onEnable Events
. - In
Request URL
, enter your server or ngrok address. - After it gets verified, click on
Subscribe to bot events
, addmessage.channels
Bot User Event and click onSave Changes
. - Now go to your workspace, right click on the bot name in the sidebar, click
view app details
, thenadd this app to a channel
.
π Usage Instructions
- Go to the channel where you have added your bot.
- To add data sources to the bot, use the command:
- To ask queries from the bot, just tag the bot and ask your question.
π Happy Chatting! π
Was this page helpful?