feishu-im飞书消息与群管理 Skill。发送消息、建群、置顶、加急、撤回、群菜单/Tab/公告等 25+ 项 IM 能力。当需要通过飞书发送消息、管理群聊、操作群成员或配置群功能时使用此 Skill。
Install via ClawdBot CLI:
clawdbot install sunnyyao2222-eng/feishu-im你是飞书 IM 自动化专家,负责通过 API 实现消息发送、群聊管理和群功能配置。
| 项目 | 值 |
|------|---|
| Base URL | https://open.feishu.cn/open-apis/im/v1 |
| 认证方式 | Authorization: Bearer {tenant_access_token} |
| Content-Type | application/json |
POST /open-apis/im/v1/messages?receive_id_type=open_id
{
"receive_id": "ou_xxx",
"msg_type": "text",
"content": "{\"text\":\"Hello\"}"
}
实测心法:content 必须是字符串化的 JSON,不能直接传对象。
receive_id_type 可选值:open_id / user_id / union_id / email / chat_id
POST /open-apis/im/v1/messages?receive_id_type=open_id
{
"receive_id": "<open_id>",
"msg_type": "interactive",
"content": "<card_json_string>"
}
实测心法:
content 必须是字符串化的 JSON(JSON string),不能是原始 JSON 对象。{\"config\":...})。卡片结构:
{
"config": { "wide_screen_mode": true },
"header": {
"title": { "tag": "plain_text", "content": "卡片标题" },
"template": "blue"
},
"elements": [
{ "tag": "div", "text": { "tag": "lark_md", "content": "**加粗** 和 `代码` 支持" } },
{ "tag": "hr" },
{ "tag": "action", "actions": [
{ "tag": "button", "text": { "tag": "plain_text", "content": "确认" }, "type": "primary", "value": { "action": "confirm" } }
]}
]
}
Header 颜色模板:
| template | 颜色 | 适用场景 |
|----------|------|---------|
| blue | 蓝色 | 日常通知、信息 |
| green | 绿色 | 成功、完成 |
| red | 红色 | 告警、失败 |
| orange | 橙色 | 警告、降级 |
| purple | 紫色 | 特殊、创意 |
| turquoise | 青色 | 技术结果 |
| grey | 灰色 | 低优先级 |
lark_md 语法:加粗、斜体、~~删除线~~、链接、
POST /open-apis/im/v1/pins
{ "message_id": "om_xxx" }
实测心法:必须使用 /pins 集合端点,不能使用 messages/:id/pin 路径。
POST /open-apis/im/v1/messages/:message_id/reactions
{ "reaction_type": { "emoji_type": "OK" } }
实测心法:emoji_type 必须使用大写标准 ID(如 OK、THUMBSUP、HEART)。
DELETE /open-apis/im/v1/messages/:message_id
实测心法:仅能撤回机器人自己在有效期内发送的消息。
PATCH /open-apis/im/v1/messages/:message_id/urgent_app
{ "user_id_list": ["ou_xxx"] }
实测心法:消耗加急额度,请谨慎调用,仅用于 P0 级事件。
POST /open-apis/im/v1/chats/:chat_id/top_notice
{ "action_type": "message", "message_id": "om_xxx" }
实测心法:置顶条目有限,建议仅置顶核心卡片。
POST /open-apis/im/v1/messages/batch_send
实测心法:注意限频策略,单次建议控制在 200 个群。
POST /open-apis/im/v1/messages/send_sys
实测心法:视觉干扰度低,适合非业务强提醒(如入群须知)。
POST /open-apis/im/v1/chats
{ "name": "群名称", "user_ids": ["ou_xxx"] }
实测心法 (重要):
user_ids,但由于飞书缓存或权限延迟,建议紧接着调用 12. 拉人入群 API 显式将用户再次加入,以确保群聊在用户端立即弹出。GET /open-apis/im/v1/chats/:chat_id/members
实测心法:分页拉取大群成员时注意 Token 翻页。
POST /open-apis/im/v1/chats/:chat_id/members?member_id_type=open_id
{ "id_list": ["ou_xxx"] }
实测心法:被拉取人必须在机器人可见范围内。这是确保群聊对用户可见的最稳健方式。
PATCH /open-apis/im/v1/chats/:chat_id/announcement
{ "content": "最新进度..." }
实测心法:内容支持富文本格式。
GET /open-apis/im/v1/chats/:chat_id/announcement
实测心法:解析内容后可结合 LLM 生成执行周报。
POST /open-apis/im/v1/chats/:chat_id/menu_tree
实测心法:在群聊右上角添加自定义菜单(如"项目概览"、"一键周报"),极大增强群聊的功能入口属性。
POST /open-apis/im/v1/chats/:chat_id/tabs
实测心法:群内集成多维表格看板、Wiki SOP 为独立 Tab,让群聊变身为"项目工作台"。
POST /open-apis/im/v1/chats/:chat_id/widgets
实测心法:在群聊右侧挂载动态汇率表、实时监控大屏,将群聊 UI 能力扩展到极限。
POST /open-apis/im/v1/chats/:chat_id/collab_plugins
实测心法:在对话框上方常驻"项目文档"入口,减少翻找时间。
POST /open-apis/im/v1/url_preview
实测心法:机器人发送的项目链接,自动附带最新的进度摘要,增强信息传达的视觉丰富度。
POST /open-apis/im/v1/feed_cards
实测心法:在飞书左侧导航栏推送即时状态,比消息更轻量,适合展示"当前正在运行"的任务。
POST /open-apis/im/v1/tags
实测心法:为群聊或成员打上业务标签(如"核心项目"、"高优先级"),便于后续分类筛选。
权限:im:datasync.feed_card.time_sensitive:write
实测心法:将外部 CRM 或代码仓库动态实时推送到飞书 Feed,对时间敏感型信息(如紧急 Bug)效果极佳。
权限:im:chat.access_event.bot_p2p_chat:read
实测心法:确保机器人能主动给特定用户发送私聊,用户需在机器人可见范围内。
| 错误码 | 含义 | 解决方案 |
|--------|------|---------|
| 0 | 成功 | — |
| 230001 | 无发送权限 | 检查机器人是否在群内或用户可见范围 |
| 230002 | 消息不存在 | 检查 message_id 是否正确 |
| 230014 | 频率限制 | 等待后重试,注意限频策略 |
| 99991663 | token 过期 | 重新获取 tenant_access_token |
Generated Mar 1, 2026
Teams use this skill to send automated status updates via interactive cards, create dedicated project groups with tabs for task boards, and set up group menus for quick access to reports. It enhances collaboration by keeping all members informed and organized in a single workspace.
Support teams leverage the skill to send urgent alerts for critical issues, manage group announcements for service updates, and use widgets to display real-time metrics. It streamlines communication and ensures timely resolution of customer inquiries.
HR departments utilize the skill to broadcast onboarding messages, create announcement groups with pinned notices, and send system messages for policy updates. It facilitates efficient internal communication and employee engagement.
Marketing teams employ the skill to batch-send campaign updates to multiple groups, use feed cards for real-time analytics, and manage tags for segmenting audience feedback. It optimizes campaign tracking and team alignment.
Organizations use this skill to send urgent notifications during crises, create temporary groups for rapid response, and set up collaborative plugins for document sharing. It ensures quick and organized action in high-stakes situations.
Offer the skill as part of a subscription-based platform for businesses, providing tiered access to advanced features like batch messaging and group widgets. Revenue is generated through monthly or annual fees based on usage and support levels.
Provide custom integration and setup services for enterprises, helping them implement the skill with existing systems like CRM or project tools. Revenue comes from one-time project fees and ongoing maintenance contracts.
Offer basic messaging and group management for free, while charging for advanced capabilities such as urgent messaging, feed card synchronization, and enhanced analytics. Revenue is driven by upgrades to premium tiers.
💬 Integration Tip
Ensure proper tenant access token management and test API calls in a sandbox environment to handle permissions and rate limits effectively.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.
Gmail API integration with managed OAuth. Read, send, and manage emails, threads, labels, and drafts. Use this skill when users want to interact with Gmail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Automatically logs into email accounts (Gmail, Outlook, QQ Mail, etc.) and generates daily email summaries. Use when the user wants to get a summary of their emails, check important messages, or create daily email digests.
Fetch content from Feishu (Lark) Wiki, Docs, Sheets, and Bitable. Automatically resolves Wiki URLs to real entities and converts content to Markdown.
Manage Feishu (Lark) calendars by listing, searching, checking schedules, syncing events, and marking tasks with automated date extraction.