name: feishu-file-sender description: 飛書檔案傳送器 — 補齊飛書渠道缺失的檔案投遞能力,通過飛書 OpenAPI 上傳併發送 agent 生成的本地檔案。| Feishu File Sender — Upload & send files via Feishu OpenAPI, filling the channel's missing file delivery. license: MIT compatibility: openclaw metadata: version: "1.0.9" tags: [feishu, file, upload, im, messaging, openapi] author: wen-ai openclaw: emoji: "📎" requires: bins: [python3] config: - ~/.openclaw/openclaw.json
OpenClaw agent 在本地生成檔案,但飛書渠道外掛只支援文本訊息,沒有檔案投遞能力。本 skill 通過直接呼叫飛書 OpenAPI(上傳+傳送)補齊這一底層能力,使生成的檔案能回傳到聊天中。
小蔥技能站7w4.net每天更新,海量AI技能等你發現。
OpenClaw agents generate files locally, but the Feishu channel integration only supports text messages and does not provide native file delivery. This skill fills that architectural gap by calling Feishu OpenAPI directly (upload + send), enabling files to be delivered back to chat.
將本地檔案上傳到飛書並作為檔案訊息傳送。
Upload a local file to Feishu and send it as a file message.
python3 scripts/feishu_file_sender.py \
--file /absolute/path/to/report.xlsx \
--receive-id oc_xxx
python3 scripts/feishu_file_sender.py \
--file /absolute/path/to/file \
--receive-id <chat_id|open_id> \
--receive-id-type <chat_id|open_id|user_id>
--file(必填):本地檔案絕對路徑。--receive-id(可選):目標 chat_id 或 open_id。若省略,指令碼會讀取
OPENCLAW_CHAT_ID(或 OPENCLAW_RECEIVE_ID / FEISHU_CHAT_ID)。--receive-id-type(可選):若省略,將根據字首自動識別:oc_ → chat_idou_ → open_idon_ → user_id--file-type(可選):飛書上傳的檔案型別,預設 stream。
--file (required): Absolute path to the local file.
--receive-id (optional): Target chat_id or open_id. If omitted, the script
reads OPENCLAW_CHAT_ID (or OPENCLAW_RECEIVE_ID / FEISHU_CHAT_ID).--receive-id-type (optional): If omitted, auto-detect by prefix:oc_ → chat_idou_ → open_idon_ → user_id--file-type (optional): Feishu file upload type, default stream.cwd 匹配 OpenClaw 工作區,解析當前 agent id。~/.openclaw/openclaw.json 讀取 appId/appSecret。file_key。呼叫飛書 傳送訊息 API 傳送檔案。
Resolve the current agent id by matching cwd to OpenClaw workspace path.
~/.openclaw/openclaw.json based on the agent id.file_key.channels.feishu.accounts 存在於
~/.openclaw/openclaw.json,且 bindings 對映 agentId → accountId。--receive-id 或設定 OPENCLAW_CHAT_ID。HTTP 錯誤 → 檢視飛書錯誤返回中的 log_id 進行排查。
Missing credentials → Ensure channels.feishu.accounts exists in
~/.openclaw/openclaw.json and bindings map agentId → accountId.
--receive-id or set OPENCLAW_CHAT_ID.log_id in Feishu error payload.本技能會從本機 OpenClaw 配置中讀取飛書憑證(~/.openclaw/openclaw.json):
channels.feishu.accounts.*.appIdchannels.feishu.accounts.*.appSecret這些憑證僅用於獲取 tenant access token 併發送檔案。技能不會儲存或向其他地方傳輸憑證。
This skill reads Feishu credentials from the local OpenClaw config
(~/.openclaw/openclaw.json) on the machine where it runs:
channels.feishu.accounts.*.appIdchannels.feishu.accounts.*.appSecretThese values are used only to obtain a tenant access token and send the file. The skill does not store or transmit credentials anywhere else.
建議通過入站 chat_id 傳送到 當前聊天。
This skill is designed for all agents; it reads the active workspace to choose the correct Feishu app credentials automatically.
chat_id.scripts/feishu_file_sender.py質量良好,文件詳盡、使用簡單,能有效解決飛書渠道無法傳送檔案的問題。自動讀取配置、智慧識別引數的設計讓使用很省心,錯誤提示也足夠清晰。不足之處是缺少使用示例和測試用例,新手初次上手可能需要一些摸索時間。總體推薦,適合需要生成檔案併發送至飛書的使用者使用。