Webhook
接收外部事件。
概述
Webhook 允许外部系统触发 OpenClaw 动作。
配置
json
{
"webhooks": {
"enabled": true,
"endpoints": [
{
"path": "/webhook/my-hook",
"secret": "webhook-secret",
"action": "system-event"
}
]
}
}使用
发送 POST 请求:
bash
curl -X POST http://localhost:18789/webhook/my-hook \
-H "X-Webhook-Secret: webhook-secret" \
-H "Content-Type: application/json" \
-d '{"message": "外部事件触发"}'验证
使用 secret 验证请求来源:
json
{
"secret": "your-webhook-secret"
}请求头:X-Webhook-Secret: your-webhook-secret
动作类型
system-event- 触发系统事件message- 发送消息agent- 触发智能体
Gmail Pub/Sub
Gmail 集成使用 Google Cloud Pub/Sub:
bash
openclaw webhooks gmail setup --account your@gmail.com
openclaw webhooks gmail run参见 Gmail Pub/Sub。