Skip to main content

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
WhatsApp Webhook (GreenAPI) GreenAPI instance + webhook configuration
Email IMAP polling IMAP server credentials

Setting Up a Channel

Each platform requires specific configuration. The general pattern is:

  1. Create credentials on the external platform — bot tokens, API keys, webhook secrets
  2. Configure the channel in QUI — enter credentials in the character's MCP tool configuration
  3. Set up the webhook URL — point the platform's webhook to your QUI instance's channel endpoint
  4. Verify the connection — send a test message from the platform and confirm it appears in Strings

Telegram Setup

  1. Create a bot via @BotFather on Telegram
  2. Get the bot token
  3. Configure the Telegram MCP node on your character with the bot token
  4. Set the webhook URL to your QUI instance: https://your-domain/api/v1/channel/telegram
  5. Set a secret token for webhook verification

Slack Setup

  1. Create a Slack App at api.slack.com
  2. Enable Event Subscriptions
  3. Set the Request URL to: https://your-domain/api/v1/channel/slack
  4. Subscribe to message.channels events
  5. Copy the Signing Secret and configure it in QUI

Discord Setup

  1. Create a Discord Application at discord.com/developers
  2. Create a Bot and get the token
  3. Enable MESSAGE_CREATE intent
  4. Set the Interactions Endpoint URL to: https://your-domain/api/v1/channel/discord
  5. Copy the Public Key and configure it in QUI

WhatsApp Setup

WhatsApp integration uses GreenAPI as a bridge:

  1. Create a GreenAPI account and instance
  2. Configure the instance's webhook to: https://your-domain/api/v1/channel/whatsapp
  3. Configure the WhatsApp MCP node with your GreenAPI credentials

Email Setup

Email uses IMAP polling (not webhooks):

  1. Configure IMAP server credentials (host, port, username, password)
  2. Set the polling interval
  3. 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:

  1. Click the channel pill in the input bar to open the channel dropdown
  2. Select a channel (Telegram, Email, Slack, etc.) — unconfigured channels appear greyed out
  3. Fill in the recipient fields that appear (e.g., chat_id for Telegram, email address for Email)
  4. 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
Updated on Mar 21, 2026