Webhooks
Trigger actions from external services.
Overview
Webhooks allow external services to trigger OpenClaw actions:
- GitHub notifications
- CI/CD events
- Monitoring alerts
- Custom integrations
Creating Webhooks
bash
# Create a webhook
openclaw webhook create "my-webhook"This generates a unique URL:
https://your-server/webhook/abc123Configuration
json5
{
webhooks: {
enabled: true,
endpoints: [
{
name: "github",
secret: "your-secret",
prompt: "Process this GitHub event: {{payload}}",
channel: "telegram"
}
]
}
}Using Webhooks
GitHub Example
- Create webhook in OpenClaw
- Add webhook URL to GitHub repository settings
- Configure events to trigger
Payload Processing
The webhook payload is available in the prompt:
json5
{
prompt: "New event: {{payload.action}} on {{payload.repository.name}}"
}Security
Secret Validation
Validate webhook signatures:
json5
{
webhooks: {
endpoints: [
{
name: "github",
secret: "your-github-secret",
validateSignature: true
}
]
}
}IP Whitelisting
Restrict webhook sources:
json5
{
webhooks: {
allowedIPs: ["192.30.252.0/22"] // GitHub IPs
}
}Managing Webhooks
bash
# List webhooks
openclaw webhook list
# Delete webhook
openclaw webhook delete my-webhook
# Test webhook
openclaw webhook test my-webhook