# Deduplicate inbound leads from a webhook: n8n workflow template

> Started by another system calling it, and works across n8n data table. 22 steps, 3 branches: large, and worth reading before you trust it with anything live.

Source: https://millionrounds.com/workflow/deduplicate-inbound-leads-from-a-webhook (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Lead generation](https://millionrounds.com/workflows?category=Lead+generation#library)

# Deduplicate inbound leads from a webhook

Started by another system calling it, and works across n8n data table. 22 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdeduplicate-inbound-leads-from-a-webhook)

**22 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 6 Logic 6 Service 10

The steps in the order they run, from what starts it.

- 1 **Receive Lead** Webhook *Starts it*
- 2 **Cleanup Schedule** Schedule trigger *Starts it*
- 3 **Validate and Normalize** Code *Logic*
- 4 **Prepare Cleanup Table** Data Table *Service*
- 5 **Input Valid?** If *Logic*
- 6 **Find Expired Keys** Data Table *Service*
- 7 **Hash Normalized Payload** Crypto *Service*
- 8 **Reject Invalid Request** Respond To Webhook *Starts it*
- 9 **Delete Expired Key** Data Table *Service*
- 10 **Create or Reuse Lead Table** Data Table *Service*
- 11 **Create or Reuse Key Table** Data Table *Service*
- 12 **Find Active Key** Data Table *Service*
- 13 **Classify Replay** Code *Logic*
- 14 **Replay Conflict?** If *Logic*
- 15 **Reject Replay Conflict** Respond To Webhook *Starts it*
- 16 **Already Exists?** If *Logic*
- 17 **Return Existing Lead** Respond To Webhook *Starts it*
- 18 **Find Possible Duplicate** Data Table *Service*
- 19 **Classify Possible Duplicate** Code *Logic*
- 20 **Insert New Lead** Data Table *Service*
- 21 **Store Idempotency Key** Data Table *Service*
- 22 **Return New Lead** Respond To Webhook *Starts it*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 22, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** n8n data table
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 22 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdeduplicate-inbound-leads-from-a-webhook)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

Also lead generation, with the same services where possible, closest in size first.

- [**Score funding newsletter leads from Gmail with Bright Data** 22 steps · calls a model · Gmail, n8n data table](https://millionrounds.com/workflow/score-funding-newsletter-leads-from-gmail-with-bright-data)
- [**Route RB2B leads to multichannel outreach with HeyReach** 24 steps · n8n data table](https://millionrounds.com/workflow/route-rb2b-leads-to-multichannel-outreach-with-heyreach)
- [**Lead collection with SendPulse and SMS** 24 steps · calls a model · n8n data table](https://millionrounds.com/workflow/lead-collection-with-sendpulse-and-sms)
- [**Send daily AI competitor change digests with ScraperAPI** 24 steps · calls a model · Email, Gmail](https://millionrounds.com/workflow/send-daily-ai-competitor-change-digests-with-scraperapi)
- [**Send daily AI-personalized cold emails with Google Places** 20 steps · calls a model · Email, n8n data table](https://millionrounds.com/workflow/send-daily-ai-personalized-cold-emails-with-google-places)
- [**Automate marketing leads import from Google Sheets** 18 steps · Airtable, Gmail](https://millionrounds.com/workflow/automate-marketing-leads-import-from-google-sheets)
