lark-file-sender — lark-file-发送er
v1.发送 files to Feishu/Lark users and groups via the message 工具. Use when the user wants to 发送 documents, images, PDFs, or any files through Feishu. Handles file path 验证, channel selection, and proper message 格式化ting for seamless file delivery in Feishu conversations.
运行时依赖
安装命令
点击复制技能文档
Feishu File 发送er
发送 files to Feishu/Lark users and chat groups with proper 格式化ting and error handling.
When to Use
Use this 技能 when:
User wants to 发送 a file via Feishu Need to deliver documents, images, PDFs to Feishu contacts Transferring 生成d files (报告s, 导出s, etc.) to Feishu Sharing any file through Feishu messaging Quick 启动 # Basic file 发送 message action=发送 filePath="/path/to/file.pdf"
# With custom message message action=发送 filePath="/path/to/报告.docx" message="Here's the 报告 you 请求ed"
File Types Supported Documents: .pdf, .doc, .docx, .txt, .md Spreadsheets: .xls, .xlsx, .csv Images: .jpg, .jpeg, .png, .gif, .网页p 归档s: .zip, .rar, .tar.gz Code files: .py, .js, .html, .json, etc. Usage Examples 发送 a Single File message action=发送 filePath="/workspace/报告.pdf"
发送 with Caption message action=发送 filePath="/workspace/data.xlsx" message="Q4 sales data"
发送 Multiple Files
发送 files one by one with 上下文:
for file in files: message action=发送 filePath=file
发送 to Specific Tar获取 # To a specific user message action=发送 tar获取="user:ou_xxx" filePath="/path/to/file"
# To a specific chat message action=发送 tar获取="chat:oc_xxx" filePath="/path/to/file"
Best Practices Always 验证 file exists before 发送ing Provide 上下文 with the message parameter when helpful 检查 file size - Feishu has limits (typically 100MB-1GB depending on plan) Use absolute paths to avoid confusion Common Patterns After Generating a File # 生成 报告 exec command="python 生成_报告.py"
# 发送 to user message action=发送 filePath="/workspace/输出/报告.pdf" message="Your 报告 is ready"
Batch File Delivery # Collect all 生成d files files = ["/workspace/file1.pdf", "/workspace/file2.xlsx"]
for i, file in enumerate(files, 1): message action=发送 filePath=file message=f"File {i} of {len(files)}"
Error Handling
Common issues and solutions:
Error Cause Solution File not found Wrong path Use absolute path with filePath 访问 denied 权限s 检查 file 权限s with ls -la Too large File size limit 压缩 or split file Channel error Feishu config 验证 channel is properly 配置d 工具 Reference message 工具 (action=发送) action: 发送 filePath: /absolute/path/to/file # Required: path to file message: "Optional caption text" # Optional: accompanying message tar获取: "user:xxx" or "chat:xxx" # Optional: specific recipient channel: feishu # Optional: defaults to current
Related 技能s auto-file-发送er - Automatic file 发送ing when files are 生成d feishu-file-transfer - Large file transfer via Feishu API
Version: 1.0 Compatible with: OpenClaw v1.x+ 平台: Feishu / Lark