Loading...
Loading...
Use when user says "发到飞书", "飞书通知", "通知飞书", "feishu", "发给我", "私发飞书", or explicitly invokes /send-feishu to send messages, images, or files to Feishu group chat or individual via webhook or API
npx skill4agent add jssfy/k-skills send-feishu| Variable | Purpose | Required |
|---|---|---|
| Group Webhook URL | For text/card/image to group |
| App credential | For image/file upload & API send |
| App credential | For image/file upload & API send |
| Group chat ID ( | For API send to group |
| Personal open_id ( | For send to individual |
Text/Card to group → Webhook (simple, no auth needed)
Image to group → Get token → Upload image → Webhook send image_key
File to group → Get token → Upload file → API send to chat_id
Image/File to person → Get token → Upload resource → API send to open_id
Text/Card to person → Get token → API send to open_idcurl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \
-H 'Content-Type: application/json' \
-d '{"app_id":"'"$FEISHU_APP_ID"'","app_secret":"'"$FEISHU_APP_SECRET"'"}'{"code":0,"msg":"ok","tenant_access_token":"t-xxx","expire":7200}curl -s -X POST 'https://open.feishu.cn/open-apis/im/v1/images' \
-H "Authorization: Bearer $TOKEN" \
-F 'image_type="message"' \
-F 'image=@"/path/to/image.png"'{"code":0,"data":{"image_key":"img_xxx"}}curl -s -X POST 'https://open.feishu.cn/open-apis/im/v1/files' \
-H "Authorization: Bearer $TOKEN" \
-F 'file_type="stream"' \
-F 'file_name="report.md"' \
-F 'file=@"/path/to/file"'file_typeopusmp4pdfdocxlspptstream{"code":0,"data":{"file_key":"file_xxx"}}curl -s -X POST "$FEISHU_WEBHOOK" -H "Content-Type: application/json" \
-d '{"msg_type":"text","content":{"text":"MESSAGE_HERE"}}'greenorangeredbluepurplecurl -s -X POST "$FEISHU_WEBHOOK" -H "Content-Type: application/json" \
-d '{
"msg_type":"interactive",
"card":{
"header":{"title":{"content":"TITLE","tag":"plain_text"},"template":"COLOR"},
"elements":[{"tag":"div","text":{"content":"BODY_LARK_MD","tag":"lark_md"}}]
}
}'**bold***italic*~~strike~~[link](url)\nimage_keycurl -s -X POST "$FEISHU_WEBHOOK" \
-H "Content-Type: application/json" \
-d '{"msg_type":"image","content":{"image_key":"img_xxx"}}'curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{"receive_id":"'"$FEISHU_CHAT_ID"'","msg_type":"MSG_TYPE","content":"CONTENT_JSON_STRING"}'curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{"receive_id":"'"$FEISHU_USER_OPEN_ID"'","msg_type":"MSG_TYPE","content":"CONTENT_JSON_STRING"}'content{"receive_id":"ID","msg_type":"text","content":"{\"text\":\"Hello\"}"}{"receive_id":"ID","msg_type":"image","content":"{\"image_key\":\"img_xxx\"}"}{"receive_id":"ID","msg_type":"file","content":"{\"file_key\":\"file_xxx\"}"}{"code":0,"msg":"success"}{"code":0,"msg":"success","data":{...}}codeprintf '%s'im:message:send_as_botim:resource