← 返回
内容创作 Key 中文

Feishu Cards

Send customizable interactive Feishu cards with titles, content, buttons, and color templates via Feishu Open API for users or group chats.
通过飞书开放 API,向用户或群聊发送可定制的交互式卡片,支持标题、内容、按钮和颜色模板。
seetherianbow
内容创作 clawhub v1.0.0 1 版本 99880.8 Key: 需要
★ 0
Stars
📥 838
下载
💾 35
安装
1
版本
#latest

概述

Feishu Cards

Send interactive cards to Feishu (飞书) directly via Feishu Open API.

When to Use

  • User wants to send rich interactive messages in Feishu
  • Need buttons, forms, or dropdown menus in messages
  • Want beautifully formatted messages with colors

Installation

clawhub install feishu-cards

Usage

CLI

# Basic card
feishu-cards --to "ou_xxx" --title "标题" --content "内容"

# With buttons
feishu-cards --to "ou_xxx" --title "任务" --content "有新任务" --buttons "处理,稍后"

# Custom color
feishu-cards --to "ou_xxx" --title "警告" --content "注意" --template "red"

# To chat
feishu-cards --to "oc_xxx" --type "chat_id" --title "群通知" --content "大家好"

As Python Module

from feishu_card_sender import FeishuCardSender

sender = FeishuCardSender()
result = sender.send(
    recipient_id="ou_xxx",
    title="任务提醒",
    content="你有一个新任务",
    buttons=["立即处理", "稍后提醒"],
    template="blue"
)

Options

FlagDescriptionDefault
----------------------------
--toRecipient ID (user or chat)Required
--typeID type: open_id, user_id, chat_idopen_id
--titleCard titleRequired
--contentCard content textRequired
--buttonsComma-separated buttonsNone
--templateColor: blue, green, red, yellow, greyblue
--noteOptional noteNone

Card Elements

  • Header - Title with color template
  • Content - Main text (plain text format)
  • Buttons - Interactive buttons (primary/default types)
  • Note - Additional info with icon

Button Types

  • primary - Blue button (first button)
  • default - Gray button (other buttons)

Examples

Task Notification

python3 feishu_card_sender.py \
  --to "ou_9d00de9a95a2fb69c425f0a39930c67a" \
  --title "📋 任务通知" \
  --content "你有一个新任务待处理" \
  --buttons "立即处理,稍后提醒" \
  --template "blue"

Alert Card

python3 feishu_card_sender.py \
  --to "ou_xxx" \
  --title "⚠️ 警告" \
  --content "账户存在异常登录" \
  --template "red" \
  --buttons "查看详情"

Requirements

  • Python 3.7+
  • requests library

Install: pip install requests

Configuration

Credentials are read from environment variables (optional):

  • FEISHU_APP_ID
  • FEISHU_APP_SECRET

Defaults to OpenClaw's configured Feishu app.

Notes

  • Cards work in Direct Messages and group chats
  • Buttons open URLs (configure your callback server for full interactivity)
  • Maximum card size: 45KB

Made for ClawHub

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 21:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,087
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,221
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,513