← 返回
未分类 Key 中文

Ali Feishu Sender

Send multimedia content to Feishu (Lark) via API. Use when: (1) sending images, audio, video, rich text, or cards to Feishu users/groups, (2) uploading media...
通过 API 向飞书(Lark)发送多媒体内容。适用场景:(1) 向飞书用户/群组发送图片、音频、视频、富文本或卡片,(2) 上传媒体文件...
yuan-huicheng yuan-huicheng 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 309
下载
💾 0
安装
1
版本
#latest

概述

Feishu Media Sender

Send multimedia messages to Feishu with proper formatting: inline images, voice bubbles, video players, rich text, and cards.

Dependencies

  • ffmpeg at D:\ffmpeg\bin\ffmpeg.exe (for audio conversion, video fix)
  • ffprobe at D:\ffmpeg\bin\ffprobe.exe (for duration detection)
  • Python 3.7+
  • Feishu app credentials (pre-configured in script defaults)

Quick Reference

Run the script at scripts/feishu_media.py:

import sys; sys.path.insert(0, r'<skill_dir>/scripts'); from feishu_media import *

Available Functions

FunctionMessage TypeKey Features
-------------------------------------
send_text(text)textPlain text
send_image(filepath)imageInline embed, auto-detect mime
send_audio(filepath)audioVoice bubble, auto→opus, auto duration
send_video(filepath, cover_image=None)mediaInline player, faststart, auto duration
send_rich_text(title, elements)postRich text with embedded media
send_card(title, elements)interactiveCard with header color

All functions accept optional: open_id, token, app_id, app_secret.

Key Rules (learned from testing)

  1. Audio: Must be opus format, must include duration (ms). Auto-converts non-opus via ffmpeg.
  2. Video: Must upload as file_type=mp4, must include duration (ms). Script auto-applies -movflags +faststart.
  3. Video message type: Use msg_type=media (not video), content uses file_key + optional image_key for cover.
  4. Image in video: image_key is the cover thumbnail. Without it, video has no preview frame.
  5. Rich text media: Use {'tag': 'media', 'file_key': '...', 'image_key': '...'} as an independent paragraph.
  6. File upload types: opus (audio), mp4 (video), stream (generic file), pdf, doc, xls, ppt.

Example: Send MiniMax content to Feishu

# Image
send_image('minimax-output/kitten.png')

# TTS voice bubble (auto converts mp3→opus)
send_audio('minimax-output/greeting.mp3')

# Video with cover (auto faststart + duration)
send_video('minimax-output/kitten_video.mp4', cover_image='minimax-output/kitten.png')

# Rich text with video
send_rich_text('阿离的报告', [
    [{'tag': 'text', 'text': '一舞剑气动四方~'}],
    [{'tag': 'media', 'file_key': 'file_xxx', 'image_key': 'img_xxx'}],
])

CLI Usage

python scripts/feishu_media.py text "Hello"
python scripts/feishu_media.py image photo.png
python scripts/feishu_media.py audio greeting.mp3
python scripts/feishu_media.py video clip.mp4 --cover thumb.png

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 09:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

business-ops

Stripe

byungkyu
Stripe API 集成,支持托管 OAuth,实现对客户、订阅、发票、产品、价格和支付的可写金融集成。
★ 27 📥 26,278
business-ops

Trello

steipete
使用 Trello REST API 管理看板、列表和卡片
★ 162 📥 41,532
business-ops

Calendar

ndcccccc
日历管理与日程安排。创建事件、管理会议,并实现多日历平台同步。
★ 7 📥 23,398