Slack Notifications
Maestro can be integrated with Slack to send real-time notifications about errors, warnings, and progress updates throughout the indexing process.
Prerequisites
Before configuring Slack notifications, you'll need:
- Slack Integration Token for your organization
- Generate from Slack's Official Documentation
- Slack Channel where notifications will be sent
Setting up Slack Integration
-
Update Configuration File: Open your
.env.maestro
file and add the following settings:# Enable/Disable Slack Integration
NOTIFICATIONS_SLACK_ENABLED=true
# Notification Types
# Options: ALL, ERROR, WARNING, INFO
NOTIFICATIONS_SLACK_NOTIFIEDON=ALL
# Slack Webhook Configuration
NOTIFICATIONS_SLACK_URL=https://hooks.slack.com/services/YOUR_SECRET_TOKEN
NOTIFICATIONS_SLACK_CHANNEL=maestro-alerts
NOTIFICATIONS_SLACK_USERNAME=maestro
# Message Configuration
NOTIFICATIONS_SLACK_MAXDATALENGTH=1000
# Notification Templates
NOTIFICATIONS_SLACK_TEMPLATE_ERROR=':bangbang: Error : ##TYPE##, Error Info: ```##DATA##```'
NOTIFICATIONS_SLACK_TEMPLATE_WARNING=':warning: ##TYPE## ```##DATA##```'
NOTIFICATIONS_SLACK_TEMPLATE_INFO=':information_source: ##TYPE## ```##DATA##```'For more details about the configuration, click here
-
Basic Settings:
NOTIFICATIONS_SLACK_ENABLED
: Activates the Slack integrationNOTIFICATIONS_SLACK_NOTIFIEDON
: Controls which notification types are sentNOTIFICATIONS_SLACK_URL
: Your webhook URL for message deliveryNOTIFICATIONS_SLACK_CHANNEL
: Target channel (without # symbol)NOTIFICATIONS_SLACK_USERNAME
: Bot display name in Slack
-
Message Templates:
- Templates use two variables:
##TYPE##
: Represents the notification category##DATA##
: Contains the actual message content
- Three template types available:
- Error notifications
- Warning notifications
- Informational notifications
- Templates use two variables:
-
Message Formatting:
- Supports Slack's markdown-style formatting
- Code blocks use triple backticks
- Includes emoji shortcuts
- Message length controlled by
NOTIFICATIONS_SLACK_MAXDATALENGTH
Message TemplatesThe message templates support Slack's rich text formatting. You can customize the emoji, layout, and structure of messages using Slack's markdown syntax and emoji shortcuts. See Slack's Message Formatting Guide for more options.
-
Important Considerations
- Keep your Slack webhook URL confidential
- Regularly rotate your Slack integration tokens
- Be mindful of Slack's API rate limits
Troubleshooting
If notifications aren't working, follow these steps:
-
Verify Configuration:
# Check these settings first
NOTIFICATIONS_SLACK_ENABLED=true
NOTIFICATIONS_SLACK_URL=<valid-webhook-url>
NOTIFICATIONS_SLACK_CHANNEL=<channel-without-#> -
Common Issues:
- Webhook URL is incorrect or expired
- Channel name includes the # symbol
- Maestro hasn't been restarted after changes
- Bot lacks channel permissions