Channel Management
Channel Management configures IM and email channels so Rex, Agents, Workflows, and Task Center can receive messages, send results, and push notifications through external entrypoints such as Feishu, WeCom, Slack, DingTalk, Telegram, WeChat, WhatsApp, and email.
1. Functional Positioning
1.1 What Channel Management Solves
Channel Management connects Flocks to the team's daily collaboration entrypoints. After channels are configured, users can trigger Rex in IM groups, direct chats, or email threads. Task Center can also push periodic task results to specified groups, users, or mailboxes.
Channel capabilities include:
- Enable or disable channels.
- Configure app credentials or bot credentials.
- View connection status, uptime, recent messages, reconnect count, and error count.
- Configure the default Agent, trigger mode, user allowlist, and advanced parameters.
- Restart connections, refresh status, save changes, and apply them.
2. Supported Channels
Common channels include:
| Channel | Typical Integration Method | Description |
|---|---|---|
| Feishu / Lark | WebSocket or Webhook | WebSocket is recommended and does not require public internet exposure; Webhook requires a public address. |
| WeCom | WebSocket long connection | WeCom group chats usually require @ mentioning the bot to trigger it. |
| DingTalk | Stream long connection | Requires creating an app in the DingTalk Open Platform and enabling Stream mode. |
| Slack | Socket Mode | Connects proactively to Slack through a Slack App Token, with no public callback required. |
| Telegram | Polling or Webhook | Polling does not require public internet exposure; Webhook requires a public URL. |
| iLink Bot long polling | Obtains Token and Account ID through QR-code login. | |
| Linked Devices QR-code pairing | Connects through WhatsApp Linked Devices, with no public callback required. | |
| Email integration | IMAP polling + SMTP sending | Uses a dedicated mailbox to receive new emails and reply in email threads, with no public callback required. |
3. Configuration Flow
3.1 Select a Channel
Go to Agent Studio -> Channel Management and select the channel to configure from the left side. The page shows whether the channel is enabled, running, and connected, as well as its configurable fields.
3.2 Enter Credentials
Different channels require different credentials:
- Feishu: App ID, App Secret, and optional Encrypt Key and Verification Token in Webhook mode.
- WeCom: Bot ID, Secret, and optional WebSocket address.
- DingTalk: Client ID and Client Secret.
- Slack: Bot Token and App-Level Token. Socket Mode requires
connections:write. - Telegram: Bot Token. Webhook mode requires Webhook Secret.
- WeChat: iLink Bot Token and Account ID, available through QR-code login.
- WhatsApp: local session credentials obtained through WebUI QR-code pairing.
- Email integration: email address, app-specific password or authorization code, and IMAP / SMTP hosts and ports.
3.3 Configure Message Behavior
Channels usually support:
- Default Agent.
- Group chat trigger mode.
- Allowed users or groups.
- Direct message policy.
- Group chat context message count.
- Whether streaming output is enabled.
3.4 Save and Apply
After saving the configuration, you can enable the channel or restart the connection. Check that the connection status changes to running, then send a test message in IM to confirm whether Rex responds.
4. Use Cases
4.1 Trigger Rex in an IM Group
After configuring a channel, you can submit tasks directly in a group, for example:
@Rex Help me check whether this alert needs to be escalated.Rex processes the task based on the channel context, default Agent, and current configuration.
4.2 Push Task Center Results
Task Center can send periodic task results to a specified channel, for example:
Run a device inspection every day at 08:00 and send the result to the WeCom on-call group.4.3 Push Workflow Run Results
A Workflow can send a summary, report link, or high-risk event alert from its final node. This is suitable for alert investigation, daily reports, asset changes, abnormal device health, and similar scenarios.
4.4 Use session_id to Pin Delivery to a Specific IM Conversation
Flocks establishes conversation bindings for external conversations. A WeCom, Feishu, Slack, DingTalk, Telegram, or WhatsApp direct chat or group chat, an email thread, or a group sub-conversation isolated by integration settings map to a Flocks session_id. Later, as long as this session_id is specified, the system can find the bound external conversation and push the message back to the fixed location.
Getting the target session_id is simple. Ask Rex in the target IM conversation or email thread:
What is your session_id?You can also send this in the IM conversation:
/statusRex returns the current Session, Agent, model, and IM conversation information. After you get the session_id, you can send this in another conversation:
Send to session_id: <session_id>: This inspection is complete. Three abnormal devices were found. See the report for details.This method is suitable for multi-group, multi-channel, and scheduled-task scenarios. Using the Flocks session_id directly makes it easier to pass targets across the WebUI, Task Center, Workflow, and IM conversations.
If you want to push Task Center or Workflow results to an IM group over the long term, first obtain the session_id in that group, then write it into the task description, Workflow parameters, or the target description when Rex creates the task.
5. FAQ
5.1 How Should I Choose Between WebSocket and Webhook?
Use WebSocket first when available because it does not require a public callback address. Webhook is suitable when you already have a public entrypoint and want the platform to push events proactively.
5.2 Why Does the Group Chat Not Respond?
Verify the following:
- Whether the channel is enabled and running.
- Whether the group chat requires @ mentioning the bot.
- Whether the user or group is in the allowlist.
- Whether the default Agent is configured correctly.
- Whether logs show connection errors or message deduplication.
5.3 What If the Result Is Too Long?
Configure advanced parameters such as message chunk length, streaming output, and sending rate limits. For long reports, let Rex write the full report to Workspace and send only the summary and file path in the channel.
6. Related Modules
- Task Center: periodic task result delivery.
- Workflow: external delivery of workflow results.
- Agent: default handler role for channel messages.
- Workspace: storage location for long reports and artifacts.
- Deployment and Configuration - Messaging & Alerting Integrations: integration setup details and dedicated pages.