Use this skill as the last-mile delivery layer for multimodal agents.
It does not generate content.
It only makes sure already-generated files are sent to Feishu with the correct protocol.
Use this skill when you already have a generated result and need to deliver it to a Feishu user/chat.
Typical cases:
For images, do not send the local file as plain text or guess a generic attachment format.
Correct flow:
image_keymsg_type=imageUse:
scripts/send-image.mjsFor mp4 videos, do not send them as file messages.
Correct flow:
file_keymsg_type=mediaUse:
scripts/send-media.mjsThe scripts expect:
FEISHU_APP_IDFEISHU_APP_SECRET_PATH or default secret file at ~/.openclaw/secrets/feishu_app_secretDefault secret path:
~/.openclaw/secrets/feishu_app_secretThe bundled scripts default to receive_id_type=open_id.
Use them directly when the target is a Feishu user open_id like:
ou_xxxIf you need group delivery later, extend the script to accept chat_id and switch receive_id_type.
cd scripts
node send-image.mjs <open_id> /path/to/image.jpg
Example:
cd scripts
node send-image.mjs ou_xxx /tmp/result.jpg
cd scripts
node send-media.mjs <open_id> /path/to/video.mp4 mp4 5000
Arguments:
mp4Example:
cd scripts
node send-media.mjs ou_xxx /tmp/result.mp4 mp4 5000
A successful send should return Feishu success payloads such as:
code: 0msg: successDo not assume transport success only from local script execution.
Check the returned Feishu response.
If real Feishu image sending fails, report that image delivery failed.
Do not silently pretend the image was delivered.
If Feishu media sending fails, fallback to sending a direct link if one exists.
State clearly that this is a fallback.
For a multimodal content agent, use this skill after generation:
send-image.mjssend-media.mjsThis keeps protocol details out of the model prompt and reduces failure risk for weaker models.
共 1 个版本