Monthly
Find duplicate customers in Stripe
Each month you get a list of customers who share an email address, ready to clean up.
- Runs
- Monthly
- Apps
- Stripe
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: on the 1st of each month, find Stripe customers that share the same email address and email me each group with their IDs and created dates.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A growing business finds three Stripe customer records for the same buyer: jane@shop.com, Jane@Shop.com and jane@shop.com with a typo in the name. One has the subscription, one has the old card, and one holds an unpaid invoice. Reports undercount customers, receipts go to the wrong profile, and support wastes time figuring out which record is the real one. Over a year this adds up to a messy customer list nobody trusts.
On the first of each month, ClickRuntime pages through your Stripe customers, groups them by lowercase email and emails you every group with more than one record, listing IDs, creation dates and subscriptions. You clean up duplicates on your own schedule, knowing exactly where to look.
It helps companies that have imported customers, run multiple checkout flows or let people sign up through different front ends.
What you get out of it
Customer counts reflect real people
Duplicates inflate customer totals and distort metrics like average revenue per customer. A monthly cleanup list keeps the numbers you report to investors and your team honest. Cleaner data also makes cohort and retention analysis more accurate for your whole team.
Billing lands on the right account
When a subscription, a card and an unpaid invoice live on separate records, dunning emails and receipts go astray. Merging or retiring the extra records stops confusing messages to customers.
Support finds the full history quickly
Agents searching by email should see one profile with the complete payment history. Cleaning duplicates means fewer back-and-forth questions about which charge belongs to whom. One complete record also makes refund decisions quicker.
Problems are caught before they pile up
Monthly checks find a handful of duplicates at a time. Left alone, hundreds accumulate, and cleaning them in one go becomes a risky project nobody wants to start. A short monthly list takes minutes to clear.
Source of duplicates becomes visible
If the same pattern keeps appearing, such as guest checkout creating a new record every time, the list points you to the flow that needs fixing rather than just treating symptoms.
How it works
What happens, step by step
Once a month, the automation goes through every customer in your Stripe account.
It groups customers by email address, ignoring capital letters.
You get an email listing every email used by more than one customer, with each customer's created date.
Before it runs live
- Connect Stripe
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 Stripe steps into one automation
Under the hood
The code that runs this automation
from collections import defaultdict
from datetime import datetime, timezone
import stripe
from clickruntime import on_trigger, credentials, notify
@on_trigger
def run(event):
stripe.api_key = credentials.secret("STRIPE_API_KEY")
groups = defaultdict(list)
for c in stripe.Customer.list(limit=100).auto_paging_iter():
if c.email:
groups[c.email.strip().lower()].append(c)
dupes = {e: cs for e, cs in groups.items() if len(cs) > 1}
if not dupes:
return {"groups": 0}
lines = []
for email, cs in sorted(dupes.items()):
lines.append(email)
lines += [f" - {c.id} (created {datetime.fromtimestamp(c.created, timezone.utc):%Y-%m-%d})" for c in cs]
notify.email_me(f"{len(dupes)} duplicate Stripe customers", "\n".join(lines))
return {"groups": len(dupes)}FAQ
Common questions
Why compare by lowercase email?
Does it merge or delete customers?
Will it find duplicates with different email addresses?
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
Get yesterday's revenue every morning
Each morning you see yesterday's charges, refunds and new subscriptions in one message.
See how it worksGet a monthly revenue report
On the 1st you get last month's gross, refunds, net and new vs cancelled subscriptions, compared with the month before.
See how it worksSee overdue invoices every week
Each Monday you get open invoices past their due date, oldest first.
See how it worksKeep exploring
Set up “Find duplicate customers in Stripe” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.