360 Secure SkillHub
360 安全技能中心

Feishu Upload Image

通过 Bash 脚本读取飞书应用凭证并调用图片上传接口,把本地图片文件上传后返回 image_key,供后续发送飞书图片消息使用。凭证默认取自 openclaw.json 的飞书通道配置,也可用环境变量覆盖;本 Skill 只负责上传,不发送消息。

jkzleond
jkzleond
热度 55.76
最近更新 2026-05-11 17:36:23
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:API 集成 / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add feishu-upload-image
Metadata
name
feishu-upload-image
description
Upload a local image to Feishu and get its image_key. Use when you need to send an image via Feishu IM but first need the image_key returned by the upload API. Only handles: local file → Feishu image_key. Does NOT send the message — use feishu_im_user_message tool for that.

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.