Skip to main content

Mattermost (plugin)

Status: supported via plugin (bot token + WebSocket events). Channels, groups, and DMs are supported. Mattermost is a self-hostable team messaging platform; see the official site at mattermost.com for product details and downloads.

Plugin required

Mattermost ships as a plugin and is not bundled with the core install. Install via CLI (npm registry):
Local checkout (when running from a git repo):
If you choose Mattermost during configure/onboarding and a git checkout is detected, OpenClaw will offer the local install path automatically. Details: Plugins

Quick setup

  1. Install the Mattermost plugin.
  2. Create a Mattermost bot account and copy the bot token.
  3. Copy the Mattermost base URL (e.g., https://chat.example.com).
  4. Configure OpenClaw and start the gateway.
Minimal config:

Environment variables (default account)

Set these on the gateway host if you prefer env vars:
  • MATTERMOST_BOT_TOKEN=...
  • MATTERMOST_URL=https://chat.example.com
Env vars apply only to the default account (default). Other accounts must use config values.

Chat modes

Mattermost responds to DMs automatically. 1. Kanal xatti-harakati chatmode orqali boshqariladi:
    1. oncall (standart): kanallarda faqat @mention qilinganda javob beradi.
    1. onmessage: kanalga kelgan har bir xabarga javob beradi.
    1. onchar: xabar trigger prefiksi bilan boshlanganida javob beradi.
  1. Konfiguratsiya namunasi:
  1. Eslatmalar:
    1. onchar hali ham aniq @mentionlarga javob beradi.
    1. channels.mattermost.requireMention eski konfiguratsiyalar uchun qo‘llab-quvvatlanadi, ammo chatmode afzal ko‘riladi.

10. Kirish nazorati (DMlar)

    1. Standart: channels.mattermost.dmPolicy = "pairing" (noma’lum yuboruvchilar juftlash kodi oladi).
    1. Tasdiqlash orqali:
    • openclaw pairing list mattermost
    • openclaw pairing approve mattermost <CODE>
    1. Ochiq DMlar: channels.mattermost.dmPolicy="open" va channels.mattermost.allowFrom=["*"].

16. Kanallar (guruhlar)

    1. Standart: channels.mattermost.groupPolicy = "allowlist" (mention orqali cheklangan).
    1. channels.mattermost.groupAllowFrom bilan ruxsat etilgan yuboruvchilar (foydalanuvchi IDlari yoki @username).
    1. Ochiq kanallar: channels.mattermost.groupPolicy="open" (mention orqali cheklangan).

20. Chiqish (outbound) yetkazib berish uchun manzillar

  1. openclaw message send yoki cron/webhooklar bilan quyidagi manzil formatlaridan foydalaning:
    1. Kanal uchun channel:<id>
    1. DM uchun user:<id>
    1. DM uchun @username (Mattermost API orqali aniqlanadi)
  1. Prefikssiz IDlar kanal sifatida qabul qilinadi.

26. Ko‘p akkauntli ishlash

  1. Mattermost channels.mattermost.accounts ostida bir nechta akkauntni qo‘llab-quvvatlaydi:

29. Nosozliklarni bartaraf etish

    1. Kanallarda javob yo‘q: bot kanalga qo‘shilganini va uni mention qilganingizni tekshiring (oncall), trigger prefiksidan foydalaning (onchar) yoki chatmode: "onmessage" ni o‘rnating.
    1. Avtorizatsiya xatolari: bot tokeni, asosiy URL va akkaunt yoqilganligini tekshiring.
  • Multi-account issues: env vars only apply to the default account.