Install
openclaw skills install feishu-send-files飞书文件批量发送技能,支持机器人触发和命令行调用,自动配置,零依赖
openclaw skills install feishu-send-files在群里@机器人 或 私聊@机器人,直接说:
发文件 /path/to/file.pptx
发一下这个 PPT
✅ 自动识别发送目标:
在终端运行:
cd /home/node/.openclaw/workspace/skills/feishu-send-files
node index.js --file "/path/to/file.pptx" --to "chat:群聊 ID"
⚠️ 必须手动指定发送目标:
--to "chat:oc_xxx" → 发到群聊--to "open_id:ou_xxx" → 发到个人--to 参数 → 默认发到个人(容易发错!)飞书文件发送技能,支持三种模式:
发文件 /home/node/test.pptx
发文件 test.pdf
自动在 workspace 目录查找。
把 workspace 里面那个 PPT 文件发给我
发一下 Excel 文件
机器人搜索→展示列表→让你选择→发送。
核心特性:
1,2,3 或 all{
"triggers": [
{"type": "exact_match", "value": "发文件"},
{"type": "prefix_match", "value": "发文件 "},
{"type": "mention", "value": "发文件"},
{"type": "prefix_match", "value": "帮我发"},
{"type": "prefix_match", "value": "发一下"},
{"type": "prefix_match", "value": "把文件"},
{"type": "prefix_match", "value": "发送文件"},
{"type": "prefix_match", "value": "发这个文件"},
{"type": "prefix_match", "value": "发那个文件"},
{"type": "contains", "value": "发文件"},
{"type": "contains", "value": "发送文件"}
]
}
@机器人 发文件 /path/to/file.pptx
@机器人 发一下这个 PPT
优点:自动识别群聊/私聊,不会发错!
# 发到群聊
node index.js --file "/path/to/file.pptx" --to "chat:oc_群聊 ID"
# 发到个人
node index.js --file "/path/to/file.pptx" --to "open_id:ou_用户 ID"
# 不传 --to 参数 → 默认发到个人(容易发错!)
| 参数 | 说明 | 示例 |
|---|---|---|
--file | 文件路径(可多次) | --file "/path/a.pptx" --file "/path/b.pdf" |
--files | 多个文件(逗号分隔) | --files "/path/a.pptx,/path/b.pdf" |
--search | 搜索关键词 | --search "PPT" |
--to | 必须指定发送目标 | --to "chat:oc_xxx" 或 --to "open_id:ou_xxx" |
发文件 /home/node/test.pptx
@机器人 发文件 /path/to/data.xlsx
发文件 test.pdf
帮我发一下 report.docx
把 workspace 里面那个 PPT 文件发给我
发一下 Excel 文件
帮我发会议纪要
发送那个 PDF
机器人响应:
找到 3 个匹配文件,请选择:
1. test.pptx (2.3 MB)
2. 交易报告.pptx (1.8 MB)
3. 会议纪要.pptx (856 KB)
回复数字选择(如:1)或输入多个数字(如:1,2,3)或输入 "all" 发送全部
批量发送示例:
用户:发 PPT 文件
机器人:找到 3 个文件...请选择
用户:1,3
机器人:✅ 发送完成!成功 2/2 个文件
| 问题 | 解决方法 |
|---|---|
| 文件发错地方(发到个人而不是群里) | 机器人触发时自动识别;命令行调用必须加 --to "chat:群聊 ID" |
| 文件名异常 | 使用最终版 index.js |
| 无日志 | 赋权 logs 目录:chmod -R 777 logs |
| 机器人无响应 | 重启 OpenClaw,检查文件路径 |
| 发送失败 | 检查飞书权限与 appId/appSecret 配置 |
| token 获取失败 | 检查 appId/appSecret 是否正确 |
| 文件上传失败 | 检查文件大小(≤30MB)和网络 |
| 未找到匹配文件 | 检查关键词是否准确,或用绝对路径 |
| 多个匹配文件 | 机器人会列出列表,回复数字或文件名选择 |
✅ 推荐:在群里@机器人发送文件(自动识别群聊)
❌ 避免:命令行调用时忘记加 --to 参数(会发到个人)