On a schedule
Find duplicate customers in Stripe
Each day Slack lists any new groups of Stripe customers that share an email address, so you can merge them.
- Runs
- On a schedule
- Apps
- Slack, Stripe
- AI
- Not needed
- Access
- Stripe read; chat:write
Send this to your assistant
Create a ClickRuntime automation: every day, find Stripe customers that share the same email address and post any new duplicates to #billing with links to each record.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A membership site lets people check out without logging in, so the same person often ends up as two or three Stripe customers. Support then refunds the wrong record, a customer gets two renewal reminders, and revenue per customer looks lower than it is.
A daily list of customers that share an email address lets someone tidy them up while the history is short. Billing stays attached to one record per person, and support always finds the right one.
What you get out of it
Support finds the right record
When a customer writes in, there is one record with all their payments. No more refunding or cancelling on the wrong copy.
Cleaner reporting
Customer counts and lifetime value are only accurate when each person is counted once. Merging duplicates keeps those numbers honest.
Only new duplicates are posted
Groups already reported are remembered, so the channel is not filled with the same list every day. Each message is something to act on.
Catches checkout problems
A sudden rise in duplicates points to a checkout or signup flow that is not recognising returning customers. Seeing it daily means it gets fixed sooner.
How it works
What happens, step by step
Once a day, ClickRuntime reads the customer list from your Stripe account.
It groups customers by email address, ignoring capital letters and stray spaces.
It skips any group it has already reported, so you only hear about new duplicates.
New groups are posted to your #billing Slack channel with a link to each customer record.
Before it runs live
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- 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 Google Sheets
- Combine it with other Slack and Stripe steps into one automation
Under the hood
The code that runs this automation
import stripe
from clickruntime import on_trigger, credentials, notify, state
@on_trigger
def run(event):
stripe.api_key = credentials.secret("STRIPE_API_KEY")
groups = {}
for c in stripe.Customer.list(limit=100).auto_paging_iter():
if c.email:
groups.setdefault(c.email.strip().lower(), []).append(c.id)
seen = set(state.get("reported") or [])
new = {email: ids for email, ids in groups.items() if len(ids) > 1 and f"{email}|{len(ids)}" not in seen}
if new:
lines = [f"{email}: " + ", ".join(f"<https://dashboard.stripe.com/customers/{i}|{i}>" for i in ids)
for email, ids in sorted(new.items())]
notify.slack(f"{len(new)} new duplicate customer groups in Stripe\n" + "\n".join(lines), channel="#billing")
state.set("reported", sorted(seen | {f"{e}|{len(i)}" for e, i in new.items()}))
return {"new_groups": len(new)}FAQ
Common questions
Does it merge the customers for me?
Does it treat capital letters as different emails?
How long does it take on a large account?
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
Post Stripe revenue reports in Slack
Each morning Slack shows yesterday's sales, refunds and net revenue from Stripe, compared with the day before.
See how it worksGet a monthly Stripe tax summary in Slack
On the first of each month you see the tax collected on last month's Stripe invoices, broken down by tax rate and region.
See how it worksTriage billing emails with the customer's Stripe status
New billing emails arrive in Slack already sorted by topic, with the sender's plan and payment status from Stripe beside them.
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.