Rocket.Chat channel plugin for Clawdbot/Moltbot (REST + Realtime/DDP)
npm install @cloudrise/clawdbot-channel-rocketchat

Neutral, self-host friendly Rocket.Chat channel plugin for Clawdbot / Moltbot.
> Clawdbot has been renamed to Moltbot (copyright). This plugin works with both names in docs/search.
1) Create a Rocket.Chat bot user (or a dedicated user account) and obtain:
- userId
- authToken (treat like a password)
2) Add the bot user to the rooms you want it to monitor (channels/private groups). For DMs, ensure users can message the bot.
3) Install + enable the plugin in Moltbot/Clawdbot:
``yaml
plugins:
installs:
rocketchat:
source: npm
spec: "@cloudrise/clawdbot-channel-rocketchat"
entries:
rocketchat:
enabled: true
channels:
rocketchat:
baseUrl: "https://chat.example.com"
userId: "
authToken: "
# Optional: keep noise down
replyMode: auto
rooms:
GENERAL:
requireMention: true
`
4) Restart the gateway.
5) Test by @mentioning the bot in a room it’s a member of.
---
- Chad (AI assistant running in Clawdbot) — primary implementer
- Marshal Morse — project owner, requirements, infrastructure, and testing
- Inbound: Rocket.Chat Realtime (DDP/WebSocket) stream-room-messageschat.postMessage
- Outbound: Rocket.Chat REST
This repository is intended to be publishable (no secrets committed).
`bash`
npm install @cloudrise/clawdbot-channel-rocketchat
You need to tell Clawdbot to load the installed plugin.
Option A (recommended): install via plugins.installs (npm source)
Add something like this to your Clawdbot config:
`yaml`
plugins:
installs:
rocketchat:
source: npm
spec: "@cloudrise/clawdbot-channel-rocketchat"
entries:
rocketchat:
enabled: true
Option B: load from a local path
If you prefer to manage install paths manually:
`yaml`
plugins:
load:
paths:
- /absolute/path/to/node_modules/@cloudrise/clawdbot-channel-rocketchat
entries:
rocketchat:
enabled: true
Then restart the gateway.
> Use the room rid (e.g. GENERAL) for per-room settings.
`yaml`
channels:
rocketchat:
baseUrl: "https://chat.example.com"
userId: "
authToken: "
You can configure multiple Rocket.Chat “accounts” under channels.rocketchat.accounts and choose which one to use via accountId when sending.
`yaml
channels:
rocketchat:
accounts:
prod:
name: "Prod RC"
baseUrl: "https://chat.example.com"
userId: "
authToken: "
staging:
name: "Staging RC"
baseUrl: "https://chat-staging.example.com"
userId: "
authToken: "
`
Notes:
- The legacy single-account format (top-level baseUrl/userId/authToken) still works and is treated as accountId: default.channels.rocketchat.accounts.prod.rooms
- Per-room settings live under each account (e.g. ).
`yaml
channels:
rocketchat:
# thread | channel | auto
replyMode: auto
rooms:
GENERAL:
requireMention: false
# Optional per-room override
# replyMode: channel
`
Auto rules (deterministic):
- If the inbound message is already in a thread (tmid exists) → reply in that thread
- Else if the inbound message is “long” (≥280 chars or contains a newline) → reply in a thread
- Else → reply in channel
Prefix your message:
- !thread ... → force the reply to be posted as a thread reply!channel ...
- → force the reply to be posted in the channel
(The prefix is stripped before the message is sent to the agent.)
`yaml`
channels:
rocketchat:
# Delay (ms) before emitting typing indicator
typingDelayMs: 500
(When using multiple accounts, this can also be set per account at channels.rocketchat.accounts..)
Typing indicators are emitted via DDP stream-notify-room using .tmid
- Channel replies emit typing without → shows under channel composer{ tmid: ... }
- Thread replies include → shows under thread composer
Treat Rocket.Chat authToken` like a password.
MIT