Lark CLI Dev Hub Sheets
通过 CLI 工具管理飞书表格,支持报告、清单与数据导出。
下载 13
实现飞书群聊中真实@成员功能,解决纯文本无法触发@的问题。
openclaw skills install @toto2016/lark-mention命令、参数、文件名以原文为准
将自然语言转换为飞书标准 @ 提及消息,自动生成 mentions 字段并发送。
LARK_BRIDGE_URL = http://localhost:18780/proactivecurl -X POST http://localhost:18780/proactive \
-H "Content-Type: application/json" \
-d '{
"chatId": "<群ID>",
"text": "<at user_id=\"<open_id>\">成员名</at> 消息内容",
"atOpenIds": ["<open_id>"]
}'import { sendMention } from './scripts/lark-mention.mjs';
await sendMention({
chatId: '<群ID>',
text: '请查收~',
members: [
{ open_id: '<open_id>', name: '张三' },
{ open_id: '<open_id>', name: '李四' }
]
});飞书消息 API 的 content 必须是 JSON 字符串,包含 text 和 mentions 字段:
{
"text": "<at user_id=\"<open_id>\">成员名</at> 消息内容",
"mentions": [
{
"key": "<open_id>",
"id": { "open_id": "<open_id>", "id_type": "open_id" },
"name": "成员名"
}
]
}关键点:
text 中用 <at user_id="<open_id>">display_name</at> 占位mentions 数组的 key 必须和 <at user_id="..."> 里的值完全一致msg_type 必须是 "text",interactive 卡片类型不支持 mentions| 错误写法 | 原因 |
|---|---|
<at id="<open_id>"> | 飞书不支持 id 属性,必须用 user_id |
mentions 的 key 和 text 不匹配 | 导致渲染失败 |
msg_type 写成 interactive | 卡片消息不支持 mentions 字段 |
纯文本写在 <at> 外部 | 飞书不渲染任何 <at> 标签 |
lark-openclaw-bridge 服务必须运行在 http://localhost:18780已收录 1 个 Skill