<!-- source: https://deepwiki.com/openclaw/openclaw/4-messaging-channels -->

# Messaging Channels

- docs/.generated/plugin-sdk-api-baseline.sha256
- docs/channels/groups.md
- docs/channels/slack.md
- docs/gateway/config-channels.md
- docs/plugins/sdk-migration.md
- docs/plugins/sdk-subpaths.md
- extensions/acpx/npm-shrinkwrap.json
- extensions/amazon-bedrock-mantle/npm-shrinkwrap.json
- extensions/amazon-bedrock/npm-shrinkwrap.json
- extensions/anthropic-vertex/npm-shrinkwrap.json
- extensions/codex/npm-shrinkwrap.json
- extensions/diagnostics-otel/npm-shrinkwrap.json
- extensions/discord/index.ts
- extensions/discord/npm-shrinkwrap.json
- extensions/github-copilot/embeddings.test.ts
- extensions/google-meet/src/realtime-node.ts
- extensions/google-meet/src/realtime.ts
- extensions/memory-core/src/memory/provider-adapters.ts
- extensions/memory-lancedb/npm-shrinkwrap.json
- extensions/slack/src/approval-auth.ts
- extensions/slack/src/approval-handler.runtime.test.ts
- extensions/slack/src/approval-handler.runtime.ts
- extensions/slack/src/approval-native-gates.ts
- extensions/slack/src/approval-native.test.ts
- extensions/slack/src/approval-native.ts
- extensions/slack/src/monitor.test-helpers.ts
- extensions/slack/src/send.ts
- extensions/slack/src/send.unfurl.test.ts
- extensions/telegram/src/status-reaction-variants.ts
- extensions/twitch/npm-shrinkwrap.json
- extensions/whatsapp/npm-shrinkwrap.json
- extensions/whatsapp/src/auto-reply/monitor/on-message.audio-preflight.test.ts
- extensions/whatsapp/src/auto-reply/monitor/on-message.ts
- npm-shrinkwrap.json
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- scripts/lib/plugin-sdk-entrypoints.json
- scripts/lib/plugin-sdk-private-local-only-subpaths.json
- src/config/types.messages.ts
- src/config/types.slack.ts
- src/plugin-sdk/entrypoints.ts
- src/plugin-sdk/memory-core-host-embedding-registry.ts
- src/plugin-sdk/realtime-voice.ts
- src/talk/output-activity-tracker.test.ts
- src/talk/output-activity-tracker.ts

This document covers OpenClaw's messaging channel integrations, which bridge external messaging platforms (Telegram, Discord, Slack, WhatsApp, Signal, Matrix, and others) to the Gateway and Agent Runtime. The focus is on how messages are received from channels, normalized into a common format, filtered through access control policies, and routed to agent sessions.

For information about the Agent Runtime that processes these messages, see [Agent Runtime](/openclaw/openclaw/3-agent-runtime). For the Gateway protocol that coordinates channel state, see [Gateway](/openclaw/openclaw/2-gateway). For platform-specific native client applications, see [Native Clients & Nodes](/openclaw/openclaw/6-native-clients-and-nodes).

## Channel Architecture

OpenClaw's channel system follows a **provider monitor pattern** where each messaging platform integration runs as a long-lived process monitoring platform message streams. This design abstracts the complexity of each platform's API into a modular, unified interface. Channels are registered via `defineChannelPluginEntry` [src/plugin-sdk/entrypoints.ts27](https://github.com/openclaw/openclaw/blob/fbdf5937/src/plugin-sdk/entrypoints.ts#L27-L27) or `createChatChannelPlugin` [docs/plugins/sdk-subpaths.md27](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/plugins/sdk-subpaths.md?plain=1#L27-L27)

### Provider Monitor Pattern Diagram

```

```

Sources: [extensions/telegram/src/bot-message-dispatch.ts161-172](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/telegram/src/bot-message-dispatch.ts#L161-L172) [extensions/discord/src/monitor/message-handler.process.ts154-157](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/discord/src/monitor/message-handler.process.ts#L154-L157) [extensions/telegram/src/sequential-key.ts100-155](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/telegram/src/sequential-key.ts#L100-L155) [extensions/whatsapp/src/auto-reply/monitor/on-message.ts1-10](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/whatsapp/src/auto-reply/monitor/on-message.ts#L1-L10) [docs/plugins/sdk-subpaths.md76-83](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/plugins/sdk-subpaths.md?plain=1#L76-L83)

The provider monitor component for each platform handles platform-specific connection, authentication, and event listening. For example, Telegram uses `grammY` [package.json122](https://github.com/openclaw/openclaw/blob/fbdf5937/package.json#L122-L122) and Discord uses `discord.js` [package.json89](https://github.com/openclaw/openclaw/blob/fbdf5937/package.json#L89-L89) These monitors transform raw events into a context that the system uses for routing via functions like `buildDiscordMessageProcessContext` [extensions/discord/src/monitor/message-handler.process.ts64](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/discord/src/monitor/message-handler.process.ts#L64-L64)

For a detailed explanation of this architecture, including docking and session reply route switching, see [Channel Architecture](/openclaw/openclaw/4.1-channel-architecture).

**Sources:**
[package.json89-122](https://github.com/openclaw/openclaw/blob/fbdf5937/package.json#L89-L122) [extensions/telegram/src/sequential-key.ts100-155](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/telegram/src/sequential-key.ts#L100-L155) [extensions/discord/src/monitor/message-handler.process.ts64](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/discord/src/monitor/message-handler.process.ts#L64-L64) [docs/plugins/sdk-subpaths.md27](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/plugins/sdk-subpaths.md?plain=1#L27-L27)

## Platform Integrations

OpenClaw supports many communication platforms with dedicated extensions, encapsulating platform-specific details.

- Telegram: Production-ready support for bot DMs, groups, and forum topics. It utilizes dispatchTelegramMessage extensions/telegram/src/bot-message-dispatch.ts 170-171 and supports complex features like stickers extensions/telegram/src/status-reaction-variants.ts 1-10
- Discord: Connects via Discord Gateway. It uses processDiscordMessage extensions/discord/src/monitor/message-handler.process.ts 154-157 to manage attachments, media resolution, and bot-loop protection.
- Slack: Supports Socket Mode and HTTP Request URLs docs/channels/slack.md 22-37 It is integrated via the @openclaw/slack plugin docs/channels/slack.md 49
- WhatsApp: Integrated via the Baileys library pnpm-workspace.yaml 18 It runs through the gateway's web channel and supports multi-account setups docs/gateway/config-channels.md 95-156
- Specialty Channels: Includes Google Meet for voice/video conferencing extensions/google-meet/src/realtime.ts 1-10 and a Voice Call plugin for Twilio/SIP telephony package.json 111

Refer to [Platform Integrations](/openclaw/openclaw/4.2-platform-integrations) for detailed per-platform documentation.

**Sources:**
[docs/channels/slack.md22-49](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/channels/slack.md?plain=1#L22-L49) [docs/gateway/config-channels.md95-156](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/gateway/config-channels.md?plain=1#L95-L156) [pnpm-workspace.yaml18](https://github.com/openclaw/openclaw/blob/fbdf5937/pnpm-workspace.yaml#L18-L18) [extensions/telegram/src/bot-message-dispatch.ts170-171](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/telegram/src/bot-message-dispatch.ts#L170-L171) [extensions/google-meet/src/realtime.ts1-10](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/google-meet/src/realtime.ts#L1-L10)

## Policy & Access Control

Robust access control protects user privacy and prevents unauthorized agent queries.

### DM & Group Policies

Access is governed by specific platform configurations:

1. DM Policy: Controls direct message access. Options include pairing (default), allowlist , open , and disabled docs/gateway/config-channels.md 25-30
2. Group Policy: Manages interaction in rooms. Options include allowlist (default), open , and disabled docs/gateway/config-channels.md 32-36
3. Mention Gating: Groups often require an explicit mention ( requireMention: true ) before the agent responds docs/channels/groups.md 18-33

### Allowlist Configuration

OpenClaw uses platform IDs for `allowFrom` and `groupAllowFrom` configurations [docs/gateway/config-channels.md118-127](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/gateway/config-channels.md?plain=1#L118-L127) The `resolveChannelDmAccess` [docs/plugins/sdk-subpaths.md76](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/plugins/sdk-subpaths.md?plain=1#L76-L76) helper determines if a specific sender is authorized. Policies can also restrict context visibility to allowlisted senders using `contextVisibility` modes [docs/gateway/config-channels.md88-91](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/gateway/config-channels.md?plain=1#L88-L91)

For details on policy enforcement, see [Policy & Access Control](/openclaw/openclaw/4.3-policy-and-access-control).

**Sources:**
[docs/gateway/config-channels.md25-91](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/gateway/config-channels.md?plain=1#L25-L91) [docs/channels/groups.md18-33](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/channels/groups.md?plain=1#L18-L33) [docs/plugins/sdk-subpaths.md76](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/plugins/sdk-subpaths.md?plain=1#L76-L76)

## Message Flow & Delivery

The message delivery pipeline handles processing inbound messages into agent sessions and formatting agent replies for each platform.

### Message Routing Diagram

```

```

Sources: [extensions/discord/src/monitor/message-handler.process.ts154-157](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/discord/src/monitor/message-handler.process.ts#L154-L157) [extensions/discord/src/monitor/message-handler.process.test.ts174-185](https://github.com/openclaw/openclaw/blob/fbdf5937/extensions/discord/src/monitor/message-handler.process.test.ts#L174-L185) [docs/plugins/sdk-subpaths.md203](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/plugins/sdk-subpaths.md?plain=1#L203-L203)

### Delivery Mechanics

- Streaming: Supports real-time streaming response updates docs/gateway/config-channels.md 189
- Deduplication: The system uses reply-dedupe scripts/lib/plugin-sdk-entrypoints.json 44 to prevent duplicate responses to the same event.
- Chunking: Text is chunked based on platform limits using text-chunking scripts/lib/plugin-sdk-entrypoints.json 92 WhatsApp, for example, defaults to a 4000 character limit docs/gateway/config-channels.md 119
- Media & TTS: Outbound media is handled by outbound-media scripts/lib/plugin-sdk-entrypoints.json 57 and text can be synthesized using tts-runtime scripts/lib/plugin-sdk-entrypoints.json 96
- Watermarking: Inbound events are watermarked to ensure exactly-once processing scripts/lib/plugin-sdk-entrypoints.json 193

For comprehensive message lifecycle mechanics, see [Message Flow & Delivery](/openclaw/openclaw/4.4-message-flow-and-delivery).

**Sources:**
[docs/gateway/config-channels.md119-189](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/gateway/config-channels.md?plain=1#L119-L189) [scripts/lib/plugin-sdk-entrypoints.json44-193](https://github.com/openclaw/openclaw/blob/fbdf5937/scripts/lib/plugin-sdk-entrypoints.json#L44-L193) [docs/plugins/sdk-subpaths.md203](https://github.com/openclaw/openclaw/blob/fbdf5937/docs/plugins/sdk-subpaths.md?plain=1#L203-L203)

This overview summarizes the multi-platform messaging channel system in OpenClaw. Detailed documentation is available in the child pages:

- Channel Architecture
- Platform Integrations
- Policy & Access Control
- Message Flow & Delivery
