Integrate OpenClaw with DingTalk

更新时间:
复制 MD 格式

This integration allows you to interact directly with OpenClaw using natural language in group chats or one-on-one conversations.

Important

OpenClaw is an open-source AI assistant. Before using it, assess its security and stability and adhere to its license agreement to ensure the security of your system environment and data.

Before you begin

To configure a message channel, you must first purchase and configure a Simple Application Server with the OpenClaw application image. Follow the steps below or refer to the Deploy the OpenClaw image topic. You can skip this section if you have already done so.

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

Step 1. Purchase an OpenClaw package

Important

If you have already purchased a Simple Application Server, you can deploy OpenClaw by resetting the system. To do this, select the OpenClaw image under application images when resetting. However, resetting the system erases all data on the server's system disk. Back up your data as needed. For more information, see Reset system.

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

  2. On the Simple Application Server page, resource configurations are preset. You can change the settings as follows:

    • Servers: The memory must be at least 2 GiB. You can switch packages based on your needs.

    • Region: The default is China (Beijing).

    • Purchase Settings: The default is 12 months. You can change the subscription duration based on your needs.

Step 2. Configure OpenClaw

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

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 on the Server Overview page, click the Application Details tab.

  2. In the lower-left corner of the application details page, click Initialize. In the initialization wizard, 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, Zhipu, and more.

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

    • Model: Select or manually enter a model name.

    After you finish the configuration, click Configure Now to proceed.

  3. In the initialization wizard, in Step 2: Use Web UI, first click Allow in the Allow OpenClaw access port area to open the port. Then, click Login to Web UI to access the OpenClaw WebUI and chat with the OpenClaw agent.

    Important

    Opening the port exposes the service to the public network. After initialization, you can disable public access with a single click by using 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 WebUI.

  4. (Optional) View the token. After initialization, you can find the Token field in the status bar on the application details page. Click the copy icon to copy the full token.

    Warning

    Do not expose the full URL that contains the token. This link includes authentication credentials. Anyone with this link can bypass login verification and gain administrative access to the OpenClaw console.

OpenClaw versions earlier than 2026.5.19

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

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

    Important
  3. Under Configure OpenClaw, click 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 plan uses a fixed monthly fee and provides a monthly request quota. Requests that exceed this quota will fail and not be billed, preventing unexpected charges.

      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.

    Configure the API Key. Select the API Key for the Coding Plan from the drop-down list or directly enter the pay-as-you-go API Key. Select a model and then click Next.

    If you manually enter an API Key, ensure the selected region matches the API Key's region. Otherwise, model calls will fail.
    Important

    Configuring a Model Studio Token Plan is not supported during initialization. Forcing an entry will cause an error. If you need to use a Token Plan, complete the initialization first, and then refer to How to connect to the team edition of Model Studio Token Plan in OpenClaw? for configuration instructions.

  4. Under Access Web UI Panel, click Run Command to get the address of the OpenClaw WebUI. You can then interact with the OpenClaw agent on the web page.

    If needed, you can disable public access to the WebUI with a single click. For more information, see Disable public access to the OpenClaw WebUI.
  5. (Optional) View the token.

    In Application Details > Basic Configuration > View token, click View to display and save the token.

    Warning

    Do not expose the full URL that contains the token. This link includes authentication credentials. Anyone with this link can bypass login verification and gain administrative access to the OpenClaw console.

Integrate with DingTalk

The OpenClaw plug-in integration method is supported only for instances with image version OpenClaw 2026.2.9 or later. To integrate this message channel on an older version, see Integrate message channels through AppFlow. You can find your instance's image version under Basic Information > Image information on the instance overview page.

1. Create a DingTalk application

  1. Select or create an organization.

    Select an organization

    Go to the DingTalk Open Platform. When you log in, the following prompt appears. Select an organization for which you have developer permissions, or select an organization and then obtain developer permissions.

    Create an organization

    If no organizations are available, use the DingTalk mobile app to scan the QR code below. You will be redirected to the page for creating a new organization.

    image

    Your DingTalk mobile app version must be 6.5.45 or later.
  2. Go to the DingTalk Open Platform. On the developer console, find the one-click option to automatically create an OpenClaw bot and click Create Now.

  3. The platform pre-fills the OpenClaw bot information. Modify the details if needed, then click OK to create the bot.

    If you need to create multiple applications, we recommend changing the bot name or icon during creation to distinguish them later.
  4. After the application is created, copy and save its Client ID and Client Secret.

    If you close the window, you can still find the Client ID and Client Secret. Navigate to the application and click Credentials and Basic Information in the left-side navigation pane.

2. Configure the DingTalk application

Select the tab for your image version to view the steps.

OpenClaw 2026.5.19 and later (recommended)

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

  2. On the Channels card, click Add Channel.

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

  4. Keep the default Manual Entry tab selected, enter the Client ID and Client Secret of your DingTalk application, and click Apply. Wait for the command to finish.

OpenClaw versions earlier than 2026.5.19

  1. Return to the Simple Application Server console. Click the instance ID on the server card of your OpenClaw instance, and then click the Application Details tab on the Server Overview page.

  2. In Channel configuration > DingTalk, enter the Client ID and Client Secret of your DingTalk application, and click Application. Wait for the command to finish.

3. Test the bot

You can create a new group chat or add the bot to an existing one. To test the bot, mention it by typing @robot_name in a group chat or search for it to start a private chat.

To change the Model Studio model, see How to change the model called by OpenClaw.

Group chat

  1. Go to the Group Settings page of a DingTalk group, click the Bot card, and on the Bot Management page, click Add Bot. On the Add Bot page, use the Search box to find your bot by name and select it. Click Add , and then click Finish Adding.

  2. In the DingTalk group, mention the bot by typing @robot_name to interact with it. You can also search for the bot by name in the DingTalk search bar and find it on the function page to start a private chat.

Private chat

  1. In the search bar at the top of DingTalk, search for the name of the bot you created, and click the bot's avatar to start a private chat.

  2. Once you are in the private chat, you can start conversing with the bot directly.

4. (Optional) Configure a scheduled task

After configuring the bot, you can create a scheduled task by talking to OpenClaw. The following example shows how to create a task that queries the real-time weather.

  1. Obtain the bot's webhook address. In a group chat where the bot has been added, from the top-right corner, navigate to Group Settings > Group Management > Bot. In the bot management section, click the bot's avatar, then copy its webhook address.

    The webhook address format is https://oapi.dingtalk.com/robot/send?access_token=xxx. Click the Copy button to get the full address.

  2. In the OpenClaw chat, create the task using the format: [task description] + [group bot's webhook address].

    For example, enter: Check the weather in Beijing at 9 AM every day, webhook address is https://oapi.dingtalk.com/robot/send?access_token=xxx

  3. To test the scheduled task, ask the agent to send a message immediately. Check the group chat to confirm the task was executed. To modify or cancel the task, ask the agent directly in the chat.

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

FAQ

Bind multiple DingTalk bots to different agents

OpenClaw uses a routing mechanism based on the openclaw.json file to isolate roles. You can define multiple agents in agents.list, configure separate DingTalk bots in channels.dingtalk-connector.accounts, and then use bindings to map the bots to agents. This allows each DingTalk bot to act as a dedicated AI agent with a specific role.

The following example shows how to bind two DingTalk bots to "Customer Service" and "Technical Support" agents.

Prerequisites

  • You have deployed the OpenClaw application image, and the image version is OpenClaw 2026.3.13 or later.

  • You have created multiple bots on the DingTalk Open Platform and have obtained the Client ID and Client Secret for each. For instructions, see 1. Create a DingTalk application.

Procedure

  1. Modify the configuration file. Replace placeholder values like your_bot1_client_id and your_bot1_client_secret with the actual Client ID and Client Secret from the DingTalk Open Platform.

    Important

    You must replace the value of agents.list.model.primary with the name of a model that is already configured in OpenClaw. This example uses dashscope-coding/qwen3.5-plus from the Model Studio Coding Plan.

    {
      "agents": {
        "list": [
          {
            "id": "ding-bot1",
            "name": "DingTalk Customer Service Bot",
            "model": {
              "primary": "dashscope-coding/qwen3.5-plus"
            },
            "workspace": "/home/admin/.openclaw/workspace-bot1",
            "identity": {
              "name": "Service Assistant",
              "theme": "Customer Service"
            }
          },
          {
            "id": "ding-bot2",
            "name": "DingTalk Tech Support Bot",
            "model": {
              "primary": "dashscope-coding/qwen3.5-plus"
            },
            "workspace": "/home/admin/.openclaw/workspace-bot2",
            "identity": {
              "name": "Tech Expert",
              "theme": "Tech Support"
            }
          }
        ]
      },
      "channels": {
        "dingtalk-connector": {
          "enabled": true,
          "accounts": {
            "bot1": {
              "enabled": true,
              "clientId": "YOUR_BOT1_CLIENT_ID",
              "clientSecret": "YOUR_BOT1_CLIENT_SECRET"
            },
            "bot2": {
              "enabled": true,
              "clientId": "YOUR_BOT2_CLIENT_ID",
              "clientSecret": "YOUR_BOT2_CLIENT_SECRET"
            }
          },
          "separateSessionByConversation": true,
          "groupSessionScope": "group",
          "sharedMemoryAcrossConversations": false
        }
      },
      "bindings": [
        {
          "agentId": "ding-bot1",
          "match": {
            "channel": "dingtalk-connector",
            "accountId": "bot1"
          }
        },
        {
          "agentId": "ding-bot2",
          "match": {
            "channel": "dingtalk-connector",
            "accountId": "bot2"
          }
        }
      ]
    }
  2. Go to the instance Web UI panel and send the following command to OpenClaw: Modify the OpenClaw configuration file, add the following content, and restart the gateway after modification. Immediately after this command, paste the configuration content from the previous step.

  3. Verify the configuration. In DingTalk, send test messages to both bots to confirm that each responds correctly.