Skip to main content
Channels connect nanobot to chat platforms. Each channel has its own configuration section under channels.

Global Channel Settings

channels.sendProgress
boolean
default:true
Stream agent’s text progress to the channel in real-time.
channels.sendToolHints
boolean
default:false
Stream tool-call hints (e.g. read_file("...")) to show what the agent is doing.

Channel Configurations

Telegram

Uses long polling — no webhook or public IP required.
channels.telegram.enabled
boolean
default:false
required
Enable Telegram channel.
channels.telegram.token
string
required
Bot token from @BotFather.
channels.telegram.allowFrom
array
default:[]
Allowed user IDs or usernames. Empty = allow all (v0.1.4.post3 and earlier); newer versions require ["*"] for all.
channels.telegram.proxy
string
HTTP/SOCKS5 proxy URL (e.g. "http://127.0.0.1:7890" or "socks5://127.0.0.1:1080").
channels.telegram.replyToMessage
boolean
default:false
If true, bot replies quote the original user message.
{
  "channels": {
    "telegram": {
      "enabled": true,
      "token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
      "allowFrom": ["@yourUsername", "123456789"]
    }
  }
}

Discord

Requires Message Content intent enabled in Discord Developer Portal.
channels.discord.enabled
boolean
default:false
required
Enable Discord channel.
channels.discord.token
string
required
Bot token from Discord Developer Portal.
channels.discord.allowFrom
array
default:[]
Allowed user IDs. Empty = allow all users.
channels.discord.gatewayUrl
string
default:"wss://gateway.discord.gg/?v=10&encoding=json"
Discord Gateway WebSocket URL.
channels.discord.intents
integer
default:37377
Gateway intents bitmask. Default includes: GUILDS + GUILD_MESSAGES + DIRECT_MESSAGES + MESSAGE_CONTENT.
channels.discord.groupPolicy
string
default:"mention"
How to respond in group channels:
  • "mention" — Only respond when @mentioned
  • "open" — Respond to all messages
{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "your-bot-token",
      "allowFrom": ["123456789012345678"],
      "groupPolicy": "mention"
    }
  }
}

WhatsApp

Requires Node.js ≥18 and uses QR code pairing.
channels.whatsapp.enabled
boolean
default:false
required
Enable WhatsApp channel.
channels.whatsapp.bridgeUrl
string
default:"ws://localhost:3001"
WebSocket URL for WhatsApp bridge.
channels.whatsapp.bridgeToken
string
Shared token for bridge authentication (optional but recommended).
channels.whatsapp.allowFrom
array
default:[]
Allowed phone numbers (e.g. ["+1234567890"]).
WhatsApp Configuration
{
  "channels": {
    "whatsapp": {
      "enabled": true,
      "bridgeUrl": "ws://localhost:3001",
      "bridgeToken": "your-secret-token",
      "allowFrom": ["+1234567890"]
    }
  }
}
Setup:
# Terminal 1: Start bridge and scan QR
nanobot channels login

# Terminal 2: Start gateway
nanobot gateway

Slack

Uses Socket Mode — no public URL required.
channels.slack.enabled
boolean
default:false
required
Enable Slack channel.
channels.slack.mode
string
default:"socket"
Connection mode (only "socket" supported currently).
channels.slack.botToken
string
required
Bot token (xoxb-...) from OAuth & Permissions.
channels.slack.appToken
string
required
App-Level token (xapp-...) from Socket Mode settings.
channels.slack.userTokenReadOnly
boolean
default:true
Use user token for read-only operations.
channels.slack.replyInThread
boolean
default:true
Reply in threads instead of channel root.
channels.slack.reactEmoji
string
default:"eyes"
Emoji reaction to acknowledge messages (e.g. "eyes", "robot_face").
channels.slack.allowFrom
array
default:[]
Allowed Slack user IDs (sender-level access control).
channels.slack.groupPolicy
string
default:"mention"
Group/channel response policy:
  • "mention" — Only respond when @mentioned
  • "open" — Respond to all messages
  • "allowlist" — Only respond in allowed channels
channels.slack.groupAllowFrom
array
default:[]
Allowed channel IDs (used when groupPolicy is "allowlist").
channels.slack.dm.enabled
boolean
default:true
Enable DM responses.
channels.slack.dm.policy
string
default:"open"
DM response policy: "open" or "allowlist".
channels.slack.dm.allowFrom
array
default:[]
Allowed user IDs for DMs (used when policy is "allowlist").
{
  "channels": {
    "slack": {
      "enabled": true,
      "botToken": "xoxb-your-bot-token",
      "appToken": "xapp-your-app-token",
      "allowFrom": ["U01234ABCDE"],
      "groupPolicy": "mention"
    }
  }
}

Feishu (飞书)

Uses WebSocket long connection — no public IP required.
channels.feishu.enabled
boolean
default:false
required
Enable Feishu channel.
channels.feishu.appId
string
required
App ID from Feishu Open Platform.
channels.feishu.appSecret
string
required
App Secret from Feishu Open Platform.
channels.feishu.encryptKey
string
Encrypt Key for event subscription (optional for WebSocket mode).
channels.feishu.verificationToken
string
Verification Token for event subscription (optional for WebSocket mode).
channels.feishu.allowFrom
array
default:[]
Allowed user open_ids. Use ["*"] to allow all users.
channels.feishu.reactEmoji
string
default:"THUMBSUP"
Emoji type for message reactions (e.g. THUMBSUP, OK, DONE, SMILE).
Feishu Configuration
{
  "channels": {
    "feishu": {
      "enabled": true,
      "appId": "cli_xxx",
      "appSecret": "xxx",
      "allowFrom": ["ou_YOUR_OPEN_ID"],
      "reactEmoji": "THUMBSUP"
    }
  }
}

DingTalk (钉钉)

Uses Stream Mode — no public IP required.
channels.dingtalk.enabled
boolean
default:false
required
Enable DingTalk channel.
channels.dingtalk.clientId
string
required
AppKey (Client ID) from DingTalk Open Platform.
channels.dingtalk.clientSecret
string
required
AppSecret (Client Secret) from DingTalk Open Platform.
channels.dingtalk.allowFrom
array
default:[]
Allowed staff IDs. Use ["*"] to allow all users.
DingTalk Configuration
{
  "channels": {
    "dingtalk": {
      "enabled": true,
      "clientId": "YOUR_APP_KEY",
      "clientSecret": "YOUR_APP_SECRET",
      "allowFrom": ["YOUR_STAFF_ID"]
    }
  }
}

QQ (QQ单聊)

Uses botpy SDK with WebSocket — no public IP required. Currently supports private messages only.
channels.qq.enabled
boolean
default:false
required
Enable QQ channel.
channels.qq.appId
string
required
App ID from QQ Open Platform (q.qq.com).
channels.qq.secret
string
required
App Secret from QQ Open Platform.
channels.qq.allowFrom
array
default:[]
Allowed user openids. Empty = public access, ["*"] = explicit public access.
QQ Configuration
{
  "channels": {
    "qq": {
      "enabled": true,
      "appId": "YOUR_APP_ID",
      "secret": "YOUR_APP_SECRET",
      "allowFrom": ["YOUR_OPENID"]
    }
  }
}

Matrix (Element)

Requires pip install nanobot-ai[matrix] for E2EE support.
channels.matrix.enabled
boolean
default:false
required
Enable Matrix channel.
channels.matrix.homeserver
string
default:"https://matrix.org"
Matrix homeserver URL.
channels.matrix.accessToken
string
required
Access token for bot account.
channels.matrix.userId
string
required
Matrix user ID (e.g. @bot:matrix.org).
channels.matrix.deviceId
string
required
Device ID (needed to persist E2EE state across restarts).
channels.matrix.e2eeEnabled
boolean
default:true
Enable end-to-end encryption support.
channels.matrix.syncStopGraceSeconds
integer
default:2
Max seconds to wait for sync loop to stop gracefully before cancellation.
channels.matrix.maxMediaBytes
integer
default:20971520
Max attachment size in bytes (default: 20MB).
channels.matrix.allowFrom
array
default:[]
Allowed user IDs. Empty = all senders allowed.
channels.matrix.groupPolicy
string
default:"open"
Group/room response policy:
  • "open" — Respond to all messages
  • "mention" — Only respond when mentioned
  • "allowlist" — Only respond in allowed rooms
channels.matrix.groupAllowFrom
array
default:[]
Allowed room IDs (used when groupPolicy is "allowlist").
channels.matrix.allowRoomMentions
boolean
default:false
Accept @room mentions in mention mode.
Matrix Configuration
{
  "channels": {
    "matrix": {
      "enabled": true,
      "homeserver": "https://matrix.org",
      "userId": "@nanobot:matrix.org",
      "accessToken": "syt_xxx",
      "deviceId": "NANOBOT01",
      "e2eeEnabled": true,
      "allowFrom": ["@your_user:matrix.org"],
      "groupPolicy": "mention"
    }
  }
}

Email

Polls IMAP for incoming mail and replies via SMTP.
channels.email.enabled
boolean
default:false
required
Enable Email channel.
Explicit permission to access mailbox data. Must be true to enable.
channels.email.imapHost
string
required
IMAP server hostname (e.g. imap.gmail.com).
channels.email.imapPort
integer
default:993
IMAP server port.
channels.email.imapUsername
string
required
IMAP username (usually your email address).
channels.email.imapPassword
string
required
IMAP password or app password.
channels.email.imapMailbox
string
default:"INBOX"
IMAP mailbox to monitor.
channels.email.imapUseSsl
boolean
default:true
Use SSL for IMAP connection.
channels.email.smtpHost
string
required
SMTP server hostname (e.g. smtp.gmail.com).
channels.email.smtpPort
integer
default:587
SMTP server port.
channels.email.smtpUsername
string
required
SMTP username (usually your email address).
channels.email.smtpPassword
string
required
SMTP password or app password.
channels.email.smtpUseTls
boolean
default:true
Use STARTTLS for SMTP connection.
channels.email.smtpUseSsl
boolean
default:false
Use SSL/TLS for SMTP connection (port 465).
channels.email.fromAddress
string
required
Email address to send from.
channels.email.autoReplyEnabled
boolean
default:true
If false, read emails but don’t send automatic replies.
channels.email.pollIntervalSeconds
integer
default:30
How often to check for new emails (seconds).
channels.email.markSeen
boolean
default:true
Mark processed emails as seen.
channels.email.maxBodyChars
integer
default:12000
Maximum email body characters to process.
channels.email.subjectPrefix
string
default:"Re: "
Subject line prefix for replies.
channels.email.allowFrom
array
default:[]
Allowed sender email addresses.
{
  "channels": {
    "email": {
      "enabled": true,
      "consentGranted": true,
      "imapHost": "imap.gmail.com",
      "imapPort": 993,
      "imapUsername": "[email protected]",
      "imapPassword": "your-app-password",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587,
      "smtpUsername": "[email protected]",
      "smtpPassword": "your-app-password",
      "fromAddress": "[email protected]",
      "allowFrom": ["[email protected]"]
    }
  }
}

Mochat

Uses Socket.IO WebSocket by default, with HTTP polling fallback.
channels.mochat.enabled
boolean
default:false
required
Enable Mochat channel.
channels.mochat.baseUrl
string
default:"https://mochat.io"
Mochat API base URL.
channels.mochat.socketUrl
string
Socket.IO server URL (defaults to baseUrl if empty).
channels.mochat.socketPath
string
default:"/socket.io"
Socket.IO endpoint path.
channels.mochat.clawToken
string
required
Claw API token for authentication.
channels.mochat.agentUserId
string
required
Agent’s user ID in Mochat.
channels.mochat.sessions
array
default:[]
Session IDs to monitor. Use ["*"] for all sessions.
channels.mochat.panels
array
default:[]
Panel IDs to monitor. Use ["*"] for all panels.
channels.mochat.allowFrom
array
default:[]
Allowed user IDs.
channels.mochat.replyDelayMode
string
default:"non-mention"
Reply delay mode: "off" or "non-mention".
channels.mochat.replyDelayMs
integer
default:120000
Reply delay in milliseconds (default: 2 minutes).
Mochat Configuration
{
  "channels": {
    "mochat": {
      "enabled": true,
      "baseUrl": "https://mochat.io",
      "clawToken": "claw_xxx",
      "agentUserId": "6982abcdef",
      "sessions": ["*"],
      "panels": ["*"],
      "replyDelayMode": "non-mention",
      "replyDelayMs": 120000
    }
  }
}

Running Multiple Channels

You can enable multiple channels simultaneously:
Multiple Channels
{
  "channels": {
    "telegram": {
      "enabled": true,
      "token": "...",
      "allowFrom": ["@yourUsername"]
    },
    "discord": {
      "enabled": true,
      "token": "...",
      "allowFrom": ["123456789012345678"]
    },
    "slack": {
      "enabled": true,
      "botToken": "xoxb-...",
      "appToken": "xapp-..."
    }
  }
}

Next Steps

MCP Servers

Connect external tools via Model Context Protocol

Security

Configure access controls and sandboxing

Build docs developers (and LLMs) love