Feishu integration
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
-
Go to the Feishu Open Platform and click Developer Console in the upper-right corner.
-
Click Create Custom App and fill in the required information.
-
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
-
Navigate to Permissions and Scopes > Add Permissions, and then click Bulk Add/Export Permissions.
-
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"] } } -
In the dialog box that appears, confirm that the permissions are correct, and then click Request to Enable.
Configure events and publish
-
On the App Features > Bot page, enable the bot feature and configure a name for your bot.
-
On the event subscriptions page, go to Event Configuration > Subscription Method, select Use long-lived connection to receive events, and then save your changes.
ImportantBefore you configure the event subscription, ensure you have completed the Feishu channel configuration in OpenClaw.
-
Click Add Event and add the Receive Message event (
im.message.receive_v1). -
Go to Versioning & Release > Create Version, fill in the required information, and click Save.
Connect to OpenClaw cloud computer
-
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.
-
In the mini program, find the OpenClaw cloud computer in the Cloud Computer List, and then click OpenClaw App Configuration.
-
On the OpenClaw App Configuration page, select IM Channel Configuration.
-
Click Add Channel and set the service provider to Feishu.
-
Enter the App ID and App Secret of your Feishu application, and then click Save Changes.
Pair and authorize
-
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. -
Open a terminal on your cloud computer and run the following command to approve the pairing:
openclaw pairing approve feishu <pairing_code>. -
Run the following command to restart the OpenClaw service:
openclaw gateway restart.