boyangwang

Lark Integration

AI 智慧體v1.0.0
作者:boyangwang更新於 2026-05-18lark-integration@clawhub_boyangwang/lark-integration
工作流編排工具呼叫#Webhook#Feishu#Messaging

據 AlphaMoat 統計,截至 2026-10,Lark Integration 累計下載 8,405 次、獲 4 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 3,305 位,在「AI 智慧體」分類(1,632 個)中排名第 437 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
8405
星標
4
全站下載量排名
#3,305
全站前 31% · 「AI 智慧體」前 27%
平台累計下載星標評論
ClawHub ↗59002-
SkillHub ↗84054—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

支援文字、富文字和圖片訊息,並涵蓋連線設定、文件與知識庫訪問以及整合問題排查。

資料釋出於 2026-10-27

可以用來做什麼

  • 設定或排查 Lark/飛書與 OpenClaw 的訊息連線

什麼時候用

  • 需要處理 Lark 訊息或訪問相關內容時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

幫我梳理 Lark 與 OpenClaw 的連線步驟,並說明如何收發圖片訊息

月度資料趨勢

累計下載8405
4881677486662026-05 · 累計下載 51422026-07 · 累計下載 55382026-08 · 累計下載 56592026-09 · 累計下載 62282026-10 · 累計下載 840526-0526-0926-10
星標4
3452026-05 · 星標 42026-07 · 星標 42026-08 · 星標 42026-09 · 星標 42026-10 · 星標 426-0526-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-108405—4
2026-096228—4
2026-085659+2.2%4
2026-075538—4
2026-055142—4

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

5.2 KB · ClawHub v1.0.0
---
name: lark-integration
description: Connect Lark (Feishu) messaging to OpenClaw via webhook bridge. Supports text, rich text (post), and image messages bidirectionally. Use when setting up Lark/Feishu as a messaging channel, receiving messages with images, sending replies back to Lark, reading Lark documents/wikis/bitables, or troubleshooting Lark integration issues. Covers both Lark International (larksuite.com) and China Feishu (feishu.cn).
---

# Lark Integration

Connect Lark (Feishu) to OpenClaw for bidirectional messaging with full rich content support.

## Quick Start
展開全部(共 173 行)

```bash
# 1. Set credentials
echo "FEISHU_APP_ID=cli_xxx" >> ~/.openclaw/workspace/.env
mkdir -p ~/.openclaw/secrets
echo "your_app_secret" > ~/.openclaw/secrets/feishu_app_secret

# 2. Start bridge
cd skills/lark-integration/scripts
node bridge-webhook.mjs

# 3. Configure Lark webhook URL in developer console
# https://open.larksuite.com → Your App → Event Subscriptions
# URL: http://YOUR_SERVER_IP:3000/webhook
```

## Architecture

```
Lark App ──webhook──► Bridge (port 3000) ──WebSocket──► OpenClaw Gateway
                           │                                   │
                           ◄────────── Reply ──────────────────┘
```

## Supported Message Types

| Type | Direction | Format |
|------|-----------|--------|
| `text` | ↔ Both | Plain text |
| `post` | → Receive | Rich text with images, links |
| `image` | → Receive | Single image |
| Reply | ← Send | Text (cards via feishu-card skill) |

## Platform Detection

The bridge auto-detects platform from URLs:
- `*.larksuite.com` → `https://open.larksuite.com` (International)
- `*.feishu.cn` → `https://open.feishu.cn` (China)

## Configuration

### Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `FEISHU_APP_ID` | Yes | App ID from Lark Developer Console |
| `FEISHU_APP_SECRET_PATH` | No | Path to secret file (default: `~/.openclaw/secrets/feishu_app_secret`) |
| `WEBHOOK_PORT` | No | Webhook listen port (default: 3000) |
| `FEISHU_THINKING_THRESHOLD_MS` | No | Delay before "Thinking..." placeholder (default: 2500) |
| `FEISHU_ENCRYPT_KEY` | No | Encryption key if enabled in Lark |
| `OPENCLAW_AGENT_ID` | No | Agent to route messages to (default: main) |

### Lark App Permissions

Enable these scopes in Lark Developer Console → Permissions & Scopes:

**Messaging:**
- `im:message` - Send and receive messages
- `im:message:send_as_bot` - Send messages as bot
- `im:resource` - Download message resources (images)

**Documents (optional):**
- `docx:document:readonly` - Read documents
- `wiki:wiki:readonly` - Read wiki spaces
- `sheets:spreadsheet:readonly` - Read spreadsheets
- `bitable:bitable:readonly` - Read bitables
- `drive:drive:readonly` - Access drive files

## Scripts

### bridge-webhook.mjs

Main webhook bridge. Receives Lark events, forwards to OpenClaw, sends replies.

```bash
FEISHU_APP_ID=cli_xxx node scripts/bridge-webhook.mjs
```

### setup-service.mjs

Install as systemd service for auto-start:

```bash
node scripts/setup-service.mjs
# Creates /etc/systemd/system/lark-bridge.service
```

## Image Handling

Images in messages are:
1. Detected from `post` content or `image` message type
2. Downloaded via Lark API using `message_id` and `image_key`
3. Converted to base64
4. Sent to OpenClaw Gateway as `attachments` parameter

```javascript
attachments: [{ mimeType: "image/png", content: "<base64>" }]
```

## Group Chat Behavior

In group chats, the bridge responds when:
- Bot is @mentioned
- Message ends with `?` or `?`
- Message contains trigger words: help, please, why, how, what, 帮, 请, 分析, etc.
- Message starts with bot name

Otherwise, messages are ignored to avoid noise.

## Reading Documents

Use the `feishu-doc` skill to read Lark documents:

```bash
node skills/feishu-doc/index.js fetch "https://xxx.larksuite.com/docx/TOKEN"
```

Supported URL types:
- `/docx/` - New documents
- `/wiki/` - Wiki pages (auto-resolves to underlying doc)
- `/sheets/` - Spreadsheets
- `/base/` - Bitables (multi-dimensional tables)

**Permission Note:** Documents must be shared with the bot, or the bot must have tenant-wide read permission.

## Troubleshooting

### "forBidden" error when reading docs
- Document not shared with bot → Add bot as collaborator
- Missing scope → Enable `docx:document:readonly` in console

### No messages received
- Check webhook URL is accessible: `curl http://YOUR_IP:3000/health`
- Verify webhook in Lark console shows "Verified"
- Check bridge logs: `journalctl -u lark-bridge -f`

### "must be string" error
- Old bridge version → Update to use `attachments` for images

### Images not received
- Missing `im:resource` scope → Enable in Lark console
- Token expired → Bridge auto-refreshes, restart if stuck

## Service Management

```bash
# Check status
systemctl status lark-bridge

# View logs
journalctl -u lark-bridge -f

# Restart
systemctl restart lark-bridge
```

## References

- [Lark Developer Console](https://open.larksuite.com/) (International)
- [Feishu Developer Console](https://open.feishu.cn/) (China)
- See `references/api-formats.md` for message format details
- See `references/setup-guide.md` for step-by-step setup

「AI 智慧體」分類下的熱門技能

boyangwang 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。