Weekly
Get a weekly report of duplicate leads
Each week you get the groups of leads that share an email address, ready for you to merge.
- Runs
- Weekly
- Apps
- Salesforce
- AI
- Not needed
- Access
- api (read)
Send this to your assistant
Create a ClickRuntime automation: every Sunday at 6pm, find Salesforce leads that share an email address and email me each group with names and created dates.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Lead duplicates creep into Salesforce from every direction: a prospect fills out a form twice, a list import overlaps with leads reps typed in, two reps each add the same contact from a trade show. The effect is quiet but costly. Two reps email the same person, reporting counts one buyer as two, and lead conversion rates look worse than they are. Salesforce's duplicate rules block some cases at creation, but anything that arrived before the rules, or by import, slips through.
Weekly, the automation runs an aggregate SOQL query that groups leads by Email and returns any address that appears more than once. It then fetches the matching records and emails you the list with names, owners and creation dates, so you can see which ones to merge. It only reads data. Sales operations teams use it to keep the lead table clean.
What you get out of it
Reps stop contacting the same person twice
When two owners have the same prospect, someone gets a confusing second email. Finding these pairs weekly prevents the awkward duplicate outreach that makes a company look disorganized. A prospect receiving the same intro twice from different reps often replies to neither.
Reports reflect real buyers
Lead counts, conversion rates and source analysis all depend on unique records. Cleaning duplicates weekly means marketing and sales are arguing about real numbers, not inflated ones. If 12 percent of leads are duplicates, your conversion rate is understated by about that much.
Merge decisions made with context
The list shows owner and creation date for each pair, so you can keep the older record with history and merge the newer one. That avoids losing notes when records are combined.
Problems get found at the source
If duplicates repeatedly come from one form or import, the weekly list shows the pattern. You can fix the intake process rather than cleaning the same mess every Monday. Three duplicates from the same webinar form usually mean its hidden field mapping is wrong.
Small cost, steady hygiene
Checking for duplicates manually is a chore nobody schedules. A weekly email makes it a ten-minute task that fits into an ordinary week and prevents a large cleanup later. Ten minutes on Monday beats the afternoon needed to dedupe 2,000 records after a year.
How it works
What happens, step by step
Once a week, ClickRuntime looks for email addresses that appear on more than one Salesforce lead.
It fetches each of those leads with its name and created date.
You get an email grouping the duplicates by email address, ready for you to merge.
Before it runs live
- Connect Salesforce
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Salesforce steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, notify
API = "https://yourcompany.my.salesforce.com/services/data/v61.0"
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"}
query = lambda q: http.get(f"{API}/query", headers=headers, params={"q": q}).json()["records"]
groups = query("SELECT Email, COUNT(Id) n FROM Lead WHERE Email != null AND IsConverted = false "
"GROUP BY Email HAVING COUNT(Id) > 1 LIMIT 200")
if not groups:
return {"groups": 0}
emails = ",".join("'" + g["Email"].replace("'", "") + "'" for g in groups)
leads = query(f"SELECT Name, Email, CreatedDate FROM Lead WHERE Email IN ({emails}) ORDER BY Email, CreatedDate")
lines, last = [], None
for lead in leads:
if lead["Email"] != last:
lines.append(f"\n{lead['Email']}")
last = lead["Email"]
lines.append(f" - {lead['Name']} (created {lead['CreatedDate'][:10]})")
notify.email_me(f"{len(groups)} duplicate lead emails", "\n".join(lines).strip())
return {"groups": len(groups)}FAQ
Common questions
Does it detect duplicates only by exact email match?
What if some leads have no email address?
Does the automation merge the duplicates for me?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Find open deals with a past close date
Each weekday you see the open opportunities whose close date has passed, grouped by owner.
See how it worksBack up your Salesforce records every week
A CSV copy of your accounts, contacts and opportunities is sent to you every week.
See how it worksFill in next steps on open opportunities
Open opportunities with an empty Next Step get a suggested one written in, and you get the list.
See how it worksKeep exploring
Set up “Get a weekly report of duplicate leads” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.