WeChat Work Integration Guide
This guide will help you configure a Tencent WorkBuddy bot in WeChat Work (WeCom), so you can remotely control Tencent WorkBuddy on your computer to complete tasks anytime, anywhere.
Prerequisites
Before you begin, make sure you have:
- Tencent WorkBuddy installed on your computer with the Claw remote control feature enabled
- A WeChat Work (WeCom) account with permission to create intelligent bots
Depending on your account role, the entry point differs:
- Admin: Go to the WeCom Admin Console → Management Tools → Intelligent Bots → Create Bot → API Mode
- Regular member: In the WeCom client, go to Workbench → Intelligent Bot App → Create Bot → Manual Creation → API Mode
Tip: If you don't have a WeChat Work account yet, you can register a free organization at the WeChat Work website.
Step 1: Create an Intelligent Bot
Choose your entry point
- Admin: Open your browser and go to the WeCom Admin Console. After logging in, navigate to Security & Management → Management Tools → Intelligent Bots → Create Bot.
- Regular member: Open the WeCom client, go to Workbench → Intelligent Bot App → Create Bot.
Switch to API Mode
On the bot creation page:
- Admin: Select API Mode Creation directly.
- Regular member: If the AI auto-generation page opens first, click Manual Creation in the bottom-left corner, then select API Mode Creation.
About API Mode:
WeCom API Mode supports two connection types. The WebSocket (Long Connection) mode is recommended:
- WebSocket Long Connection (Recommended): Just fill in your
Bot IDandSecretin Tencent WorkBuddy — no Webhook URL needed.- URL Callback: Suitable for server/webhook scenarios. Requires filling in
TokenandEncoding-AESKeyin Tencent WorkBuddy, then copying the generated Webhook URL back to WeCom.This guide covers the Long Connection mode. See the URL Callback section at the bottom for the alternative.
Step 2: Complete Common Configuration
Before setting up the connection, fill in the basic bot information:
| Field | Description |
|---|---|
| Bot name | A recognizable name, e.g. "Tencent WorkBuddy Assistant" |
| Visible scope | Select which employees, departments, or tags can use this bot |
Click Add next to Visible Scope to select members, departments, or tags.
After completing the configuration, click Save at the bottom of the page. Then, in the API Configuration panel on the right, select Use Long Connection.
Step 3: Configure Long Connection (Recommended)
Get Bot ID and Secret from WeCom
- In the API Configuration section, select Use Long Connection.
- Copy the Bot ID.
- Click Click to Get to retrieve the Secret, and save it securely.
Tip: In Long Connection mode, you do not need to fill in any URL, Token, or Encoding-AESKey.
Register in Tencent WorkBuddy
- Open Tencent WorkBuddy and click your avatar in the top-right corner, then select Claw Settings.
- In the Integrations (BETA) section, find WeCom AIBot Integration and click Configure.
- In the dialog, select WebSocket Long Connection, then enter the Bot ID and Secret you just copied.
- Click Register to complete the setup.
Step 4: Start Using
Once configured, you can chat with the bot directly in WeChat Work.
Find your bot
In the WeCom contacts list, under the Created by Company group, find the bot you just created and click Send Message to start sending tasks.
Test the connection
Send a simple message (e.g. "Hello") to test the connection. If configured correctly, Tencent WorkBuddy will receive the message and reply in WeChat Work.
Congratulations! If the bot responds correctly, you have successfully connected Tencent WorkBuddy to WeChat Work!
URL Callback Alternative
If you need to use Webhook callback mode (e.g. due to network or deployment constraints), follow these steps instead.
Get callback credentials from WeCom
- In the API Configuration section, select Use URL Callback.
- Click the Random Generate button next to the
TokenandEncoding-AESKeyfields. - Save both values — you will need them in Tencent WorkBuddy.
Important: Make sure to save the
TokenandEncoding-AESKey. You won't be able to complete registration without them.
Generate Webhook URL in Tencent WorkBuddy
- Open Tencent WorkBuddy, go to Claw Settings → WeCom AIBot Integration → Configure.
- Switch to Use URL Callback mode.
- Enter the
TokenandEncoding-AESKeyyou just obtained, then click Register. - After successful registration, copy the generated Webhook URL.
Paste the URL back to WeCom
- Return to the bot creation page in WeCom.
- Paste the copied Webhook URL into the
URLfield. - Click Save to complete the configuration.
Troubleshooting
Bot not responding
- Check Tencent WorkBuddy status: Make sure Tencent WorkBuddy is running and the Claw service is active.
- Check connection type: Confirm that WeCom and Tencent WorkBuddy are both set to the same connection mode.
- Check credentials: For Long Connection, verify the
Bot IDandSecret. For URL Callback, verify theTokenandEncoding-AESKey. - Check network: Make sure your computer has an active internet connection.
URL verification failed
- Make sure Tencent WorkBuddy is running.
- Check that the Claw service has started successfully.
- Re-copy the Webhook URL and make sure there are no extra or missing characters.
- Confirm the
TokenandEncoding-AESKeyexactly match what is configured in Tencent WorkBuddy.
Long Connection registration failed
- Confirm that Use Long Connection is selected on the WeCom side.
- Re-copy the
Bot IDandSecretto avoid any extra whitespace. - If the
Secrethas expired, regenerate it in the WeCom admin console and register again.