Operations · n8n

Detect Duplicate Shopify Customer Accounts and Clean Up Your Data

Repeat customers who check out with a second email fragment your data — inflating customer counts and hiding their true lifetime value. This workflow finds likely duplicates by matching name, phone and address, and flags them for a one-click merge.

difficulty Intermediatesetup 35 minresult A clean customer list with accurate lifetime value — no more the-same-person-counted-twice
  1. 1

    Pull all customers weekly

    A Schedule Trigger and a Shopify node fetch your full customer list with phone and default address.

  2. 2

    Fingerprint each customer

    A Code node builds a normalized key from last name + phone + street, then groups customers sharing a key.

  3. 3

    Keep only real collisions

    Output groups with two or more accounts that share a fingerprint but have different emails — your likely duplicates.

  4. 4

    Write a review list

    Append each suspected duplicate pair to a Google Sheet with both emails, order counts and combined spend.

  5. 5

    Nudge yourself to merge

    A Slack message summarizes how many duplicates were found so cleanup actually happens.

Frequently asked questions

Does it merge automatically?

No — merging is destructive, so this flow only detects and lists. You review the sheet and merge in Shopify with confidence. You can add an auto-tag step so both accounts are labelled 'possible-duplicate' for staff.

How does it avoid false matches?

It requires two independent signals to agree (e.g. phone + street), not just a shared surname. You can tighten or loosen the fingerprint in the Code node.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.