My n8n lead agent looked fine until I found 3 failure points: Apollo 200s, HubSpot 423s, and bad JSON handoffs
说明与用途
在 n8n 线索丰富工作流中,由于 Apollo 合同检查薄弱、HubSpot 重试逻辑不当以及 GPT‑5 JSON 未验证,导致重复、记录不完整和昂贵的重试。解决方案包括严格的 Apollo 验证、带 423 处理的幂等 HubSpot upsert 以及 GPT 输出的预验证。
问题
Duplicate contacts, half‑filled records, and costly retries in an n8n lead enrichment workflow caused by weak contract checks, improper retry logic, and unvalidated LLM output.
结果
The workflow now avoids duplicate contacts, reduces retries, and ensures only fully enriched, correctly formatted data reaches HubSpot.
工作流
- Pull new lead into n8n
- Call Apollo enrichment API
- Validate Apollo response for required fields
- Send data to GPT‑5 for JSON normalization
- Validate GPT‑5 JSON against schema
- Create or upsert contact in HubSpot with idempotency key
- On 423 Locked, wait 3s, check existing contact, retry or create accordingly
- Log success or failure
证据
Apollo returned HTTP 200 with nothing useful
HubSpot threw 423 Locked
GPT‑5 kept confidently retrying bad JSON
- 记录日期: 2026-09-06T12:52:22.177Z