Channels
Channels
Strings can receive messages from external platforms — Telegram, Slack, Discord, WhatsApp, and Email. These messages appear alongside direct chat in the same conversation, with colored badges showing their origin.
How Channels Work
The channel system bridges external platforms into QUI conversations:
External platform (Telegram, Slack, etc.)
→ Webhook or polling delivers message to QUI
→ Message is normalized to a common format
→ Stored in the conversation's memory
→ Appears in Strings with a channel badge
Inbound messages arrive automatically. When someone sends a message in your Telegram group, Slack channel, or Discord server, it appears in the linked String in real-time.
Outbound messages work differently — they are character-initiated. To reply through a channel, the character uses MCP tools for that platform (e.g., the Telegram MCP tool to send a Telegram message). Select the channel and recipient in the input bar's channel selector.
Key principle: QUI does not auto-reply to channel messages. Incoming messages are displayed, and you or your character decide how to respond.
Supported Platforms
| Platform | Inbound Method | Setup Required |
|---|---|---|
| Telegram | Webhook | Bot token + webhook URL |
| Slack | Webhook | App with Event Subscriptions + signing secret |
| Discord | Webhook | Bot with MESSAGE_CREATE intent + public key |
| Webhook (GreenAPI) | GreenAPI instance + webhook configuration | |
| IMAP polling | IMAP server credentials |
Setting Up a Channel
Each platform requires specific configuration. The general pattern is:
- Create credentials on the external platform — bot tokens, API keys, webhook secrets
- Configure the channel in QUI — enter credentials in the character's MCP tool configuration
- Set up the webhook URL — point the platform's webhook to your QUI instance's channel endpoint
- Verify the connection — send a test message from the platform and confirm it appears in Strings
Telegram Setup
- Create a bot via @BotFather on Telegram
- Get the bot token
- Configure the Telegram MCP node on your character with the bot token
- Set the webhook URL to your QUI instance:
https://your-domain/api/v1/channel/telegram - Set a secret token for webhook verification
Slack Setup
- Create a Slack App at api.slack.com
- Enable Event Subscriptions
- Set the Request URL to:
https://your-domain/api/v1/channel/slack - Subscribe to
message.channelsevents - Copy the Signing Secret and configure it in QUI
Discord Setup
- Create a Discord Application at discord.com/developers
- Create a Bot and get the token
- Enable MESSAGE_CREATE intent
- Set the Interactions Endpoint URL to:
https://your-domain/api/v1/channel/discord - Copy the Public Key and configure it in QUI
WhatsApp Setup
WhatsApp integration uses GreenAPI as a bridge:
- Create a GreenAPI account and instance
- Configure the instance's webhook to:
https://your-domain/api/v1/channel/whatsapp - Configure the WhatsApp MCP node with your GreenAPI credentials
Email Setup
Email uses IMAP polling (not webhooks):
- Configure IMAP server credentials (host, port, username, password)
- Set the polling interval
- Incoming emails appear with subject and body as the message content
How Channel Messages Display
Channel messages appear in the conversation with:
- Channel badge — a colored indicator showing the source platform (e.g., "Telegram", "Slack")
- Sender name — the name from the external platform
- Message content — the text content, normalized from the platform's format
- Attachments — files, images, and media from the original message (when supported)
Reply threading is preserved when possible — if someone replies to a specific message on Telegram, the reply relationship is maintained in Strings.
[Screenshot: Conversation showing mixed messages — direct chat, Telegram badge, and Slack badge]
Replying via Channel
There are two ways to send messages back through an external channel:
Reply to a Channel Message
When a channel message appears in the conversation, click the Reply dropdown on that message. The dropdown shows only characters that have the matching MCP tool enabled for that channel (e.g., only characters with the Telegram MCP node appear for Telegram messages). Select a character and it replies through the appropriate channel automatically.
Initiate an Outbound Message
The Channel Selector in the input bar lets you start a new outbound message through any configured channel. This is visible when a user entity with MCP tools is active:
- Click the channel pill in the input bar to open the channel dropdown
- Select a channel (Telegram, Email, Slack, etc.) — unconfigured channels appear greyed out
- Fill in the recipient fields that appear (e.g., chat_id for Telegram, email address for Email)
- Type your message and send
The message is sent through the user entity's MCP tools to the external platform.
Channel Binding
Each external chat/channel is bound to a specific String. When a message arrives from a new external source (a new Telegram chat, a new Slack channel), QUI automatically creates a new String and binds it. Future messages from that source go to the same String.
Bindings are cached for fast lookup and automatically maintained.
Security
- Webhook signatures are verified for each platform to prevent spoofed messages
- Telegram uses a secret token header comparison
- Slack uses HMAC-SHA256 with replay protection (rejects messages older than 5 minutes)
- Discord uses Ed25519 signature verification
- Messages older than the replay window are rejected