Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Once a day, ClickRuntime reads the customer list from your Stripe account.

  2. It groups customers by email address, ignoring capital letters and stray spaces.

  3. It skips any group it has already reported, so you only hear about new duplicates.

  4. 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

RunsOn a schedule
Find duplicate customers in Stripetoday, 9:00Succeeded
Slack · #billing2 new duplicate customer groups in Stripe accounts@northwind.example: cus_Q1a8, cus_R7k2

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
find_duplicate_stripe_customers.pyexample
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?
No. Stripe does not merge customers automatically, and choosing which record to keep needs a person. The message links each record so you can move subscriptions and delete the extra copy.
Does it treat capital letters as different emails?
No. Emails are compared in lower case with spaces removed, so Jane@Acme.com and jane@acme.com are treated as the same address.
How long does it take on a large account?
It reads every customer each day, which takes a little longer on accounts with many thousands of records but stays well within the run time.
What permissions does it need?
Stripe read; chat:write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Find duplicate customers in Stripe” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.