Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

The Wait Node Is the Easy Part: 6 Ways an n8n Human-Approval Step Breaks (and the .NET Fixes)

说明与用途

文章说明了如何通过 .NET API 验证 HMAC 签名、时间戳、幂等键和状态机,解决 n8n 人工审批步骤中的六种常见错误。

问题

Human approval steps in n8n workflows often fail due to signature mismatches, replay attacks, duplicate drafts, conflicting decisions, and retry logic.

结果

All six failure modes were addressed, yielding a robust human‑approval workflow with 32 passing tests and idempotent, secure draft handling.

工作流

  • 1. n8n creates draft JSON and signs raw string. 2. Sends POST to .NET API with raw body. 3. API verifies signature against raw bytes and timestamp. 4. API stores draft with idempotency key. 5. Human reviews via webhook, posts decision. 6. API updates draft state using state machine rules.
  • 7. n8n resumes workflow based on final state.

证据

The first thing you do is sign the request with HMAC so only your n8n can submit drafts.

来源

The fix: build the JSON string once in a Code node, sign that exact string, and send it as a raw body.

来源

sign the timestamp together with the body, as "{unixSeconds}.{rawBody}"

来源

an idempotency key that n8n can compute the same way on every retry.

来源

A draft can only leave <code>pending</code>, and only once.

来源

  • 记录日期: 2026-10-22T13:11:11.892Z