Every 10 minutes
Email 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.
- Runs
- Every 10 minutes
- Apps
- Gmail, SerpApi
- AI
- Yes, uses the built-in AI allowance
- Access
- gmail.modify; SerpApi key
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, check for emails I send myself with a subject starting "brief:". Search the company on Google with SerpApi, summarise the facts and news with AI, and reply in the thread with a brief.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An account manager at a marketing agency often learns about a meeting an hour before it starts: a new prospect, a client's parent company, a partner someone wants to introduce. They want five minutes of context before walking in, but between other calls there is no time to search, read and take notes.
With this automation they send themselves an email titled "brief: Northwind Traders" from their phone. Within ten minutes a reply lands in the same thread with what the company does, recent news and a few talking points, built from fresh Google web and news results through SerpApi.
What you get out of it
Prepared for every meeting
A short brief before a call means you can ask better questions and mention recent events. Prospects notice when you have done your homework.
Works from any device
All it takes is sending an email, which works from a phone, a laptop or a shared computer. There is no app to open or form to fill in.
Briefs kept in your inbox
Each brief sits in a thread with the company's name as its subject. Searching your inbox finds it again before the next meeting.
Fresh information every time
Briefs come from current search results, including the latest news. They do not rely on a stale company database.
How it works
What happens, step by step
Every 10 minutes, ClickRuntime checks your Gmail for new emails you sent yourself with a subject starting "brief:".
For each one, it searches Google and Google News for the company named in the subject, through SerpApi.
AI writes a short brief with background, recent news and talking points, and lists the sources.
The brief is sent as a reply in the same thread, and the email is remembered so it is never answered twice.
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
- Act only on the items that match your own rules, and skip the rest
- 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 email.mime.text import MIMEText
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched
@on_trigger
def run(event):
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()
done = set(state.get("done") or [])
found = gmail.messages().list(userId="me", q='from:me to:me subject:"brief:" newer_than:1d').execute().get("messages", [])
new = [m for m in found if m["id"] not in done]
report_fetched(len(new))
if not new:
return {"briefs": 0}
key = credentials.secret("SERPAPI_API_KEY")
for m in new:
msg = gmail.messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["Subject", "From", "Message-ID"]).execute()
h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
company = h["Subject"].split(":", 1)[1].strip()
web = http.get("https://serpapi.com/search", params={"engine": "google", "q": company, "api_key": key}).json().get("organic_results", [])[:5]
news = http.get("https://serpapi.com/search", params={"engine": "google", "q": company, "tbm": "nws", "api_key": key}).json().get("news_results", [])[:5]
lines = "\n".join(f"- {r['title']}: {r.get('snippet', '')} ({r['link']})" for r in web + news)
brief = ai.generate(f"Company: {company}\n{lines}", system="Write a brief: what they do, size/location, recent news with dates, 3 talking points, sources.", max_output_tokens=600).text
reply = MIMEText(brief)
reply["to"], reply["subject"], reply["In-Reply-To"] = h["From"], "Re: " + h["Subject"], h["Message-ID"]
gmail.messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(reply.as_bytes()).decode(), "threadId": m["threadId"]}).execute()
done.add(m["id"])
state.set("done", list(done)[-500:])
return {"briefs": len(new)}FAQ
Common questions
Does it have to be my own address?
What does a brief include?
How quickly does the reply arrive?
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 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.
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 worksKeep exploring
Set up “Email yourself a company name and get a research brief back” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.
