Feishu integration

更新时间:
复制 MD 格式

This topic describes how to integrate OpenClaw with a Feishu application and bot. This integration allows users to chat with the bot to trigger tasks in OpenClaw.

Overview

By integrating with a Feishu application and bot, users can chat with the bot to trigger tasks in OpenClaw. The integration involves the following steps:

  • Create a Feishu application and exchange security credentials with the OpenClaw cloud computer.

  • Configure the Feishu application and bot.

  • Obtain a pairing code from the Feishu bot and approve the code in OpenClaw.

Create a Feishu application

  1. Go to the Feishu Open Platform and click Developer Console in the upper-right corner.

  2. Click Create Custom App and fill in the required information.

  3. On the credentials and basic information page of the application, copy the App ID (for example, cli_xxx) and App Secret.

Configure the Feishu application and bot

Configure application permissions

  1. Navigate to Permissions and Scopes > Add Permissions, and then click Bulk Add/Export Permissions.

  2. Paste the following JSON configuration to import the required permissions, and then click Next, Confirm to Add Permissions.

    {
      "scopes": {
        "tenant": [
          "aily:file:read",
          "aily:file:write",
          "application:application.app_message_stats.overview:readonly",
          "application:application:self_manage",
          "application:bot.menu:write",
          "cardkit:card:write",
          "contact:user.employee_id:readonly",
          "corehr:file:download",
          "docs:document.content:read",
          "event:ip_list",
          "im:chat",
          "im:chat.access_event.bot_p2p_chat:read",
          "im:chat.members:bot_access",
          "im:message",
          "im:message.group_at_msg:readonly",
          "im:message.group_msg",
          "im:message.p2p_msg:readonly",
          "im:message:readonly",
          "im:message:send_as_bot",
          "im:resource",
          "sheets:spreadsheet",
          "wiki:wiki:readonly"
        ],
        "user": ["aily:file:read", "aily:file:write", "im:chat.access_event.bot_p2p_chat:read"]
      }
    }
  3. In the dialog box that appears, confirm that the permissions are correct, and then click Request to Enable.

Configure events and publish

  1. On the App Features > Bot page, enable the bot feature and configure a name for your bot.

  2. On the event subscriptions page, go to Event Configuration > Subscription Method, select Use long-lived connection to receive events, and then save your changes.

    Important

    Before you configure the event subscription, ensure you have completed the Feishu channel configuration in OpenClaw.

  3. Click Add Event and add the Receive Message event (im.message.receive_v1).

  4. Go to Versioning & Release > Create Version, fill in the required information, and click Save.

Connect to OpenClaw cloud computer

  1. Open the Wuying client and log in to the Personal Edition. Scan the QR code on the desktop to open the Wuying cloud computer mini program.

  2. In the mini program, find the OpenClaw cloud computer in the Cloud Computer List, and then click OpenClaw App Configuration.

  3. On the OpenClaw App Configuration page, select IM Channel Configuration.

  4. Click Add Channel and set the service provider to Feishu.

  5. Enter the App ID and App Secret of your Feishu application, and then click Save Changes.

Pair and authorize

  1. In Feishu, find the bot you created and send it a message. Take note of the pairing code in the reply.

    The bot will reply with OpenClaw: access not configured., which is expected. This reply contains the pairing code and an example command: openclaw pairing approve feishu <pairing_code>. The bot owner must run this command to complete the pairing.

  2. Open a terminal on your cloud computer and run the following command to approve the pairing: openclaw pairing approve feishu <pairing_code>.

  3. Run the following command to restart the OpenClaw service: openclaw gateway restart.