Integrate OpenClaw (formerly Moltbot, Clawdbot) with WeCom

更新时间:
复制 MD 格式

This topic describes how to integrate the OpenClaw service with WeCom. This allows you to interact with OpenClaw directly in group chats using natural language.

Before you begin

Before you configure a channel, you must purchase and configure a Simple Application Server instance with the OpenClaw application image by following the steps below or the instructions in Deploy an OpenClaw image. If you have already done this, you can skip this section.

Purchase and configure a Simple Application Server instance with the OpenClaw application image

Step 1: Purchase an OpenClaw package

Important

If you have already purchased a Simple Application Server, you can skip this step and deploy OpenClaw by resetting the system. When you reset the system, select the OpenClaw image under Application Images. However, resetting the system erases all data on the system disk of the Simple Application Server. Make sure that you back up your data as needed. For more information, see Reset system.

  1. Purchase a Simple Application Server instance pre-installed with the OpenClaw application.

  2. The Simple Application Server page has preset resource configurations. If you need to change them, review the following details:

    • Servers: Memory must be 2 GiB or higher. You can switch packages based on your requirements.

    • Region: The default region is China (Beijing).

    • Purchase Settings: The default subscription period is 12 months. You can change the duration as needed.

Step 2: Configure OpenClaw

OpenClaw provides two configuration methods. Select the tab for your image version below to view the instructions.

OpenClaw 2026.5.19 and later (recommended)

  1. Log on to the Simple Application Server console, click the instance ID on the server card, and then click the Server Overview tab on the Application Details page.

  2. On the Application Details page, click the Initialize button in the lower-left corner and follow the wizard to complete Step 1: Model Configuration.

    • Large Model Platform: Select a model provider from the drop-down list. Supported providers include Alibaba Cloud Model Studio Token Plan (Team Edition), Alibaba Cloud Model Studio Coding Plan, Alibaba Cloud Model Studio, DeepSeek, Kimi, GLM Coding Plan, and Zhipu.

    • API key: Select the region for your API key and enter the API key.

    • Model: Select or manually enter the model name.

    After completing the configuration, click Configure Now to proceed to the next step.

  3. In Step 2: Use Web UI of the initialization wizard, first click Allow Access in the Allow OpenClaw Access Port area to open the port. Then, click Log in to Web UI to access the OpenClaw Web UI and start a conversation with the OpenClaw agent.

    Important

    Opening the port exposes the service to the public internet. After initialization, you can disable public access with the Public access switch in the status bar at the top of the Application Details page. For more information, see How to enable or disable public access to the OpenClaw Web UI.

  4. (Optional) View the token. After initialization, you can copy the full token by clicking the copy button next to the token field in the status bar at the top of the Application Details page.

    Warning

    Do not disclose the full URL that contains the token. This link includes authentication credentials, and anyone with this link can bypass login verification and gain administrator access to the OpenClaw console.

OpenClaw before 2026.5.19

  1. In the Simple Application Server console, click the instance ID on the server card, and then click the Server Overview tab on the Application Details page.

  2. In the OpenClaw Usage Steps area, under Allow Port Access, click Run Command to open the firewall for the OpenClaw service runtime port.

    Important
  3. Click Run Command under Run Command to configure the Model Studio API key.

    You can configure two types of Model Studio API keys:

    • Coding Plan exclusive API key (recommended): This is a fixed monthly fee model that provides a monthly request quota. Calls that exceed the quota will fail without incurring charges, which helps prevent unexpected costs.

      The Coding Plan currently supports models such as qwen3.5-plus, kimi-k2.5, MiniMax-M2.5, and glm-5. For a detailed list of models, see Coding Plan overview.
    • Pay-as-you-go Model Studio API key based on token usage.

    Configure the API key. Select the Coding Plan API key from the drop-down list or directly enter the pay-as-you-go API key. After selecting a model, click Next.

    If you manually enter an API key, ensure that the selected region matches the region of the API key. Otherwise, calls to the model may fail.
    Important

    The Model Studio Token Plan is not supported during the initial configuration process. Attempting to enter it will cause an error. If you need to use the Token Plan, complete the initialization first, and then refer to How do I connect to the Model Studio Token Plan Team Edition in OpenClaw? for configuration.

  4. Under Access Web UI panel, click Run Command to obtain the URL for the OpenClaw Web UI. You can then interact with the OpenClaw agent.

    You can disable public access to the Web UI at any time if needed. For more information, see Disable public access to the OpenClaw Web UI.
  5. (Optional) View the token.

    Navigate to Application Details > Basic Configuration > View token and click View to retrieve and save the token.

    Warning

    Do not disclose the full URL that contains the token. This link includes authentication credentials, and anyone with this link can bypass login verification and gain administrator access to the OpenClaw console.

Integrate with WeCom

The OpenClaw plugin integration method is only supported for instances with image version OpenClaw 2026.2.9 or later. To integrate this channel on an older version, see Integrate a channel by using AppFlow. You can view the current image version of your instance in the Basic Information > Image information section of the Simple Application Server overview page.

OpenClaw provides two methods to integrate with WeCom. Select a tab based on your image version to view the corresponding procedure.

OpenClaw 2026.5.19 and later (Recommended)

We recommend using the QR code method in the new console. This method requires no developer registration and is activated automatically after you scan the QR code to grant authorization.

  1. Log on to the Simple Application Server console, find the target OpenClaw server, and go to the Application Details tab.

  2. In the Channels card, click Add Channel.

  3. From the channel drop-down list, select WeCom.

  4. Keep the default Connect IM via QR Code tab selected and click QR Code Configuration.

  5. Use WeCom to scan the QR code in the pop-up window and follow the prompts to grant authorization. This completes the bot creation and configuration.

OpenClaw earlier than 2026.5.19

Use the Channel Configuration section in the old console to integrate with WeCom. The following three methods are supported:

QR code method

This method is supported only for OpenClaw 2026.3.13 and later versions.
  1. In the Simple Application Server console, go to the instance details page. On the Application Details > Channel Configuration > WeCom, and click Scan to Configure.

  2. The page shows a QR code. Use WeCom to scan the QR code and follow the prompts to grant authorization. This completes the bot creation and configuration.

Persistent connection method

This method is supported only for OpenClaw 2026.3.13. For other versions, use the URL callback method.
  1. Go to the WeCom admin console. In the left-side navigation pane, choose Management Tools > Bot. Click Create Bot, and then click Create Manually.

    image

  2. Create a chatbot in API mode.

    1. Scroll to the bottom of the page and click Create with API Mode.

      image

    2. Configure the following parameters and click Save.

      1. Visible Scope: Configure the visibility scope of the bot.

      2. API Configuration: In the Connection Method section, select Use Persistent Connection. In the Configuration Method section, under Secret, click Get Code and save the Bot ID and Secret.

      3. Available Permissions: Configure permissions for the bot as needed.

    3. In the Simple Application Server console, go to the instance details page. On the Application Details > Channel Configuration > WeCom, enter the Bot ID and Secret that you obtained in the previous step, and click Application.

URL callback method

  1. Go to the WeCom admin console. In the left-side navigation pane, choose Management Tools > Bot. Click Create Bot, and then click Create Manually.

    image

  2. Create a chatbot in API mode.

    1. Scroll to the bottom of the page and click Create with API Mode.

      image

    2. In the Connection Method section, select Use URL Callback.

    3. Click Generate Randomly for both Token and Encoding-AESKey, and save the generated Token and Encoding-AESKey.

    4. In the Simple Application Server console, go to the instance details page. On the Application Details > Channel Configuration > WeCom, enter the Token and Encoding-AESKey that you obtained in the previous step, and click Application.

    5. Return to the Create with API Mode page, enter the URL, leave the Token and Encoding-AESKey fields unchanged, and click Create.

      The URL format is http://<IP_ADDRESS>:<PORT>/webhooks/wecom. Replace <IP_ADDRESS> and <PORT> with the IP address and port number of your OpenClaw server. For more information about how to obtain the port number, see How do I view the port number of OpenClaw?
      Important

      If you receive a "Domain ownership verification failed" error, see What do I do if the domain ownership verification fails?.

Verification

  1. In a WeCom group chat, add the bot you created as a member.

  2. In the group chat containing the bot, @mention it to start a streaming conversation. The following figure shows an example:

    image

FAQ

Scheduled tasks for WeCom

You can create a scheduled task by starting a conversation with OpenClaw.

  1. Obtain the webhook URL of the group bot: Click the group settings, enable message push, enter a name and description for the bot, and copy the webhook URL.

    2026-03-03_15-56-26

  2. In the conversation with OpenClaw, create the task using the format: [scheduled task content] + [group bot's webhook URL]. The following example shows how to create a scheduled task to query the real-time weather.

  3. Verify the message delivery. You can ask the Agent to send a message immediately to test the scheduled task. Verify that the task runs and sends a message to the group chat.

To modify or cancel a scheduled task, you can instruct the Agent directly in the conversation.

To configure a scheduled task by using AppFlow, see How to use AppFlow to configure a scheduled task.

Handling domain verification failure

When you save the chatbot you are creating, you may encounter the error "Domain ownership verification failed. The domain name must be registered under the same entity as the current enterprise or an affiliated entity." This issue is typically caused by WeCom restrictions and can be resolved by configuring a company-owned domain name.

If the domain name is filed with Alibaba Cloud, you can follow these steps to create a second-level domain to use as the company-owned domain name.

image.png

  1. Go to the AppFlow domain management page and click Add Domain. On the Add Domain page, enter an available second-level domain, such as airobot.example.com.

  2. Create a CNAME record to resolve this second-level domain to the record value from the previous step.

  3. After you configure the DNS resolution, return to the Create Domain page and click Submit.

  4. Use this second-level domain to replace the hostname in the webhook URL you obtained in the Configure API to receive messages step. For example, if the webhook URL obtained from AppFlow is https://123123123.appflow.aliyunnest.com/webhook/a479a8f17 and your company domain name is airobot.example.com, the final URL you need to enter is http://airobot.example.com/webhook/a479a8f17.