Skip to content

Slack: Bot messages with empty text property don't trigger sessions #27616

@resoftware-support

Description

@resoftware-support

Problem

Bot messages in Slack with empty text property but content in attachments don't trigger agent sessions, even when allowBots: true is set in channel config.

Example Message

{
  "subtype": "bot_message",
  "text": "",
  "attachments": [
    {
      "text": "Readiness probe failed: Get \"http://10.42.13.132:8000/status\": context deadline exceeded",
      "title": "[K8S] Unhealthy: Pod/apprise-78447f9d-7ndvj"
    }
  ],
  "bot_id": "B0AGV8EQYA3",
  "ts": "1772111956.216009"
}

Config

{
  "channels": {
    "slack": {
      "channels": {
        "C0AH68CDRQD": {
          "requireMention": false,
          "allowBots": true
        }
      }
    }
  }
}

Expected Behavior

When allowBots: true, bot messages should trigger sessions regardless of whether content is in text or attachments.

Actual Behavior

Bot messages with text: "" are silently ignored. No session is created, no logs appear in gateway.log.

Use Case

Monitoring webhooks (Prometheus Alertmanager, Gatus, etc.) often send Slack messages with empty text and all content in attachments. The agent should be able to react to these alerts.

Workaround

Currently relying on humans replying in thread, which then includes the parent message context. This is not ideal for autonomous monitoring.

Suggested Fix

Extract text from attachments[].text or attachments[].fallback if message text is empty, or trigger sessions for any bot message when allowBots: true regardless of text content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions