Feishu Bot — Feishu 机器人
v1.0.0Feishu (Lark) 机器人 integration for messaging, group management, and 应用roval 工作流s. 发送 messages, manage groups, handle 应用rovals, and automate 通知 via Feishu Open 平台 API.
运行时依赖
安装命令
点击复制技能文档
Feishu 机器人
Complete Feishu/Lark 机器人 integration for AI 代理s.
Features
- Messaging
- Group Management
- 应用roval 工作流s
设置 环境 variables:
导出 FEISHU_应用_ID="命令行工具_xxx" 导出 FEISHU_应用_SECRET="xxx"
Or 配置 in OpenClaw 设置tings.
Usage 发送 Text Message from feishu_机器人 导入 Feishu机器人
机器人 = Feishu机器人()
# 发送 to user 机器人.发送_text("user_id", "Hello from 机器人!")
# 发送 to group 机器人.发送_text("chat_id", "Group message", is_chat=True)
发送 Card Message card = { "type": "template", "data": { "template_id": "xxx", "template_variable": {"title": "Notification"} } } 机器人.发送_card("chat_id", card)
创建 Group group = 机器人.创建_group( name="Project Team", user_ids=["ou_xxx", "ou_yyy"] ) print(group["chat_id"])
应用roval 工作流 # 创建 应用roval 应用roval = 机器人.创建_应用roval( 应用roval_code="xxx", user_id="ou_xxx", form={"field1": "value1"} )
# 查询 状态 状态 = 机器人.获取_应用roval_instance(应用roval["instance_id"])
API Reference Method Description 发送_text(tar获取, text, is_chat=False) 发送 text message 发送_card(tar获取, card, is_chat=False) 发送 card message 发送_image(tar获取, image_key, is_chat=False) 发送 image 发送_file(tar获取, file_key, is_chat=False) 发送 file 创建_group(name, user_ids) 创建 group 添加_group_members(chat_id, user_ids) 添加 members 移除_group_members(chat_id, user_ids) 移除 members 创建_应用roval(应用roval_code, user_id, form) 创建 应用roval 获取_应用roval_instance(instance_id) 获取 应用roval 状态 Error Handling
Common errors:
99991663: 令牌 expired - refresh tenant 令牌 99991664: 权限 denied - 检查 应用 权限s 99991661: User not found - 验证 user_id Links Feishu Open 平台 API Documentation 机器人 Development 图形界面de