Data Agent supports integration with WeCom bots. After configuration, you can interact with a Data Agent instance through WeCom group chats or direct messages.
Overview
Data Agent is an AI assistant built into the DataWorks platform. It provides built-in skills for data integration, data development, data governance, and data security. You can use natural language to create data synchronization tasks, generate and debug SQL statements, troubleshoot data quality issues, and query data lineage. The IM channel feature allows you to connect a Data Agent instance to instant messaging tools such as DingTalk, Lark, and WeCom as a bot. After the connection is established, team members can invoke all capabilities of Data Agent by mentioning the bot in their daily communication tool, without having to log on to the DataWorks console.
Prerequisites
A Data Agent instance is created and is in the Running state.
A resource group is bound to the Data Agent instance. This is a prerequisite for testing network connectivity.
You have administrator permissions on the WeCom Admin Console.
Step 1: Create a WeCom bot
Log on to the WeCom Admin Console to create a bot and obtain the credentials for connecting Data Agent to WeCom.
Log on to the WeCom Admin Console. In the left-side navigation pane, click Management Tools > Smart Bots.
Click Create Bot. Select Manual Creation and then select API Mode.
Configure the Visibility Scope to specify which members can see the bot. Enter the bot name, icon, and other information.
Set the connection method to Long Connection.
After the bot is created, copy and save the Bot ID and Secret. You will need them later when you configure the Data Agent channel.
Click Save.
Step 2: Test network connectivity
Before you configure the WeCom IM channel, make sure that the network connection between the Data Agent instance and WeCom is established.
Log on to the DataWorks console. In the left-side navigation pane, click Data Agent. Open the target instance.
In the left-side navigation pane, click IM Channels.
The IM Channels page displays channel cards for DingTalk, Lark, and WeCom. Each card shows the current configuration status, network status, and enablement status.
On the WeCom channel card, click Test Network Connectivity to verify the network connection between Data Agent and WeCom.
If the channel card shows Connected, the network is ready. Proceed to the next step to configure the IM channel.
If the channel card shows Unreachable, proceed to enable the channel network.
(Required only if the connectivity test fails) Click Enable Channel Network.
Data Agent provides a Minimal Setup (recommended) option: only the unreachable channel domains are configured with PrivateZone and PrivateLink, minimizing the impact scope.
NoteMinimal Setup is a VPC-level network change. After the setup is complete, other instances in the same VPC can also access the corresponding channel domains. Before you proceed, make sure that all instances in the VPC can share this network access scope.
In the vSwitch Zone drop-down list, select a vSwitch for each availability zone. Click Connect with One Click. The system automatically configures PrivateZone DNS resolution and PrivateLink. The setup takes approximately 1 to 5 minutes.
To have more granular control over the network configuration, click Manage Network to go to the resource group network configuration page. Click Retest to retest the connectivity of each channel at any time.
After the setup is complete, the system automatically retests the connectivity. After you confirm that the channel card shows Connected, proceed to configure the IM channel.
Step 3: Configure the WeCom IM channel
After the network connection is established, configure the WeCom bot credentials to connect Data Agent to WeCom.
On the WeCom channel card, click Configure. In the IM channel configuration dialog box, configure the following parameters:
Parameter
Description
Bot ID
The Bot ID of the WeCom smart bot obtained in Step 1.
Secret
The Secret of the WeCom smart bot obtained in Step 1.
Click Advanced Settings to expand additional settings. Configure the following parameters as needed:
Category
Parameter
Description
Session Management
Session Isolation
Specifies whether conversation contexts are isolated between different users or group chats. Valid values:
By User: Each user has an independent conversation context.
By Group/Topic: Messages in the same group chat or topic share one conversation. This is suitable for group collaboration scenarios.
Shared: All users share the same conversation context.
Permission Management
User Access
Specifies which users can interact with the bot. Valid values:
All Members: All members in the organization can use the bot.
Allowlist Only: Only users in the allowlist can use the bot.
Pairing: Access is controlled through user pairing rules.
Allow Group Chat
When enabled, the bot responds only when mentioned or replied to in group chats. You can further configure the Responsive Group Chats scope:
All Group Chats: The bot responds in all group chats.
Specified Group Chats: The bot responds only in specified group chats.
Click Save after you complete the configuration.
Step 4: Test the WeCom bot
After the configuration is complete, add the bot to WeCom and test it.
Group chat test
Add the bot to a WeCom group chat.
In the group chat, mention the bot by using @bot to send a message. If the bot responds normally, it will return responses correspondingly.
Direct message test
In WeCom, search for the bot name and click the bot avatar to start a direct message conversation.
Send a message to the bot directly. ard, and verify that the bot credentials are properly configured.