返回 Skill 列表
extension
分类: 其它需要 API Key

Feishu Upload Image

将本地上传图片到飞书并获取其 image_key。在需要通过飞书 IM 发送图片但先需要上传 API 返回的 image_key 时使用。

person作者: jkzleondhubclawhub

Feishu Upload Image

Upload a local image file to Feishu and receive the image_key needed for sending via feishu_im_user_message.

只做一件事:本地文件 → image_key

Usage

bash <skill-dir>/scripts/upload-image.sh /path/to/image.png

Environment variables

export FEISHU_IMAGE_PATH="/path/to/image.png"
bash <skill-dir>/scripts/upload-image.sh

Output

img_v3_02104_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxg

Complete Workflow

# 1. Upload → get image_key
IMAGE_KEY=$(bash <skill-dir>/scripts/upload-image.sh /path/to/image.png)

# 2. Send via feishu_im_user_message tool (OpenClaw-native, user token auto-managed)
#    action=send, msg_type=image, content="{\"image_key\":\"<IMAGE_KEY>\"}"

Credentials

Reads appId and appSecret from openclaw.json at channels.feishu. Can be overridden with env vars FEISHU_APP_ID and FEISHU_APP_SECRET.