Openclaw Feishu
OpenClaw (formerly Clawdbot) is an open-source, local-first AI agent gateway that enables large language models to run 7x24 on your computer/server. It supports direct computer operation, web browsing, command execution, and seamless integration with chat platforms like Feishu, Telegram, and Discord.\n\nIn this chapter, we will integrate OpenClaw with Feishu to implement automated scenarios such as message push, image sending, file receiving, approval interaction, and data synchronization.\n\nIf you haven't installed OpenClaw yet, you need to install it first:\n\nInstall globally using npm command:\n\nnpm install -g openclaw@latest --registry=https://registry.npmmirror.com\nOr install using pnpm command:\n\npnpm add -g openclaw@latest\nFor detailed OpenClaw installation, refer to: [OpenClaw (Clawdbot) Tutorial](#).\n\n### Install Feishu Official Plugin\n\nThe new version of OpenClaw has built-in support. We can enable it using the following command:\n\nopenclaw plugins enable feishu\nNext, we can use the openclaw plugins list command to check if it's enabled. "disabled" means disabled, "loaded" means enabled:\n\n!(#)\n\n### Create a Bot on Feishu Open Platform\n\nOpen the Feishu Open Platform [https://open.feishu.cn/app](https://open.feishu.cn/app) and click "Create Enterprise Self-built Application":\n\n!(#)\n\nFill in the application name (e.g., "My OpenClaw AI"), description and icon can be arbitrary:\n\n!(#)\n\nCopy the credentials App ID and App Secret, which will be needed later:\n\n!(#)\n\nNext, return to the terminal and enter the following command to configure the channel:\n\nopenclaw channels add\nSelect "Feishu/Lark (Feishu) (needs app creds)":\n\n!(#)\n\nSelect "Enter App Secret":\n\n!(#)\n\nEnter the App Secret and App ID of the application we created in Feishu earlier:\n\n!(#)\n\nSet the connection mode and use the domestic domain:\n\n!(#)\n\nFor the group chat strategy, select Open, so it can respond to all group chats:\n\n!(#)\n\nIf you select Allowlist, it will only respond in whitelisted group chats.\n\nAfter selection, return to the menu and select Finished, then press Enter for other defaults to complete the Feishu configuration.\n\n!(#)\n\nReturn to the web interface, check the channel options, and you can see that Feishu is enabled:\n\n!(#)\n\n### Enable Bot Capabilities\n\nNext, return to the Feishu application interface we created. Left menu β Add App Capability β Bot, click the "Add" button to enable bot capabilities:\n\n!(#)\n\nConfigure permissions, left side β Permission Management β Batch Import/Export Permissions:\n\n!(#)\n\nPaste the following JSON:\n\n{ "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"] }}\n!(#)\n\nPermission list:\n\n!(#)\n\n### Configure Event Subscription\n\nNext, we need to subscribe to relevant events for the application. In the left menu, select Events & Callbacks β Event Configuration:\n\n!(#)\n\nUse WebSocket long connection to receive events, then save.\n\nAdd the following events:\n\n* im.message.receive_v1- Receive messages\n* im.message.message_read_v1- Message read receipt\n* im.chat.member.bot.added_v1- Bot added to group\n* im.chat.member.bot.deleted_v1- Bot removed from group\n\n!(#)\n\nAdded events list:\n\n!(#)\n\n### Publish Application\n\nLeft side β Version Management & Release β Create Version β Submit for Review β Publish:\n\n!(#)\n\nRelease information:\n\n!(#)\n\n### Start and Test\n\nStart openclaw:\n\nopenclaw gateway or openclaw gateway --port 18789\nCreate a test group using Feishu:\n\n!(#)\n\nAdd the bot we just created in the group settings:\n\n!(#)\n\nNext, we can start chatting with OpenClaw. You can @ it to introduce itself. A normal response indicates the process is working:\n\n!(#)
YouTip