Skip to main content

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:

  1. Slack Integration Token for your organization
  2. Slack Channel where notifications will be sent

Setting up Slack Integration

  1. 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 integration
      • NOTIFICATIONS_SLACK_NOTIFIEDON: Controls which notification types are sent
      • NOTIFICATIONS_SLACK_URL: Your webhook URL for message delivery
      • NOTIFICATIONS_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:
        1. Error notifications
        2. Warning notifications
        3. Informational notifications
    • Message Formatting:

      • Supports Slack's markdown-style formatting
      • Code blocks use triple backticks
      • Includes emoji shortcuts
      • Message length controlled by NOTIFICATIONS_SLACK_MAXDATALENGTH
    Message Templates

    The 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:

  1. Verify Configuration:

    # Check these settings first
    NOTIFICATIONS_SLACK_ENABLED=true
    NOTIFICATIONS_SLACK_URL=<valid-webhook-url>
    NOTIFICATIONS_SLACK_CHANNEL=<channel-without-#>
  2. Common Issues:

    • Webhook URL is incorrect or expired
    • Channel name includes the # symbol
    • Maestro hasn't been restarted after changes
    • Bot lacks channel permissions

Additional Resources