Skip to content

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 ToolsIntelligent BotsCreate BotAPI Mode
  • Regular member: In the WeCom client, go to WorkbenchIntelligent Bot AppCreate BotManual CreationAPI 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 & ManagementManagement ToolsIntelligent BotsCreate Bot.
  • Regular member: Open the WeCom client, go to WorkbenchIntelligent Bot AppCreate 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 ID and Secret in Tencent WorkBuddy — no Webhook URL needed.
  • URL Callback: Suitable for server/webhook scenarios. Requires filling in Token and Encoding-AESKey in 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:

FieldDescription
Bot nameA recognizable name, e.g. "Tencent WorkBuddy Assistant"
Visible scopeSelect 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.

Get Bot ID and Secret from WeCom

  1. In the API Configuration section, select Use Long Connection.
  2. Copy the Bot ID.
  3. 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

  1. Open Tencent WorkBuddy and click your avatar in the top-right corner, then select Claw Settings.
  2. In the Integrations (BETA) section, find WeCom AIBot Integration and click Configure.
  3. In the dialog, select WebSocket Long Connection, then enter the Bot ID and Secret you just copied.
  4. 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

  1. In the API Configuration section, select Use URL Callback.
  2. Click the Random Generate button next to the Token and Encoding-AESKey fields.
  3. Save both values — you will need them in Tencent WorkBuddy.

Important: Make sure to save the Token and Encoding-AESKey. You won't be able to complete registration without them.

Generate Webhook URL in Tencent WorkBuddy

  1. Open Tencent WorkBuddy, go to Claw SettingsWeCom AIBot IntegrationConfigure.
  2. Switch to Use URL Callback mode.
  3. Enter the Token and Encoding-AESKey you just obtained, then click Register.
  4. After successful registration, copy the generated Webhook URL.

Paste the URL back to WeCom

  1. Return to the bot creation page in WeCom.
  2. Paste the copied Webhook URL into the URL field.
  3. Click Save to complete the configuration.

Troubleshooting

Bot not responding

  1. Check Tencent WorkBuddy status: Make sure Tencent WorkBuddy is running and the Claw service is active.
  2. Check connection type: Confirm that WeCom and Tencent WorkBuddy are both set to the same connection mode.
  3. Check credentials: For Long Connection, verify the Bot ID and Secret. For URL Callback, verify the Token and Encoding-AESKey.
  4. Check network: Make sure your computer has an active internet connection.

URL verification failed

  1. Make sure Tencent WorkBuddy is running.
  2. Check that the Claw service has started successfully.
  3. Re-copy the Webhook URL and make sure there are no extra or missing characters.
  4. Confirm the Token and Encoding-AESKey exactly match what is configured in Tencent WorkBuddy.

Long Connection registration failed

  1. Confirm that Use Long Connection is selected on the WeCom side.
  2. Re-copy the Bot ID and Secret to avoid any extra whitespace.
  3. If the Secret has expired, regenerate it in the WeCom admin console and register again.