Slash command Slack bot non-Zenduty users in an organization to declare an incident on Zenduty
- Python version 3.8.10 or higher
# determine python version
python --version
- Zenduty API KEY
- SlackBotToken(SLACK_BOT_TOKEN)
- SlackSigningSecret(SLACK_SIGNING_SECRET)
-
Go to Slack Applications in your web browser.
-
Click the Create New App button.
-
Choose Create an App From an app manifest.
-
Open manifest.yml and replace with the copied ngrok url
-
Copy the manifest.yml paste the manifest code click on next and create
-
Your newly created app will appear in the apps list.
- Go to Basic Information in the left side menu.
- Under App Credentials copy the Signing Secret
- Go to OAuth & Permissions in the left side menu.
- Under OAuth Tokens for Your Workspace copy the Bot User OAuth Token
-
Go to Basic Information in the left side menu.
-
Click Install to Workspace.
-
Click Allow to grant permissions for the app.
-
Once installed, the app will be visible in your Slack workspace.
- Replace
[Your specified endpoint URL]/slash_command/
in Step 1, Command 4, with the URL where your bot's functionality is implemented.
-
If you're running in Docker, paste the copied API Key, Slackbot Token, and Slack Signing Secret in dev.env. If you're in a development environment, paste the keys in utils.py
-
Install required packages
pip install -r requirements.txt
python app.py
docker-compose up
- Use ngrok to tunnel the exposed port (ngrok http 8002)
- Copy the ngrok url
- Please refer Ngrok