Feishu Integration Plugin for Clawdbot
Plugin for integrating Feishu (Lark) collaboration app into Clawdbot with WebSocket support and custom implementation.
Integrating Feishu (Lark) into Clawdbot: A Complete Developer Guide
Published on ClawList.io | Category: Automation | Author: ClawList Editorial Team
Feishu — known internationally as Lark — is one of the most widely adopted enterprise collaboration platforms in China, combining messaging, documents, calendars, video conferencing, and workflow automation under a single roof. If you're building AI-powered automation pipelines with Clawdbot, connecting it to Feishu unlocks a massive surface area: automated notifications, document triggers, bot responses, and much more.
Developer @verysmallwoods spent three hours building a dedicated Feishu integration plugin for Clawdbot, and the result is a practical, well-documented plugin that solves one of the most common friction points developers hit when trying to bridge enterprise messaging apps with AI automation runtimes. This post walks through the integration, the key technical decisions behind it, and how you can get it running in your own Clawdbot environment.
Why Feishu + Clawdbot Makes Sense
Before diving into the implementation, it's worth understanding why this integration is worth pursuing.
Feishu is not just a chat app. Its open platform exposes a rich set of APIs covering:
- Bot messaging — send and receive messages programmatically via custom bots
- Event subscriptions — listen for user actions, document changes, approval workflows, and more
- Webhooks and WebSocket connections — receive real-time events pushed from Feishu's servers
- Document and knowledge base APIs — read and write to Feishu Docs and Wikis
Clawdbot, as an AI automation runtime, excels at chaining these kinds of event-driven triggers into intelligent workflows. Connecting the two means you can do things like:
- Trigger an AI summarization workflow whenever a new Feishu Doc is shared in a group
- Have Clawdbot respond to Feishu messages using an LLM backend
- Route approval requests from Feishu into multi-step AI decision pipelines
- Push Clawdbot task results back into Feishu threads automatically
The use cases are broad. The implementation, however, requires navigating a few non-obvious constraints — which is exactly what this plugin addresses.
The Core Technical Challenge: WebSocket vs. Webhook
The single most important architectural decision in this integration is how Feishu delivers events to your application.
Feishu supports two event delivery modes:
1. Webhook (HTTP Callback)
Feishu pushes events to a publicly accessible HTTPS endpoint you provide. Simple, stateless, but requires your server to be publicly reachable.
2. WebSocket (Long Connection)
Feishu maintains a persistent WebSocket connection to your application. Your app initiates the connection and listens for events without needing a public URL — ideal for local development or environments behind firewalls.
Here is the critical catch that @verysmallwoods discovered during development:
Non-enterprise Feishu accounts cannot use the WebSocket event delivery mode.
This is a significant limitation. If you're testing with a personal Feishu account or a free-tier developer app, you'll find the WebSocket option simply unavailable in the Feishu Open Platform console. The plugin works around this by running an internal HTTP server within the Clawdbot plugin itself, handling the webhook delivery path instead.
[Feishu Open Platform]
|
| (HTTP POST events)
v
[Internal HTTP Server inside Clawdbot Plugin]
|
| (parsed event data)
v
[Clawdbot Workflow Engine]
For enterprise accounts with WebSocket access, the flow is cleaner:
[Feishu Open Platform]
|
| (WebSocket push)
v
[Clawdbot Plugin WebSocket Client]
|
| (parsed event data)
v
[Clawdbot Workflow Engine]
The plugin supports both paths, but if you're starting out without an enterprise account, plan for the webhook-based approach.
Setting Up the Feishu Integration Plugin
Here is a step-by-step breakdown of the integration process.
Step 1: Create a Feishu Custom App
- Go to Feishu Open Platform and log in.
- Navigate to Developer Console → Create App → Custom App.
- Note your App ID and App Secret — these authenticate your plugin against Feishu's API.
- Under Event Subscriptions, choose your delivery mode (Webhook URL or WebSocket based on your account tier).
Step 2: Configure Required Permissions
Your app needs at minimum:
im:message — read and send messages
im:message.receive_v1 — subscribe to incoming message events
contact:user.base — basic user info resolution
Add permissions in App Permissions and submit for review (self-built apps in your own workspace are typically auto-approved).
Step 3: Install the Plugin in Clawdbot
Install the @verysmallwoods Feishu plugin into your Clawdbot instance. Once installed, configure the plugin with your credentials:
{
"feishu": {
"app_id": "cli_xxxxxxxxxxxxxxxx",
"app_secret": "your_app_secret_here",
"verification_token": "your_verification_token",
"encrypt_key": "your_encrypt_key_optional",
"delivery_mode": "webhook",
"webhook_port": 3099
}
}
The delivery_mode field accepts "webhook" or "websocket". If you're on a non-enterprise account, set this to "webhook" and ensure webhook_port is accessible from the internet (or use a tunnel like ngrok during development).
Step 4: Point Feishu to Your Endpoint
If using webhook mode, set your Request URL in the Feishu console to:
https://your-domain.com:3099/feishu/event
Feishu will send a verification challenge on first configuration — the plugin handles this automatically.
Step 5: Test the Connection
Send a message to your Feishu bot. You should see the event arrive in your Clawdbot workflow logs. A successful event payload looks like:
{
"schema": "2.0",
"header": {
"event_id": "abc123",
"event_type": "im.message.receive_v1"
},
"event": {
"sender": {
"sender_id": { "open_id": "ou_xxxxxxx" }
},
"message": {
"message_type": "text",
"content": "{\"text\":\"Hello Clawdbot\"}"
}
}
}
From here, Clawdbot can route this event to any downstream workflow — an LLM chain, a database lookup, a notification dispatcher, or anything else in your automation stack.
Practical Use Cases to Get You Started
Once the plugin is live, here are three workflows worth building immediately:
1. AI-Powered Feishu Bot Connect incoming Feishu messages to an LLM node in Clawdbot. Users in your workspace can chat directly with a GPT-4 or Claude-backed assistant without leaving Feishu.
2. Document Summarization on Demand Subscribe to Feishu Doc share events. When someone shares a document in a channel, automatically trigger a summarization workflow and post the summary as a bot reply.
3. Approval Workflow Routing Listen for Feishu approval events and pipe them into Clawdbot logic that classifies, prioritizes, or escalates requests based on content — all without manual intervention.
Conclusion
The Feishu integration plugin for Clawdbot fills a genuine gap for developers operating in Chinese enterprise environments or building global tools that need to support Feishu alongside Slack and Teams. The three hours @verysmallwoods invested produced something immediately usable, with clear documentation and both delivery modes supported.
The key things to remember going in:
- Account tier determines delivery mode — non-enterprise accounts must use the webhook path
- The plugin runs its own internal HTTP server to handle webhook events cleanly within Clawdbot's plugin architecture
- Permissions matter early — get your Feishu app permissions right before debugging event delivery
For teams already invested in the Feishu ecosystem, this integration means your AI automation workflows can live where your team already works. That's a meaningful reduction in context switching and a genuine productivity multiplier.
Check out the original thread from @verysmallwoods for the full walkthrough video and plugin source. If you hit issues, the plugin documentation has been written with care — and the author is receptive to bug reports.
Found this useful? Explore more Clawdbot integrations and OpenClaw skills at ClawList.io. Have a plugin you've built? Submit it to the directory.
Tags
Related Articles
Building Commercial Apps with Claude Opus
Experience sharing on rapid app development using Claude Opus as a CTO, product manager, and designer combined.
AI-Powered Product Marketing with Video and Social Media
Guide on using AI to create product advertisement videos, user testimonials, and product images for social media marketing campaigns.
Engineering Better AI Agent Prompts with Software Design Principles
Author shares approach to writing clean, modular AI agent code by incorporating software engineering principles from classic literature into prompt engineering.