集成

n8n

用 HTTP Request + Webhook 节点搭一个零代码 Thunderbit workflow

n8n 是开发者最常用的开源自动化引擎。两个内置节点就够了:HTTP Request 用来提交任务,Webhook 用来接回调。

单 URL —— /distill

  1. 加一个 HTTP Request 节点
  2. Method:POST · URL:https://openapi.thunderbit.com/openapi/v1/distill
  3. Authentication:Header Auth → Authorization: Bearer YOUR_API_KEY
  4. Body(JSON):
{
  "url": "{{ $json.url }}",
  "renderMode": "basic"
}
  1. 下一个节点能拿到 {{ $json.data.markdown }}。接进 Notion、Slack、OpenAI 等等。

批量 —— /batch/distill + Webhook 回调

URL 数量超过 5-10 个就该上异步任务了。两个 workflow:

Workflow A:提交方

  • HTTP Request → POST /openapi/v1/batch/distill
  • Body:
{
  "urls": {{ $json.urls }},
  "callback": {
    "url":    "https://your-n8n.example.com/webhook/thunderbit",
    "secret": "whsec_..."
  }
}

Workflow B:接收方

  • Webhook 节点,path 设 thunderbit
  • 用 secret 校验 X-Thunderbit-Signature Header(Function 节点,HMAC-SHA256)
  • 遍历 {{ $json.results }} → 每条 markdown 写入你的 sink

小贴士

  • 如果你没法暴露公网 Webhook,用 n8n 的 Wait 节点 + 轮询 HTTP Request 调 /batch/{jobId}
  • HTTP Request 节点开启 Continue On Fail,避免单条 4xx 把整个 workflow 干掉

相关链接