Weekly
Get a weekly email of promo codes for your favourite shops
Once a week you get an email listing current discount codes for the shops on your list, so you have them ready before you buy.
- Runs
- Weekly
- Apps
- Gmail, SerpApi
- AI
- Yes, uses the built-in AI allowance
- Access
- SerpApi key; gmail.send
Send this to your assistant
Create a ClickRuntime automation: every Friday, search Google with SerpApi for promo codes for each store on my list, pull out the codes and offers with AI, and email me the results.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An office manager at a growing design studio orders supplies, software and furniture from the same handful of online shops. Discount codes come and go, and remembering to search for one before each order rarely happens, so the studio often pays full price when a 15 percent code was available.
This automation checks for them every week. For each shop on the list, it searches Google for current promo codes through SerpApi, AI picks out the actual codes and the offer attached to each, and one email arrives with everything sorted by shop. When it is time to order, the codes are already in the inbox.
What you get out of it
Codes ready before you need them
The weekly email means codes are waiting when you place an order. You do not have to remember to look in the middle of a busy day.
Small savings that add up
Regular orders from the same suppliers make even modest discounts worthwhile over a year. The email turns a habit most people skip into one that happens on its own.
All your shops in one email
One message covers every store on your list, grouped by shop. It is easy to search your inbox for a shop name when you need it.
No coupon-site browsing
You never wade through pages of expired offers and pop-ups. The search results are read for you and only the codes come through.
How it works
What happens, step by step
Every Friday, ClickRuntime searches Google through SerpApi for current promo codes for each shop on your list.
AI reads the result snippets and picks out the codes and the offer described for each, ignoring anything that is not a real code.
The codes are grouped by shop into one message.
The email is sent from your Gmail address to you or whoever places the orders.
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 SerpApi
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
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Gmail and SerpApi steps into one automation
Under the hood
The code that runs this automation
import base64
from datetime import date
from email.mime.text import MIMEText
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai
SHOPS = ["Northwind Office Supply", "Acme Furniture", "Contoso Software"]
ME = "you@example.com"
@on_trigger
def run(event):
sections = []
for shop in SHOPS:
res = http.get("https://serpapi.com/search", params={"engine": "google", "q": f"{shop} promo code {date.today():%B %Y}",
"api_key": credentials.secret("SERPAPI_API_KEY")}).json()
snippets = "\n".join(f"- {r['title']}: {r.get('snippet', '')}" for r in res.get("organic_results", [])[:10])
codes = ai.generate(f"List real promo codes for {shop} as 'CODE - offer', one per line, or 'None found'.\n{snippets}", max_output_tokens=200).text.strip()
sections.append(f"{shop}\n{codes}")
mime = MIMEText("\n\n".join(sections))
mime["to"], mime["subject"] = ME, f"Promo codes for week of {date.today():%d %b}"
build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages().send(
userId="me", body={"raw": base64.urlsafe_b64encode(mime.as_bytes()).decode()}).execute()
return {"shops": len(SHOPS)}FAQ
Common questions
Will every code work?
Can I add or remove shops?
Can it send the email to someone else?
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 researched social post drafts by email every weekday
Each weekday morning you get an email with post drafts for LinkedIn, X and Instagram, written from the latest news on your topic, ready to approve and post.
See how it worksGet new job listings by email every morning
Each morning you get an email with jobs that match your search and that you have not seen before, each with a fit score and a draft cover letter.
See how it worksEmail yourself a company name and get a research brief back
Send yourself an email with "brief:" and a company name, and a short brief with background, recent news and talking points comes back in the same thread.
See how it worksKeep exploring
Set up “Get a weekly email of promo codes for your favourite shops” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.
