-
Go to Slack API Dashboard
- Visit: https://api.slack.com/apps
- Sign in with your Slack workspace
-
Create New App
- Click**"Create New App"** button
- Select**"From scratch"**
- App Name:
Sentinel AIOps(or any name) - Pick Workspace: Select your workspace
- Click**"Create App"**
-
Enable Incoming Webhooks
- In left sidebar, click**"Incoming Webhooks"**
- Toggle**"Activate Incoming Webhooks"** toON
-
Add Webhook to Workspace
- Click**"Add New Webhook to Workspace"** button
- Select Channel:
#all-aitubby(or your preferred channel) - Click**"Allow"**
-
Copy Webhook URL
- You'll see a webhook URL like:
https://hooks.slack.com - Click**"Copy"** button
- You'll see a webhook URL like:
-
Save to .env
# Run the setup script ./setup_slack_webhook.sh # OR manually add to .env echo "SENTINEL_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/URL" >> .env
If you already have a Slack webhook URL:
# Add directly to .env
echo "SENTINEL_SLACK_WEBHOOK_URL=YOUR_EXISTING_URL" >> .env- Go to your Slack workspace
- Click**"Workflows"** in left sidebar
- Create new workflow
- Add**"Webhook"** trigger
- Copy the webhook URL provided
After adding the webhook URL:
# Test the webhook
python test_webhook_slack.py
# Expected output:
# ✅ Slack webhook configured
# ✅ Sending test message...
# ✅ Message sent successfully!
# 💡 Check your Slack channel: #all-aitubby- Make sure URL starts with
https://hooks.slack.com/services/ - Check for typos or extra spaces
- URL should be on a single line in
.env
- Verify the webhook is still active in Slack
- Check if the channel still exists
- Re-create the webhook if needed
- Slack allows 1 request/second per webhook
- Wait a moment and try again
- Check
config/sentinel.yamlfor rate limit settings
- Never commit
.envfile to git (it's in.gitignore) - Webhook URLs are sensitive - treat like passwords
- Rotate webhook URLs if compromised
- Use different webhooks for dev/staging/prod
# Setup webhook (interactive)
./setup_slack_webhook.sh
# Test webhook
python test_webhook_slack.py
# Check configuration
python -c "from config import get_config; print(get_config().webhooks.slack.webhook_url[:50] if get_config().webhooks.slack.webhook_url else 'Not configured')"