In this blog post, we delve into the capabilities of n8n, a powerful tool perfect for teams seeking comprehensive API control and custom data processing. You’ll learn how to create a production pipeline utilizing HTTP requests to Lusha endpoints for company and person data, along with function nodes for scoring and normalization. The pipeline also features conditional overwrites and bulk processing techniques to enhance efficiency. We provide a detailed overview of the essential nodes involved, from setting up triggers to integrating with CRM systems, alongside a pseudocode example to illustrate the scoring mechanism. Join us as we explore how to optimize your data handling with n8n!
n8n is ideal for teams that want full API control, custom scoring math, bulk processing, and strict overwrite rules.
What you’ll build
A production pipeline with:
- HTTP Request to Lusha Company/Person endpoints
- Function nodes for scoring and normalization
- Conditional overwrite (only write to CRM if the field is empty, or Lusha confidence ≥ 95)
- Bulk processing via list chunking
- Signals webhook that applies a temporary score multiplier
Nodes overview
Trigger: Webhook (real time) or Cron (batch).
HTTP Request → Lusha /v2/company (domain).
HTTP Request → Lusha /v2/person (email/name + company).
Function: normalize & score
Map industries to canonical values
Seniority map (IC/Manager/Director/VP/C)
Score calculation (fit + trust + timing)
IF: email_confidence ≥ 90 → proceed; else → write to “validation_queue” (BigQuery/Sheet).
IF: field overwrite rules (only overwrite if empty, or confidence ≥ 95).
CRM write (Salesforce/HubSpot) + Slack alert.
Signals Webhook: on funding/job change → update score_boost field with an expiry date.
Example function (pseudocode)
Bulk strategy
- Ingest CSV → Split In Batches → call Lusha Bulk Person/Company (if available) or loop single requests with Wait for rate-limit safety.
- Use Error Trigger and retry logic on 429/5xx.
Conditional overwrite policy
- If
crm.email
is empty → write Lusha email (any confidence ≥ 90). - If
crm.email
exists → overwrite only iflusha_confidence ≥ 95
. - For phone fields, keep primary stable; write new numbers into secondary fields with a
verified_source=lusha
.
Observability & audit
- Write a compact audit log row per record:
{lead_id, score, confidence, timing_boost, overwrite_fields[], ts}
to a warehouse or log table.
Rollout checklist
- Dry-run against a sandbox org.
- Freeze picklists; deploy normalization first.
- Start with read-only CRM creds for a week, flip to write once QA passes.
“n8n gave us the control we needed: real scoring logic in a Function node, safe overwrites, and a signals webhook that bumps scores with an expiry. It feels like a proper RevOps service, not a bunch of disconnected zaps.”
FAQs
Use upserts with external IDs and small batch sizes.
Yes—store a scoring_model_version
on each lead and compare conversion downstream.