feat(skill): add local n8n webhook skill draft

This commit is contained in:
zap
2026-03-12 06:47:00 +00:00
parent ce068eb5b4
commit 7a44225481
4 changed files with 314 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
# n8n-webhook payload notes
## Current live endpoint
### `openclaw-ping`
Purpose:
- confirm OpenClaw can reach the local n8n webhook surface end-to-end
Typical request body:
```json
{
"message": "hello from OpenClaw"
}
```
Recommended success response:
```json
{
"ok": true,
"service": "n8n-agent",
"message": "openclaw webhook reached"
}
```
## Recommended contract for new endpoints
Prefer a stable JSON shape like:
```json
{
"ok": true,
"request_id": "optional-uuid",
"result": {
"...": "workflow-specific payload"
}
}
```
On failure, return a non-2xx status plus:
```json
{
"ok": false,
"error": {
"code": "short-machine-code",
"message": "human-readable summary"
}
}
```
## Naming guidance
- Use lowercase kebab-case webhook paths.
- Keep names explicit: `openclaw-ping`, `openclaw-action`, `append-log`, `send-notify`.
- Avoid generic names like `run`, `task`, or `webhook1`.
## Suggested action-bus pattern
If multiple agent-safe actions are needed, prefer one router webhook such as `openclaw-action`.
Request shape:
```json
{
"action": "append_log",
"args": {
"text": "backup finished"
},
"request_id": "optional-uuid"
}
```
That keeps the external surface small while letting n8n route internally.