Duaer

集成

在 Duaer 里使用 Webhook

在 Duaer 里,Webhook 在有请求到达它的地址时启动工作流程。

用 Webhook 启动 Duaer 工作流程

带示例的完整说明见 在 Duaer 里用 Webhook 接收请求。

  1. 在 Duaer 画布上打开节点面板,搜索 Webhook,把它放在第一个节点。
  2. 在 Authentication 里选 Basic Auth、Header Auth、JWT Auth、Duaer User Auth (OAuth2)、None 其中一种,再在 Credential to connect with 里选择或新建对应凭证(Basic Auth、Header Auth、JWT Auth)。
  3. 检查节点上的 Allow Multiple HTTP Methods、Path、Respond。
  4. 需要时点 Add Option,添加下文列出的可选设置。
  5. 点 Execute step,向节点的 Test URL 发一次测试请求。发布工作流程后,每个到达 Production URL 的请求都会启动一次运行。

Duaer 里 Webhook 的参数

Allow Multiple HTTP Methods、Path、Respond。

Duaer 里 Webhook 的可选设置

Add Option 下有 Allowed Origins (CORS)、Binary File、Field Name for Binary Data、Ignore Bots、IP(s) Allowlist、No Response Body、OAuth2 Client、Only Run If、Property Name、Put Output File in Field、Raw Body、Response Code。

Webhook 地址

Duaer 给每个 Webhook 节点两个地址,在节点顶部的「Webhook 地址」里切换:

  • 测试地址:搭建和调试时用。点「监听测试事件」,Duaer 等待 2 分钟,收到的请求和数据直接显示在编辑器里。
  • 生产环境地址:工作流程发布后生效,直到取消发布。每次调用记在执行记录里。

两个地址的路径由 Path 参数决定。同一路径和方法只能有一个已发布的 Webhook。常见问题见 Webhook 常见问题。

常见问题

报错原因和修法见 Duaer 里 Webhook 的常见问题。

常见问题

Duaer 的 Webhook 要填什么?

在 Duaer 里,Webhook 主要填写 Allow Multiple HTTP Methods、Path、Respond。

Duaer 工作流程发布前,Webhook 会运行吗?

测试时只有 Test URL 可用。发布 Duaer 工作流程后,Production URL 才会启动正式运行。

Duaer 的 Webhook 用哪种凭证?

Duaer 的 Webhook 根据 Authentication 的选择,使用 Basic Auth、Header Auth、JWT Auth 之一。

同组