-
Notifications
You must be signed in to change notification settings - Fork 1.5k
zh tags webhook
langbot-wiki-sync[bot] edited this page Jul 29, 2026
·
1 revision
Webhooks 允许您将机器人收到的消息事件发送到外部服务进行处理。
- 在 LangBot WebUI 中,点击侧边栏的 "API 集成" 按钮
- 切换到 "Webhooks" 标签页
- 点击 "+" 按钮创建新的 Webhook
- 填写以下信息:
- 名称:Webhook 的名称
- URL:接收事件的目标 URL
- 描述:可选说明
- 状态:启用或禁用
{
"uuid": "event-unique-id",
"event_type": "bot.person_message",
"data": {
"bot_uuid": "bot-uuid",
"adapter_name": "AdapterName",
"sender": {
"id": "user-id",
"name": "User Name"
},
"message": [
{
"type": "Plain",
"text": "消息内容"
}
],
"timestamp": 1234567890
}
}{
"uuid": "event-unique-id",
"event_type": "bot.group_message",
"data": {
"bot_uuid": "bot-uuid",
"adapter_name": "AdapterName",
"group": {
"id": "group-id",
"name": "Group Name"
},
"sender": {
"id": "user-id",
"name": "User Name"
},
"message": [
{
"type": "Plain",
"text": "消息内容"
}
],
"timestamp": 1234567890
}
}Webhook 服务应返回 JSON 响应:
{
"status": "ok",
"skip_pipeline": false
}- status: 处理状态(建议返回 "ok")
-
skip_pipeline: 是否跳过 LangBot 流水线处理
-
true: 消息不会继续在流水线中处理 -
false: 消息正常进入流水线处理
-
Tip
skip_pipeline 允许您完全接管消息处理。设置为 true 时,消息只由 Webhook 服务处理,不触发 LangBot 的 AI 对话功能。
使用 dify-plugin-langbot-trigger 插件接收 LangBot webhook 事件,在 Dify 中创建工作流处理消息。
- Webhook URL 必须可访问
- 请求超时时间为 15 秒
- 请求失败不影响消息正常处理
- 支持配置多个 Webhook 并行执行
- 任一 Webhook 返回
skip_pipeline: true时跳过流水线处理
Automatically synchronized from langbot-app/langbot-wiki.
简体中文
指南
开发者
- 插件开发
- 插件 SDK API
- 核心开发
API 参考
- Service API
English
Guides
Developers
-
Plugin Development
- Plugin Development Tutorial
- Completing Plugin Configuration Information
- Plugin Directory Structure
- Component Development
- Code Style Guide
- Migration Guide
- Publish Plugin
- Plugin SDK API
- Core Development
API Reference
- Service API