Session ↔ OpenClaw bridge
Use this skill to manage the OpenClaw and n8n side of a Session Messenger relay.
Scope
Handle:
- - n8n workflow generation/import/patching
- relay health validation
- endpoint verification for
/health, /poll, /send, and attachment download when present - mismatch detection between deployed relay and expected API
- OpenClaw endpoint wiring guidance
- packaging the skill for reuse or publication
Do not assume the Session relay should implement OpenClaw chat generation internally. Keep the model:
- - relay handles Session connectivity and exposes HTTP endpoints
- n8n orchestrates polling, filtering, and reply delivery
- OpenClaw generates replies
Primary files
Read these when needed:
- -
references/openclaw-session-relay-workflow.json — n8n workflow template - INLINECODE4 — shared publication version for the skill and relay project
- INLINECODE5 — probe relay endpoints and summarize readiness
Expected relay API
Expected minimum HTTP API:
- - INLINECODE6
- INLINECODE7
- INLINECODE8
Optional attachment endpoint for image/file workflows:
Expected /health fields for a correct modern deployment:
- - INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
If /poll returns 404 or /health omits the inbound queue fields, treat the deployed relay as an older/wrong build.
n8n workflow model
Preferred flow:
- 1. Cron trigger
- Poll Session relay INLINECODE18
- Extract next cursor
- Split messages
- Filter allowed sender
- POST message text to OpenClaw endpoint
- POST reply to relay INLINECODE19
The relay is text-first but may support image/file exchange when its /health capabilities and implementation confirm attachment receive/send support. Do not promise calls or live media.
OpenClaw endpoint note
Do not invent the OpenClaw HTTP endpoint. Confirm the actual endpoint and payload shape before activation.
Packaging
Current shared release version: INLINECODE21
Package with:
CODEBLOCK0
If preparing for ClawHub, ensure:
- - the skill release version matches the hosted relay project version
- the packaged skill contains only:
-
SKILL.md
- minimal scripts
- references actually used by the skill
技能名称: session-openclaw-bridge
详细描述:
Session ↔ OpenClaw 桥接器
使用此技能管理 Session Messenger 中继的 OpenClaw 和 n8n 侧。
范围
处理:
- - n8n 工作流生成/导入/修补
- 中继健康验证
- /health、/poll、/send 端点的验证,以及附件下载(如存在)
- 已部署中继与预期 API 之间的不匹配检测
- OpenClaw 端点连接指导
- 打包技能以供复用或发布
不要假设 Session 中继应在内部实现 OpenClaw 聊天生成。保持模型:
- - 中继处理 Session 连接并暴露 HTTP 端点
- n8n 编排轮询、过滤和回复投递
- OpenClaw 生成回复
主要文件
需要时读取以下文件:
- - references/openclaw-session-relay-workflow.json — n8n 工作流模板
- references/release.md — 技能和中继项目的共享发布版本
- scripts/validate_relay.py — 探测中继端点并总结就绪状态
预期中继 API
预期的最低 HTTP API:
- - GET /health
- GET /poll?since=&limit=
- POST /send
用于图片/文件工作流的可选附件端点:
- - GET /attachment/:messageId/:attachmentId
正确现代部署的 /health 预期字段:
- - ok
- sessionId
- inboundEnabled
- queued
- lastSeq
如果 /poll 返回 404 或 /health 缺少入站队列字段,则将已部署的中继视为较旧/错误的构建。
n8n 工作流模型
首选流程:
- 1. Cron 触发器
- 轮询 Session 中继 /poll
- 提取下一个游标
- 拆分消息
- 过滤允许的发件人
- 将消息文本 POST 到 OpenClaw 端点
- 将回复 POST 到中继 /send
中继以文本优先,但当其 /health 能力和实现确认支持附件接收/发送时,可能支持图片/文件交换。不要承诺通话或实时媒体。
OpenClaw 端点说明
不要自行发明 OpenClaw HTTP 端点。在激活前确认实际端点和负载格式。
打包
当前共享发布版本:0.1.0
使用以下命令打包:
bash
scripts/package_skill.py /home/openclaw/.openclaw/workspace/skills/session-openclaw-bridge
如果准备发布到 ClawHub,请确保:
- - 技能发布版本与托管中继项目版本匹配
- 打包的技能仅包含:
- SKILL.md
- 最小化脚本
- 技能实际使用的参考文件