Collects as they arrive, acts daily
Win back abandoned carts by email, then text
Shoppers who leave checkout get a reminder email after an hour and a text the next day if they still haven't bought.
- Runs
- Collects as they arrive, acts daily
- Apps
- Gmail, Twilio
- AI
- Not needed
- Access
- gmail.send; Twilio
Send this to your assistant
Create a ClickRuntime automation: when a checkout starts, remember it; if it isn't paid after an hour, send a reminder email from my Gmail, and if it's still unpaid after 24 hours, send a text.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Abandoned checkouts are the cheapest sales to recover: the shopper already chose the product. But one generic email is easy to miss, and many small shops don't follow up at all.
A gentle email after an hour, followed by a short text the next day only if they still haven't bought, gives two chances to bring them back without pestering anyone who already paid.
What you get out of it
Recover sales you'd lose
Many shoppers just got distracted and come back with a nudge.
Two chances, two channels
Email first, then a text for those who didn't see it.
Buyers are left alone
Anyone who completes their order gets nothing further.
Personal, from your address
The email comes from your Gmail, not a no-reply system.
How it works
What happens, step by step
Your shop tells ClickRuntime when a checkout starts and when it's paid.
Each unpaid checkout is remembered.
Every hour it checks: after one hour unpaid, the shopper gets a reminder email from your Gmail.
After 24 hours still unpaid, they get one text, and the checkout is then forgotten.
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 Twilio
- 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 Twilio steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from twilio.rest import Client
import base64, time
from clickruntime import on_event, on_trigger, credentials, http, state
FROM = "+15005550006"
def sms(to, body):
return Client(credentials.secret("TWILIO_ACCOUNT_SID"), credentials.secret("TWILIO_AUTH_TOKEN")).messages.create(to=to, from_=FROM, body=body)
gmail = lambda: build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()
def send_email(to, subject, text):
gmail().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(f"To: {to}\r\nSubject: {subject}\r\n\r\n{text}".encode()).decode()}).execute()
@on_event
def handle(event):
c, carts = event.json or {}, state.get("carts") or {}
carts.pop(c.get("id"), None)
if c.get("status") != "paid" and c.get("email"):
carts[c["id"]] = {"email": c["email"], "phone": c.get("phone") if c.get("sms_ok") else None, "url": c.get("url"), "at": time.time(), "step": 0}
state.set("carts", carts)
return {"open": len(carts)}
@on_trigger
def run(event):
carts = state.get("carts") or {}
for cid, c in list(carts.items()):
age = time.time() - c["at"]
if c["step"] == 0 and age > 3600:
send_email(c["email"], "You left something in your basket", f"Your basket is saved here: {c['url']}"); c["step"] = 1
elif c["step"] == 1 and age > 86400:
if c["phone"]: sms(c["phone"], f"Still thinking it over? Your basket is waiting: {c['url']}")
carts.pop(cid)
state.set("carts", carts)
return {"open": len(carts)}FAQ
Common questions
Do shoppers need to agree to texts?
Can I change the timing?
Can I include a discount?
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 a text for each sale and thank the buyer by email
Each new sale sends you a text with the amount and the buyer a thank-you email from your Gmail.
See how it worksGet a text and an email when a value crosses your limit
When a value you watch, like a price, temperature or reading, crosses your threshold, you get a text and an email once, not every check.
See how it worksSend polite payment reminders by email and text
Customers or tenants with overdue payments get polite reminders by email and text, stepping up gently over time.
See how it worksKeep exploring
Set up “Win back abandoned carts by email, then text” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.