Manage idempotent lead intake via webhook, Postgres, and HTTP APIs
Ready for 3.0What this workflow does
This workflow has 15 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Postgres.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Postgres: run a query
- Code: runs custom JavaScript code
- Postgres: run a query
- Code: runs custom JavaScript code
- If: checks a condition and branches into true / false
- HTTP Request: calls an HTTP API (POST)
- Respond to Webhook: sends the response back to the webhook caller
- Wait: waits 2 seconds
- Code: runs custom JavaScript code
- HTTP Request: calls an HTTP API (POST)
…plus 4 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Webhook
n8n-nodes-base.webhook - Postgres
n8n-nodes-base.postgres - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Wait
n8n-nodes-base.wait - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow receives lead submissions via a webhook and uses PostgreSQL to enforce idempotency so the same Idempotency-Key is processed at most once, replaying stored results on retries. For newly claimed requests, it calls external…