第 4 步 · webhook 配置
背景
RelayHub 3.6 的集成经 outbound webhook 向接收端投递连接器事件。crm-primary 连接器(CRM 连接器,INT-CRM-014)的事件订阅见实例集成目录:
{
"workspace": "relayhub-main",
"integrations_total": 2,
"integrations": [
{"id": "INT-CRM-014", "name": "crm-primary", "kind": "crm-connector",
"owner": "crm-ops", "status": "onboarding",
"events": ["crm.contact.created", "crm.deal.updated"],
"outbound_webhook": null}
]
}
事件订阅(webhook_events)须与连接器记录的 events 一致;本批实例该字段无需修改。outbound webhook 的接收端在完成 INT-5 上线前验证时一并配置(见第 6 步:按内建回环验证流程由控制台配置实例自身接收端)。配置完成后,控制台与 GET /api/integration 的 webhook 字段应显示接收端地址。
操作
- 启动集成控制台:
控制台地址:python relayhub.pyhttp://127.0.0.1:20190 - 核对集成目录与 CRM 连接器状态:
预期响应(节选):curl http://127.0.0.1:20190/api/integration{ "product": "RelayHub", "version": "3.6", "workspace": "relayhub-main", "hook_schema": 2, "required_hook_schema": 2, "required_by": "3.6.2", "schema_ok": true, "baseline": {"present": true, "label": "2026R39", "integrity_ok": true, "seal_ok": true}, "webhook": null, "connectivity": "not_configured", "live": false, "integrations": {"total": 2}, "first_delivered_event": null }
自检
- 控制台「集成目录」共 2 个集成、其中 CRM 连接器 1 个(状态 onboarding);
webhook_events与连接器events一致(crm.contact.created / crm.deal.updated);- 投递事件本身不携带连接器凭据——凭据仅用于连接器与 CRM 之间的认证,不随 webhook 投递。