IM integrations
Connecting Datyo to IM does two things:
- Ask in a group or DM: message the bot or @mention it in a group to ask, and the answer returns to the chat;
- Scheduled push: scheduled monitoring jobs push results to groups on time.
Supports DingTalk, Lark, WeCom, and personal WeChat. An integration is bound to a Space, and the bot reuses that Space's datasets and business definitions.
How each platform connects
| Platform | Method | Public URL needed | Notes |
|---|---|---|---|
| DingTalk | Create a Stream-mode bot, enter Client ID / Secret | No (only the legacy Outgoing receive path needs the callback URL) | DM and in-group @; scheduled push prefers a separate group-robot webhook |
| Lark | Create an app (long connection), enter App ID / Secret | No | DM and group chat |
| Slack | Socket Mode app, enter Bot Token / App-Level Token | No | DM and channel @mentions |
| WeCom | Self-built app, configure a callback URL | Yes | Enter the callback URL in the WeCom admin |
| Personal WeChat | Scan QR to log in | No | DM only; group messages limited by the platform |
DingTalk, Lark, Slack, and personal WeChat connect via outbound long connections, no public URL required; WeCom requires a reachable callback URL due to platform constraints.
General steps
- Open the Space's Integrations settings and pick a platform;
- Fill in the platform's required fields (secrets are masked on save):
- DingTalk: create a Stream-mode bot in the DingTalk developer console, copy Client ID and Client Secret;
- Lark: create an app in the Lark Open Platform, copy App ID and App Secret, and enable message-receive permission;
- Slack: create an app at api.slack.com and enable Socket Mode (generates an
xapp-App-Level Token withconnections:write); under OAuth & Permissions grant the botchat:write,app_mentions:read,im:history, andfiles:write, then install it to your workspace (yields thexoxb-Bot Token); under Event Subscriptions subscribe to theapp_mentionandmessage.imbot events; paste both tokens into the form; - WeCom: create a self-built app in the WeCom admin, enter Corp ID, AgentId, Secret, callback Token, and EncodingAESKey, and set the callback URL shown on the page in the WeCom admin;
- Personal WeChat: after saving, click "Scan to log in" and scan with your phone's WeChat;
- Enable the integration and send a message to test.
Access control
- Allowed users: you can set "allowed user IDs" (comma-separated) in the integration. Once set, only those users can talk to the bot.
- Only reply on @ in groups: in groups, the bot replies only when @mentioned by default, to avoid noise; DMs always reply.
- Session isolation: each person has an independent context in DMs; in a group, each member has their own context within that group, without crosstalk.
Group Q&A and follow-ups
Send a message (@mention the bot in groups) to ask, e.g. "yesterday's refund rate". Conversations keep context, so you can follow up with "now break it down by channel" and the bot builds on the previous result.
Scheduled result push
Select push channels in a scheduled monitoring job, and the job's results are pushed automatically to the connected group or chat.
Push targets differ per platform:
- DingTalk: recommended — add a custom robot to the group (signing enabled), paste the DingTalk-generated webhook URL and signing secret into the integration form;
- Lark / Slack: once the bot has been added to a group/channel and has seen a message, pick it directly in "Push target";
- WeCom: the push target is a member userid;
- Personal WeChat: the push target is the peer's user ID.
About personal WeChat
Personal WeChat connects by scanning a QR code and only guarantees DMs; due to platform limits, a scanned identity usually can't receive messages from regular WeChat groups. For reliable group capability, use WeCom.