返回顶部
f

feishu-openclaw-integration飞书集成助手

飞书 + OpenClaw 无缝集成 - 5 分钟搭建企业 AI 助手。支持群聊机器人、智能客服、自动化工作流。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
91
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

feishu-openclaw-integration

飞书 + OpenClaw 集成 Skill

5 分钟搭建企业 AI 助手 - 零代码,即插即用。

核心价值

  • - ✅ 零代码 - 配置即用,无需编程
  • 企业级 - 飞书官方 API,稳定可靠
  • 智能回复 - 接入 OpenClaw 大模型
  • 自动化 - 定时推送、事件触发
  • 私有化 - 数据不离开企业

快速开始

方式 1:OpenClaw 内置(推荐,5 分钟)

  1. 1. 配置飞书频道(OpenClaw 已内置支持)

bash

编辑 ~/.openclaw/config/channels.json


{
feishu: {
enabled: true,
appId: YOURAPPID,
appSecret: YOURAPPSECRET,
encryptKey: YOURENCRYPTKEY,
verificationToken: YOURVERIFICATIONTOKEN
}
}

  1. 2. 创建飞书应用(3 分钟)

- 访问 https://open.feishu.cn
- 创建「企业自建应用」
- 启用「机器人」权限
- 配置事件回调(OpenClaw 自动处理)

  1. 3. 测试

# 在飞书群@机器人
@Jarvis 帮我写一份周报

方式 2:Node.js SDK(10 分钟)

bash

安装依赖


npm install @larksuiteoapi/node-sdk axios

创建集成脚本

cat > feishu-bot.js << EOF const lark = require(@larksuiteoapi/node-sdk); const axios = require(axios);

const client = new lark.Client({
appId: process.env.FEISHUAPPID,
appSecret: process.env.FEISHUAPPSECRET,
});

const OPENCLAWURL = process.env.OPENCLAWURL || http://localhost:3000;

// 处理飞书消息
client.im.message.subscribe({
on: async (event) => {
const { message } = event;
const content = JSON.parse(message.content);

// 发送到 OpenClaw
const response = await axios.post(${OPENCLAW_URL}/api/chat, {
message: content.text,
userId: message.sender_id,
channel: feishu,
});

// 回复消息
await client.im.message.create({
receiveidtype: chat_id,
params: { receiveid: message.chatid },
data: {
msg_type: text,
content: JSON.stringify({ text: response.data.reply })
}
});
}
});
EOF

运行

FEISHUAPPID=xxx FEISHUAPPSECRET=xxx node feishu-bot.js

实用场景

1. 群聊 AI 助手

yaml

config/group-assistant.yaml


prompts:
tech_group:
system: 你是技术群的 AI 助手,专业、简洁、直接。
temperature: 0.3

product_group:
system: 你是产品群的 AI 助手,关注用户体验、需求分析。
temperature: 0.7

2. 智能客服

python

自动回复规则


AUTO_REPLY = {
价格: 基础版 ¥99,高级版 ¥299,
售后: 请联系售后微信:xxx,
发票: 提供增值税普通发票,开票请联系财务,
}

def handle_keyword(text):
for keyword, reply in AUTO_REPLY.items():
if keyword in text:
return reply
return None # 转到 OpenClaw 处理

3. 定时通知

javascript
// 每天早上 9 点发送日报提醒
const schedule = require(node-schedule);

schedule.scheduleJob(0 9 *, async () => {
await client.im.message.create({
receiveidtype: chat_id,
params: { receiveid: WORKGROUP_ID },
data: {
msg_type: interactive,
content: JSON.stringify({
config: {
widescreenmode: true
},
elements: [{
tag: div,
text: {
tag: lark_md,
content: 📊 日报提醒\n\n请大家在今天 18:00 前提交日报
}
}]
})
}
});
});

4. 数据分析

javascript
// 分析群聊数据,生成报告
async function generateReport(chatId) {
const messages = await client.im.message.list({
params: {
containeridtype: chat_id,
container_id: chatId,
page_size: 100
}
});

// 发送给 OpenClaw 分析
const analysis = await axios.post(${OPENCLAW_URL}/api/analyze, {
data: messages,
task: 总结今天的讨论要点
});

return analysis.data;
}

高级功能

消息卡片(富文本)

javascript
// 发送精美卡片
await client.im.message.create({
receiveidtype: chat_id,
params: { receive_id: chatId },
data: {
msg_type: interactive,
content: JSON.stringify({
config: { widescreenmode: true },
header: {
title: {
tag: plain_text,
content: 🚀 AI 分析报告
}
},
elements: [{
tag: div,
text: {
tag: lark_md,
content: 关键结论\n- 用户增长 20%\n- 留存率 85%
}
}]
})
}
});

文件处理

javascript
// 处理上传的文件
if (message.msg_type === file) {
const fileKey = JSON.parse(message.content).file_key;

// 下载文件
const file = await client.im.file.download({
params: { type: file, file_key: fileKey }
});

// 发送给 OpenClaw 分析
const result = await axios.post(${OPENCLAW_URL}/api/analyze-file, {
file: file.data,
task: 总结这份文档的关键信息
});
}

多 Agent 协作

javascript
// 不同群用不同 Agent
const AGENTS = {
TECHGROUPID: jarvis, // 技术群
PRODUCTGROUPID: assistant, // 产品群
SALESGROUPID: sales-bot, // 销售群
};

async function routeMessage(chatId, text) {
const agent = AGENTS[chatId] || default;

return await axios.post(${OPENCLAW_URL}/api/chat, {
message: text,
agent: agent
});
}

配置文件模板

~/.openclaw/feishu-config.yaml

yaml

飞书应用配置


app:
id: cli_xxxxxxxxx
secret: xxxxxxxxxxxxxxxx
encrypt_key: xxxxxxxxxxxxxxxx
verification_token: xxxxxxxxxxxxxxxx

机器人配置

bot: name: Jarvis avatar: https://example.com/avatar.png welcome_message: 你好!我是 AI 助手 Jarvis,有什么可以帮你的?

自动回复

auto_reply: enabled: true rules: - keywords: [价格, 多少钱] reply: 基础版 ¥99,高级版 ¥299,企业定制请联系客服 - keywords: [发票, 开票] reply: 提供增值税普通发票,请联系财务 - keywords: [售后, 客服] reply: 售后微信:xxx

AI 配置

ai: model: gpt-4 temperature: 0.7 max_tokens: 2000 system_prompt: 你是企业 AI 助手,专业、高效、简洁。

群配置

groups: - chatid: ocxxxxxxxxx name: 技术群 agent: jarvis-tech enabled_commands: [/code, /review, /help] - chatid: ocxxxxxxxxx name: 产品群 agent: jarvis-product enabled_commands: [/pr, /analyze, /summary]

定时任务

schedule: - cron: 0 9 * message: 📊 日报提醒:请在 18:00 前提交日报 target_groups: [ALL] - cron: 0 18 * command: /summary target_groups: [技术群, 产品群]

常见问题

Q: 如何获取飞书应用凭证

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 feishu-openclaw-integration-1775968938 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 feishu-openclaw-integration-1775968938 技能

通过命令行安装

skillhub install feishu-openclaw-integration-1775968938

下载

⬇ 下载 feishu-openclaw-integration v1.0.0(免费)

文件大小: 4.65 KB | 发布时间: 2026-4-13 10:16

v1.0.0 最新 2026-4-13 10:16
Initial release – Seamlessly integrate Feishu with OpenClaw for enterprise AI assistants in 5 minutes.

- Zero-code setup; ready to use without programming
- Enterprise-grade integration using official Feishu APIs
- Supports group chat bots, intelligent customer support, and automated workflows
- Includes message handling, scheduled notifications, file processing, and multi-agent collaboration
- Customizable with configuration templates and best practices

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部