feishu-whiteboard-extract
从飞书白板(Whiteboard)中提取所有图片节点的 file_token,用于后续下载/OCR/归档。文档类补充能力。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/forevershu/feishu-whiteboard-extractFeishu Whiteboard Extract
从飞书白板/画板(whiteboard)里提取所有图片节点对应的 file_token,便于后续把图片下载到本地做 OCR/归档。
定位:文档/资料处理链路的补充能力(不是会话发消息)。
用法
node skills/feishu-whiteboard-extract/extract_images.js <whiteboard_id>
# 说明:当前 SDK 调用路径为 client.board.v1.whiteboardNode.list
输出
脚本输出 JSON:
whiteboard_idcountimages[]:每项包含node_id与file_token
拿到 file_token 后,可用:
skills/feishu-drive-download/scripts/download.js <file_token>下载- 或用官方
feishu_drive工具下载
标准交付补充:整板全图导出(矢量优先)
- 整板全图(整板大图)是标准交付的第二部分:
- 第一部分:逐节点图片提取(
extract_images.js,用于下载/OCR) - 第二部分:整板全图导出(
export_board_svg.js,用于复核与归档)
- 第一部分:逐节点图片提取(
- 这两部分是互补关系:节点提取便于结构化处理,整板导出保证全局上下文与可视化复查。
整板矢量导出
# 直接输出到 stdout(优先返回 SVG,若服务端降级则可能返回 PNG/JPG)
node skills/feishu-whiteboard-extract/export_board_svg.js <whiteboard_id>
# 输出到文件(会按响应 Content-Type 自动修正扩展名)
node skills/feishu-whiteboard-extract/export_board_svg.js <whiteboard_id> /tmp/board_full.svg
实现说明:
- 调用 OpenAPI:
GET /open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image Accept优先请求image/svg+xml,并兼容 png/jpeg fallback- 若返回
image/svg+xml,保存为.svg - 否则按 content-type 推断扩展名(
.png/.jpg/.gif)
归档到知识库附件目录(appendix)
建议将整板全图落盘到交付目录:
# 单白板交付
node skills/feishu-whiteboard-extract/export_board_svg.js <whiteboard_id> appendix/board_full.svg
# 多白板交付(避免覆盖)
node skills/feishu-whiteboard-extract/export_board_svg.js <whiteboard_id> appendix/<whiteboard_id>_full.svg
Extraction Playbook(经验/踩坑)
这一节总结了白板链接提取 ID、常见报错定位、以及推荐的端到端工作流。
1) whiteboard_id / token 从哪里来?如何从链接中提取?
在飞书里,"白板/画板"通常以链接形式分享。脚本入参一般需要 whiteboard_id(或你在 SDK/API 里看到的 whiteboard token)。
常见 URL 样式(尽量不依赖域名)
不同租户/环境的域名可能不一样,但路径形态通常类似:
-
直接白板链接
https://<host>/board/<whiteboard_id>https://<host>/board/<whiteboard_id>?from=...
-
带路由前缀/应用前缀(本质仍然能在路径中找到板子的 token)
https://<host>/base/board/<whiteboard_id>https://<host>/workspace/board/<whiteboard_id>
-
分享链接(share)/短链跳转
https://<host>/board/share/<share_token>https://<host>/s/<short_token>
经验:能从链接里直接看到的那段"看起来像 ID/token"的字符串,优先当作候选。
提取方法(实用优先)
- 优先从路径段提取:
- 把 URL 的 path 按
/分割,找到board或whiteboard后面的那一段。
- 把 URL 的 path 按
- 其次从 query 参数提取:
- 少数场景会把 token 放在
?whiteboard_id=.../?token=...之类的参数里。
- 少数场景会把 token 放在
- 遇到 share/短链:
- share token 往往 不是
whiteboard_id。 - 处理方式:让用户提供"打开后地址栏里的真实白板链接",或在浏览器里完成跳转后再取最终 URL 中的 ID。
- share token 往往 不是
建议:让用户直接粘贴浏览器地址栏最终落地的 URL,比转发的分享卡片/短链更稳定。
与 Docx 嵌入白板联动(block_type=43)
当白板是作为 Docx 的嵌入块出现时,feishu_doc.read 可能读到的正文几乎为空。这时最稳定的做法是:
- 对 Docx 调用
feishu_doc.list_blocks - 在返回的 blocks 里找到
block_type = 43的块(whiteboard embed) - 从该 block 的 JSON 中取出
whiteboard_id/whiteboard.token(字段名可能因版本不同略有差异) - 把这个 token 作为脚本入参执行提取
示例(伪代码/思路):
- Docx:
feishu_doc.list_blocks(doc_token)→ 找到block_type == 43→ 复制里面的 whiteboard token
- Whiteboard:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-forevershu-feishu-whiteboard-extract": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
market-chart-renderer
Skill by forevershu
baidudisk-mcp
Use Baidu Netdisk via mcporter + stdio MCP server with hot-reload token file credentials. Triggers when you need Baidu Netdisk operations (official 2.0 toolset + legacy aliases) from OpenClaw without storing access_token in repo files.
Akshare Router Cn
Skill by forevershu