The moment it happens
Get each new Stripe sale by email and WhatsApp
Every completed Stripe checkout sends you an email with the details and a WhatsApp message with the amount.
- Runs
- The moment it happens
- Apps
- Gmail, WhatsApp Business
- AI
- Not needed
- Access
- Gmail send; WhatsApp messaging
Send this to your assistant
Create a ClickRuntime automation: when a Stripe checkout completes, verify it, email me the order details from Gmail and send me a WhatsApp with the amount and customer.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
For a small online business, each sale is worth knowing about straight away: to ship quickly, to welcome a new customer, or simply to know the launch is working. Stripe's own emails are easy to miss among everything else.
A WhatsApp message gives you the news the moment it happens, and the email keeps a tidy record of each order in your inbox to search later.
What you get out of it
Know the moment you sell
A WhatsApp message arrives seconds after checkout.
A searchable record
Each order is also in your Gmail with the amount, product and customer.
Only genuine sales
Each event is verified as coming from Stripe before anything is sent.
No dashboard watching
You don't need Stripe open to know how the day is going.
How it works
What happens, step by step
Stripe tells ClickRuntime when a checkout completes.
The event is checked to make sure it really came from Stripe, and repeats of the same event are ignored.
You get an email from your Gmail with the amount, customer and description.
You also get a WhatsApp message with the amount and customer.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect WhatsApp Business
- Paste your automation's link into the other app's webhook settings
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
- Act only on the items that match your own rules, and skip the rest
- 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 Gmail and WhatsApp Business steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
import base64
from clickruntime import on_event, credentials, http, verify, state
ME_EMAIL = "me@example.com"
MY_PHONE = "447700900123"
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"
def wa(to, text):
http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
json={"messaging_product": "whatsapp", "to": to, "type": "text", "text": {"body": text}}).raise_for_status()
gmail = lambda: build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()
def send_email(to, subject, text):
raw = base64.urlsafe_b64encode(f"To: {to}\r\nSubject: {subject}\r\n\r\n{text}".encode()).decode()
gmail().messages().send(userId="me", body={"raw": raw}).execute()
@on_event
def handle(event):
if not verify.stripe(event.body, event.header("Stripe-Signature"), credentials.secret("STRIPE_WEBHOOK_SECRET")):
return {"skipped": "bad signature"}
s = event.json["data"]["object"]
if event.json["type"] != "checkout.session.completed" or state.get(s["id"]):
return {"skipped": True}
amount = f"{s['amount_total'] / 100:,.2f} {s['currency'].upper()}"
who = (s.get("customer_details") or {}).get("email", "unknown")
send_email(ME_EMAIL, f"New sale: {amount}", f"Customer: {who}\nSession: {s['id']}")
wa(MY_PHONE, f"💰 New sale {amount} from {who}")
state.set(s["id"], True)
return {"sale": s["id"]}FAQ
Common questions
Which Stripe events trigger it?
Is it safe to expose a trigger link to Stripe?
Can it include what was bought?
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 critical alerts by email and WhatsApp
When one of your systems reports a failure, you get an email and a WhatsApp message, without repeats for the same problem.
See how it worksForward WhatsApp Business messages to Gmail
Each message a customer sends to your WhatsApp Business number is emailed from your Gmail to a chosen inbox, with the sender's name and number in the subject.
See how it worksAnswer customers on WhatsApp and email you what the bot can't
Customers get an instant answer on WhatsApp, and anything the bot can't handle is emailed to you with the conversation.
See how it worksKeep exploring
Set up “Get each new Stripe sale by email and WhatsApp” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.