Bibliothek / Lead-Generierung & Anreicherung
Lead-Generierung & Anreicherung
Webhook-Leads idempotent aufnehmen mit Postgres-Schlüsselreservierungen und HTTP-APIs
Nimmt Lead-POSTs mit einem Idempotency-Key entgegen, reserviert den Schlüssel in Postgres, reichert neue Leads an, bewertet sie, übergibt sie an das CRM und benachrichtigt das Team, wobei Duplikate wiederholt oder abgelehnt werden.
Was sie bewirkt
## Idempotent Lead Management ### How it works A single POST with a client-supplied Idempotency-Key is guaranteed to process the lead at most once, even under retries, timeouts or concurrent duplicates. 1. Webhook validates + fingerprints the payload, then atomically claims the key in Postgres. 2. New key → continues to enrichment → score → CRM → notify. 3. Completed key → stored response is replayed as-is. 4. Key in flight → returns 409 so the client retries shortly. 5. Key reused with different payload → rejected with 422. Only a freshly claimed key reaches the external APIs. The same Idempotency-Key is forwarded where useful. ### Node budget - 4 Code nodes - 3 HTTP Request (API) nodes - 2 Wait nodes ### Setup - Add Postgres credentials to the three Postgres nodes. - Replace the three provider URLs in CONFIG (Code - Validate & Fingerprint). - Review leaseSeconds, timeouts, allowedSources, maxScoreThreshold. - Test with curl: two identical POSTs with the same Idempotency-Key must return the same body (second has Idempotent-Replayed: true). - Set allowSimulation=false in production.
Die Schritte
- Webhook - Lead Submission
- Postgres - Ensure Idempotency Store
- Code - Validate & Fingerprint
- Postgres - Claim Idempotency Key
- Code - Route Request
- IF - Execute Processing?
- HTTP Request - Enrichment API
- Wait - After Enrichment
- Code - Score Lead
- HTTP Request - CRM API
- Wait - After CRM
- HTTP Request - Notification API
- Code - Classify & Finalize
- Postgres - Store Result
Insgesamt 15 Schritte.
Ähnliche Automatisierungen
Berichte, Analysen & DashboardsIdentify slow and expensive workflow nodes via webhook and HTTP APIs13 SchritteLead-Generierung & AnreicherungLinkedIn-Leads mit OpenRouter-Recherche und Google-Suche finden11 SchritteLead-Generierung & AnreicherungLeads mit Apollo und GPT-4 über Telegram generieren21 SchritteLead-Generierung & AnreicherungEingehende Formular-Leads mit Gaffa-Website-Prüfungen und HubSpot qualifizieren12 Schritte