{ "title": "Mattermost (plugin)", "content": "Status: supported via plugin (bot token + WebSocket events). Channels, groups, and DMs are supported.\nMattermost is a self-hostable team messaging platform; see the official site at\n[mattermost.com](https://mattermost.com) for product details and downloads.\n\nMattermost ships as a plugin and is not bundled with the core install.\n\nInstall via CLI (npm registry):\n\nLocal checkout (when running from a git repo):\n\nIf you choose Mattermost during configure/onboarding and a git checkout is detected,\nOpenClaw will offer the local install path automatically.\n\nDetails: [Plugins](/plugin)\n\n1. Install the Mattermost plugin.\n2. Create a Mattermost bot account and copy the **bot token**.\n3. Copy the Mattermost **base URL** (e.g., `https://chat.example.com`).\n4. Configure OpenClaw and start the gateway.\n\n## Environment variables (default account)\n\nSet these on the gateway host if you prefer env vars:\n\n* `MATTERMOST_BOT_TOKEN=...`\n* `MATTERMOST_URL=https://chat.example.com`\n\nEnv vars apply only to the **default** account (`default`). Other accounts must use config values.\n\nMattermost responds to DMs automatically. Channel behavior is controlled by `chatmode`:\n\n* `oncall` (default): respond only when @mentioned in channels.\n* `onmessage`: respond to every channel message.\n* `onchar`: respond when a message starts with a trigger prefix.\n\n* `onchar` still responds to explicit @mentions.\n* `channels.mattermost.requireMention` is honored for legacy configs but `chatmode` is preferred.\n\n## Access control (DMs)\n\n* Default: `channels.mattermost.dmPolicy = \"pairing\"` (unknown senders get a pairing code).\n* Approve via:\n * `openclaw pairing list mattermost`\n * `openclaw pairing approve mattermost `\n* Public DMs: `channels.mattermost.dmPolicy=\"open\"` plus `channels.mattermost.allowFrom=[\"*\"]`.\n\n* Default: `channels.mattermost.groupPolicy = \"allowlist\"` (mention-gated).\n* Allowlist senders with `channels.mattermost.groupAllowFrom` (user IDs or `@username`).\n* Open channels: `channels.mattermost.groupPolicy=\"open\"` (mention-gated).\n\n## Targets for outbound delivery\n\nUse these target formats with `openclaw message send` or cron/webhooks:\n\n* `channel:` for a channel\n* `user:` for a DM\n* `@username` for a DM (resolved via the Mattermost API)\n\nBare IDs are treated as channels.\n\nMattermost supports multiple accounts under `channels.mattermost.accounts`:\n\n* No replies in channels: ensure the bot is in the channel and mention it (oncall), use a trigger prefix (onchar), or set `chatmode: \"onmessage\"`.\n* Auth errors: check the bot token, base URL, and whether the account is enabled.\n* Multi-account issues: env vars only apply to the `default` account.", "code_samples": [ { "code": "Local checkout (when running from a git repo):", "language": "unknown" }, { "code": "If you choose Mattermost during configure/onboarding and a git checkout is detected,\nOpenClaw will offer the local install path automatically.\n\nDetails: [Plugins](/plugin)\n\n## Quick setup\n\n1. Install the Mattermost plugin.\n2. Create a Mattermost bot account and copy the **bot token**.\n3. Copy the Mattermost **base URL** (e.g., `https://chat.example.com`).\n4. Configure OpenClaw and start the gateway.\n\nMinimal config:", "language": "unknown" }, { "code": "## Environment variables (default account)\n\nSet these on the gateway host if you prefer env vars:\n\n* `MATTERMOST_BOT_TOKEN=...`\n* `MATTERMOST_URL=https://chat.example.com`\n\nEnv vars apply only to the **default** account (`default`). Other accounts must use config values.\n\n## Chat modes\n\nMattermost responds to DMs automatically. Channel behavior is controlled by `chatmode`:\n\n* `oncall` (default): respond only when @mentioned in channels.\n* `onmessage`: respond to every channel message.\n* `onchar`: respond when a message starts with a trigger prefix.\n\nConfig example:", "language": "unknown" }, { "code": "Notes:\n\n* `onchar` still responds to explicit @mentions.\n* `channels.mattermost.requireMention` is honored for legacy configs but `chatmode` is preferred.\n\n## Access control (DMs)\n\n* Default: `channels.mattermost.dmPolicy = \"pairing\"` (unknown senders get a pairing code).\n* Approve via:\n * `openclaw pairing list mattermost`\n * `openclaw pairing approve mattermost `\n* Public DMs: `channels.mattermost.dmPolicy=\"open\"` plus `channels.mattermost.allowFrom=[\"*\"]`.\n\n## Channels (groups)\n\n* Default: `channels.mattermost.groupPolicy = \"allowlist\"` (mention-gated).\n* Allowlist senders with `channels.mattermost.groupAllowFrom` (user IDs or `@username`).\n* Open channels: `channels.mattermost.groupPolicy=\"open\"` (mention-gated).\n\n## Targets for outbound delivery\n\nUse these target formats with `openclaw message send` or cron/webhooks:\n\n* `channel:` for a channel\n* `user:` for a DM\n* `@username` for a DM (resolved via the Mattermost API)\n\nBare IDs are treated as channels.\n\n## Multi-account\n\nMattermost supports multiple accounts under `channels.mattermost.accounts`:", "language": "unknown" } ], "headings": [ { "level": "h2", "text": "Plugin required", "id": "plugin-required" }, { "level": "h2", "text": "Quick setup", "id": "quick-setup" }, { "level": "h2", "text": "Environment variables (default account)", "id": "environment-variables-(default-account)" }, { "level": "h2", "text": "Chat modes", "id": "chat-modes" }, { "level": "h2", "text": "Access control (DMs)", "id": "access-control-(dms)" }, { "level": "h2", "text": "Channels (groups)", "id": "channels-(groups)" }, { "level": "h2", "text": "Targets for outbound delivery", "id": "targets-for-outbound-delivery" }, { "level": "h2", "text": "Multi-account", "id": "multi-account" }, { "level": "h2", "text": "Troubleshooting", "id": "troubleshooting" } ], "url": "llms-txt#mattermost-(plugin)", "links": [] }