Feishu Document Comments
Fetch comments from Feishu docx documents via the Drive Comment API.
Requirements
- - Feishu app credentials configured in
~/.openclaw/openclaw.json (reads appId and appSecret from channels.feishu) - System dependencies:
curl, python3 (must be available on PATH) - Feishu app permission:
docs:document.comment:read or INLINECODE7
Usage
Run the bundled script to get all comments on a document:
CODEBLOCK0
To fetch specific comments by ID:
CODEBLOCK1
Resolve skills/ paths relative to the workspace directory.
When to Use
- - After
feishu_doc list_blocks shows comment_ids on blocks - When user asks to review or check comments on a document
- During document collaboration review cycles
Output Format
Each comment shows:
- - Comment ID, status (Open/Resolved), scope (Global/Local)
- Quoted text (for local/inline comments)
- All replies with user ID and text content
Extracting doc_token
From URL https://xxx.feishu.cn/docx/ABC123def → doc_token = INLINECODE13
For wiki pages, first use feishu_wiki to get obj_token, then use that as the doc_token.
How It Works
The bundled shell script:
- 1. Reads Feishu app credentials (
appId, appSecret) from INLINECODE18 - Obtains a
tenant_access_token via the Feishu auth API - Calls the Drive Comment API to list and batch-query comments
- Formats and outputs comment content to stdout
No data is sent to any third party beyond the Feishu/Lark API endpoints.
Limitations
- - Read-only (cannot create or reply to comments)
- API error responses are printed to stderr (may contain request IDs but no sensitive data)
飞书文档评论
通过 Drive 评论 API 获取飞书 docx 文档中的评论。
前提条件
- - 飞书应用凭证 配置在 ~/.openclaw/openclaw.json 中(从 channels.feishu 读取 appId 和 appSecret)
- 系统依赖:curl、python3(必须在 PATH 中可用)
- 飞书应用权限:docs:document.comment:read 或 drive:drive
使用方法
运行捆绑脚本获取文档的所有评论:
bash
bash skills/feishu-comments/scripts/getcomments.sh token>
按 ID 获取特定评论:
bash
bash skills/feishu-comments/scripts/getcomments.sh token> id1,id2,id3
skills/ 路径相对于工作目录解析。
使用时机
- - 当 feishudoc 的 listblocks 显示块上有 comment_ids 时
- 当用户要求查看或检查文档上的评论时
- 在文档协作审阅周期中
输出格式
每条评论显示:
- - 评论 ID、状态(开放/已解决)、范围(全局/局部)
- 引用文本(针对局部/内联评论)
- 所有回复及其用户 ID 和文本内容
提取 doc_token
从 URL https://xxx.feishu.cn/docx/ABC123def → doc_token = ABC123def
对于维基页面,先使用 feishuwiki 获取 objtoken,然后将其用作 doc_token。
工作原理
捆绑的 shell 脚本:
- 1. 从 ~/.openclaw/openclaw.json 读取飞书应用凭证(appId、appSecret)
- 通过飞书认证 API 获取 tenantaccesstoken
- 调用 Drive 评论 API 列出并批量查询评论
- 格式化评论内容并输出到标准输出
除飞书/Lark API 端点外,不会向任何第三方发送数据。
限制
- - 只读(无法创建或回复评论)
- API 错误响应会输出到标准错误输出(可能包含请求 ID,但不包含敏感数据)