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:

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

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

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

Next, return to the terminal and enter the following command to configure the channel:
openclaw channels add
Select "Feishu/Lark (Feishu) (needs app creds)":

Select "Enter App Secret":

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

Set the connection mode and use a domestic domain name:

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

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.

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

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:

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

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"]
}
}

Permission list:

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

Use a long connection to receive events (WebSocket), then save.
Add the following events:
- im.message.receive_v1 - Receive message
- im.message.message_read_v1 - Message read receipt
- im.chat.member.bot.added_v1 - Bot added to group
- im.chat.member.bot.deleted_v1 - Bot removed from group

Added event list:

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

Release information:

Start and test
Start openclaw:
Original prompt (Chinese, left untranslated)
openclaw gateway
或
openclaw gateway --port 18789
Create a test group using Feishu:

Add the bot we just created in the group settings:

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