Guides / n8n × Pipedrive / Data Sync

Stop n8n From Creating Duplicate Deals in Pipedrive

Pipedrive has no built-in duplicate-deal blocking like Salesforce's Duplicate Rules — here's the search-then-branch pattern that actually stops repeat automations from creating the same deal twice.

Illustrated flow showing an n8n workflow searching Pipedrive for an existing deal before creating a new one to prevent duplicates.
No error at all — the workflow runs successfully but creates a second (or third, or fourth) Deal for the same person/organization every time it fires
Short answer: Pipedrive's Deal object has no field-level uniqueness constraint and no equivalent to Salesforce's Duplicate Rules, so a workflow that creates a deal on every trigger fire — a new form submission, a repeated webhook, a re-run scheduled sync — will happily create an unlimited number of duplicate deals with no error to catch. The fix is entirely on the n8n side: search for an existing open deal linked to the same person or organization immediately before the Create step, and only create when nothing matches.

Why Pipedrive doesn't stop this on its own

Some CRMs enforce duplicate prevention at the platform level — Salesforce, for example, has a dedicated Duplicate Rules and Matching Rules feature that can block or warn on likely-duplicate records automatically. Pipedrive has no equivalent for Deals. A Deal record has a title, an associated person_id and/or organization_id, a value, and a pipeline stage — none of these are enforced as unique, and there's no server-side matching logic running behind the Deals API.

This means the responsibility for preventing duplicate deals sits entirely with whatever creates them. A typical failure pattern: a lead-capture form triggers an n8n workflow that creates a Pipedrive deal for that person, and the same person submits the form again a week later (following up, or just clicking submit twice) — the workflow fires again and creates a second, completely separate deal for the same person with no warning.

If your Pipedrive pipeline has multiple deals for the same person or organization that shouldn't exist separately, the fix belongs in the n8n workflow that creates them — there's no Pipedrive-side setting that will retroactively prevent this.

The fix: search for an open deal first, branch, then create or update

Use Pipedrive's Search Deals endpoint (available via the n8n Pipedrive node's Search operation, or a direct HTTP Request node call) to look for an existing open deal tied to the same person or organization before ever reaching the Create step. Filter to open deals only — status: open — so that a previously Won or Lost deal for the same contact doesn't block a legitimate new deal from being created.

  • Pipedrive node → Search: search term the person's identifying value (email, or name if that's your only reliable field), filtered by person_id or organization_id if you already have it from an earlier step.
  • Add a status filter for open deals only — a person with a Won deal from six months ago should still be able to get a brand-new deal today.
  • IF node: branch on whether the search returned any open deal.
  • True branch (open deal already exists): either stop the workflow (no duplicate created) or Update the existing deal (e.g. bump its value, add a note) depending on your process.
  • False branch (no open deal found): proceed to Create, exactly as the workflow did before.
GET https://yourcompany.pipedrive.com/api/v2/deals/search?term={{ $json.email }}&fields=title,notes&person_id={{ $json.pipedrivePersonId }}&status=open&exact_match=false
x-api-token: {{your_api_token}}

# Returns 0 or more matching open deals for this person —
# branch on whether the result set is empty before creating.

Match on person/organization ID, not on deal title text

Avoid matching purely on the deal's title string ("John Smith - Website Inquiry") since two genuinely different deals for the same person can easily share similar wording, and a title generated by a template will always match itself on a second run even when a brand-new legitimate deal is warranted. Matching on the linked person_id or organization_id combined with an open-status filter is much more reliable — if you don't already have the Pipedrive person_id at this point in the workflow, add a Search Persons (or Find/Create Person) step ahead of the deal search so you're filtering by a real ID, not a name string prone to typos and formatting differences.

If your business process genuinely allows multiple concurrent open deals per person (for example, a company that sells several distinct products to the same client at once), narrow the search further by also matching on a specific field that identifies the deal type or product line, rather than blocking all creates for that person outright.

One gap this pattern doesn't fully close: near-simultaneous triggers

If the same trigger can fire twice within a few seconds of itself (a double-submitted form, or a webhook that Pipedrive or another system occasionally retries), the search-then-create pattern above has a small race-condition window: both executions can run their search before either one's create has completed, and both find "no existing deal." For high-volume workflows where this matters, consider adding a short delay before the search on retriggerable paths, or a secondary check (e.g. a lightweight external lock, or deduplicating on your own idempotency key such as the form submission ID) rather than relying on the search-before-create pattern alone to close every possible timing gap.

Pick the right lookup endpoint, and dedupe the input before you loop

Pipedrive offers two ways to look for an existing deal, and they behave differently. /deals/search is term-based and fuzzy, and it costs more against your rate budget; it can also return near-matches you did not intend. Listing a person's deals directly - GET /persons/{id}/deals - and filtering status = open in n8n is the most deterministic check when you already have the person ID, because it only ever returns deals genuinely linked to that person.

Before the search runs at all, collapse duplicates within the current execution. If one workflow run processes a batch that already contains the same person twice (two form rows imported together, a webhook plus a backfill), the per-item search does not catch the second copy because neither create has completed yet. Deduplicate the incoming items by person identifier first, then loop.

  • Have the person ID: GET /persons/{id}/deals plus a status=open filter is the exact, cheap check.
  • Only have a name or email: /deals/search, but treat fuzzy matches with care.
  • Deduplicate the run's input items by person before the search-and-create loop.

Close the race with an idempotency key, not a delay

Adding a wait before the search narrows the race window without closing it, and it slows every well-behaved run to defend against a rare one. The durable fix is to give each logical event a deterministic key and to store that key somewhere Pipedrive itself can enforce uniqueness on — a custom text field on the deal, marked unique, or a lookup you control.

The key has to be derived from the source event rather than generated at runtime. A form submission ID, a Stripe event ID, a hash of the person ID plus the source plus the calendar day — anything that produces the same string for the same logical event and a different string for a genuinely different one. A random UUID generated inside the workflow is useless here, because a retry generates a new one and sails past the check.

With the key in place, the search stops being a heuristic. Instead of asking "is there an open deal for this person that looks similar", the workflow asks "is there a deal carrying exactly this key", which has one right answer and no fuzzy matching. It also makes the workflow safe to re-run over a backfill without producing a second copy of everything.

# Search on the idempotency key rather than on the person
GET https://COMPANY.pipedrive.com/api/v2/deals/search
    ?term=form-2026-09-14-abc123&fields=custom_fields&exact_match=true
x-api-token: YOUR_TOKEN

# -> data.items = []   -> safe to create
# -> data.items = [..] -> already processed; stop, do not create

POST https://COMPANY.pipedrive.com/api/v2/deals
{ "title": "Acme - website enquiry",
  "person_id": 456,
  "custom_fields": { "IDEMPOTENCY_FIELD_KEY": "form-2026-09-14-abc123" } }

# Deterministic, derived from the event — never generated at runtime:
#   key = `${source}-${submissionId}`
# A random UUID defeats the whole mechanism, because a retry produces a new one.

Deciding what happens when a match is found

Finding an existing deal is the easy half. The harder question is what the workflow should then do, and answering it with "stop silently" is what turns a duplicate problem into a lost-lead problem — the second enquiry contained new information and nobody ever saw it.

Three outcomes cover almost every process. Attach the new information to the existing deal as a note or an activity, which preserves the context without inflating the pipeline. Update specific fields on the existing deal where the new data is strictly better, such as a corrected phone number or a revised value. Or create the deal anyway and flag it for review, which is the right answer when the business genuinely allows concurrent deals and you only wanted to catch accidental double-submits.

Whichever you pick, record that the duplicate was detected. A note on the deal saying which event was suppressed, and when, costs one API call and makes the difference between a sales team trusting the automation and a sales team quietly working around it.

References used here

Pipedrive's Deals Search endpoint (parameters, cost, and the fields it can filter on) is documented in Pipedrive's own API v2 reference. The lack of a native duplicate-deal safeguard, and the search-and-filter approach as the practical workaround, are consistent with an n8n Community discussion about finding a specific deal for a person before acting on it.

Frequently asked questions

Does Pipedrive have any setting I can turn on to block duplicate deals automatically?

No. Unlike Salesforce's Duplicate Rules, Pipedrive has no platform-level duplicate detection or blocking for Deals. Preventing duplicates has to be built into whatever process creates the deals — in this case, the n8n workflow.

Should I search by deal title or by the linked person/organization?

Match on the person_id or organization_id combined with an open-status filter. Matching on the deal's title text is unreliable, since template-generated titles for genuinely different deals can look identical, and minor wording differences can also cause real duplicates to slip through unmatched.

What if a person legitimately needs two open deals at once?

Narrow the search to also filter on whatever distinguishes the two deal types (a specific product, custom field, or pipeline) rather than blocking every create for that person. The search-before-create pattern is a filter you control — it doesn't have to mean "one deal per person, ever."

Is a Wait node enough to stop double-submits?

No. A delay narrows the race window and slows every run; it never closes the window. Store a deterministic idempotency key derived from the source event on the deal and search on that key instead.

Should the workflow just stop when it finds an existing deal?

Rarely. The second event usually carries new information. Attach it as a note or activity on the existing deal, or update the fields where the new data is better — and record that a duplicate was suppressed so the team can see what happened.