This bot can engage with Slack users within a specific company and provide responses to inquiries about company policies. This guide provides step-by-step instructions to integrate a chatbot with Slack using ngrok for local testing.
project_demo_github.mp4
Go to Slack APP Dashboard Follow the documentation to create the App.
- Install Dependencies: Install the dependencies from
requirements.txt
using the following command:pip install -r requirements.txt
-
Run the Application: Start the application by running
app.py
.python app.py
-
Run ngrok: Run ngrok to expose your local server to the internet. Use the following command:
./ngrok http 5000
-
Copy Public URL: Copy the public URL provided by ngrok.
-
Paste into Slack API Dashboard: Paste the public URL into the Slack API dashboard's Event Subscriptions.
-
Reinstall Slack Application:
- Go to the Basic Information tab of your Slack App.
- Reinstall the Slack Application in the workspace by following the steps provided.
- In the Slack chat dashboard, invite the app (created chatbot) to your workspace.
-
Set Permissions:
- Go to the OAuth and Permission Tab in your Slack App settings.
- Allow the following permissions in the Scope section:
app mention
chat write
channel history