Runoob Tutorial ArchiveEnglish

OpenClaw integration with Feishu

OpenClaw integration with Feishu

OpenClaw (formerly Clawdbot) is an open-source, locally-first AI agent gateway that allows large models to run 24/7 on your computer/server, supporting direct computer operation, web browsing, command execution, and seamless integration with chat platforms like Feishu, Telegram, and Discord.

In this chapter, we will integrate OpenClaw with Feishu to achieve automated scenarios such as message pushing, sending images, receiving files, approval interactions, and data synchronization.

If you have not installed OpenClaw yet, you need to install it first:

Use the npm command to install globally:



npm install -g openclaw@latest --registry=https://registry.npmmirror.com

Or use the pnpm command to install:



pnpm add -g openclaw@latest

For detailed installation instructions for OpenClaw, please refer to: OpenClaw (Clawdbot) tutorial.

Install the Feishu official plugin

The new version of OpenClaw has built-in support, and we can enable it with the following command:

openclaw plugins enable feishu

Next, we can use the openclaw plugins list command to check if it is enabled; disabled means disabled, and loaded means enabled:

d db3e7d b9e 4f8e 9 7a a9cf8e85 c8c

Create a bot on the Feishu Open Platform

Open the Feishu Open Platform

https://open.feishu.cn/app

Click "Create a self-built enterprise application":

e3 45f89 e1d 4 ec 8af5 fd4 b6489d54

Fill in the application name (e.g., "My OpenClaw AI"), description + icon as desired:

5661b9b 93a9 48b 97ea 7f4c7614ea7

Copy the App ID and App Secret, which will be used later:

b578b9ef e b 4316 b78c 1c5dddf9bf1d

Next, return to the terminal and enter the following command to configure the channel:

openclaw channels add

Select "Feishu/Lark (Feishu) (needs app creds)":

add573a5 834 433 b a7 b8936 4 d6

Select "Enter App Secret":

967eb1e9 1984 4784 b3b5 ceb8396d71a7

Enter the App Secret and App ID that we previously created in Feishu:

8b4eeaae 4 8 4 4d 9cce 46b 5 cd 1ec 1

Set the connection mode and use a domestic domain name:

6cb56d d d bd 41ad 9516 49e 7bbf443

For the next group chat strategy, select Open so that it can respond to all group chats:

f7f db7 a84 48f3 a3ca d 6e8d84a43

If you select Allowlist, it will only respond to group chats on the whitelist.

Select back, return to the menu and select Finished, then press Enter for the others as default, and the Feishu configuration will be complete.

37 57643 fb18 4f f b ac 5fc93 5fdd44

Return to the web page and view the channel options; you can see that Feishu has been enabled:

71e55bda 9a3 46c4 b1e3 6355ed766eef

Enable robot capabilities

Next, return to the application interface created in Feishu, left menu -> Add application capabilities -> Robot, click the "Add" button, and enable robot capabilities:

7bc95 19 1edf 49c5 a6c 59fdd1 89341

Configure permissions, left -> Permission management -> Batch import/export permissions:

564686cc f ba 47 7 b4 8 bd 1889f354f

Paste the following JSON:

{

  "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:read",

      "cardkit:card:write",

      "contact:user.employee_id:readonly",

      "corehr:file:download",

      "event:ip_list",

      "im:chat.access_event.bot_p2p_chat:read",

      "im:chat.members:bot_access",

      "im:message",

      "im:message.group_at_msg:readonly",

      "im:message.p2p_msg:readonly",

      "im:message:readonly",

      "im:message:send_as_bot",

      "im:resource"

    ],

    "user": ["aily:file:read", "aily:file:write", "im:chat.access_event.bot_p2p_chat:read"]

  }

}

fa7bcb68 7a83 4c7f a 65 b6 b 6e5d 7

Permission list:

397c41 14b4 43f 8f79 3d63bee5e9ba

Configure event subscriptions

Next, we need to subscribe to related events. Select Events and Callbacks in the left menu → Event Configuration:

97cec55e f71c 47d8 af4c 9d19d7cf3e3a

Use a long connection to receive events (WebSocket), then save.

Add the following events:

653af6 9 8e 434e 88e 996d13 deb4

Added event list:

59 afc7c 9d 4d5f 9efe ef4f5868db 4

Release application

Left → Version Management and Release → Create Version → Submit for Review → Release:

c3e8cf93 9f 9 4a 8fd 755dd665f3a scaled

Release information:

ecb7163e f619 49a7 a7 3 e74 6763 ef

Start and test

Start openclaw:

Original prompt (Chinese, left untranslated)

openclaw gateway

或 

openclaw gateway --port 18789

Create a test group using Feishu:

39189684 47f7 4545 bd 7 953 b46da3a1

Add the bot we just created in the group settings:

b3856 5 dfd8 43bd aa1e cd833a8 fd85

Next, we can start chatting with OpenClaw. You can @ it to have it introduce itself. A normal reply indicates the process is working:

b bf785c 66 e 4c8b 865e e d7b695166e