Every 15 minutes
Research each new lead in your sheet
Every new prospect row gets a short profile of the person and company and a personal opening line, written back into the sheet.
- Runs
- Every 15 minutes
- Apps
- Google Sheets, Perplexity
- AI
- Optional
- Access
- Perplexity key; Sheets read+write
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, for each new lead in my Leads sheet, research the person and company with Perplexity, then fill in a three-line summary and a personalised opening line, and email me when new ones are done.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Personal outreach starts with research: what does the company do, what has changed lately, what is this person responsible for. Doing that for every lead takes ten minutes a row, so it gets skipped and the emails go out generic.
Sales reps, founders and agency owners use it so every lead arrives in their sheet with the homework already done.
What you get out of it
Homework done before you call
Each row has a short profile, so the first conversation can start with something relevant.
Openers that are specific
The opening line refers to something real and recent about the company, not a generic compliment.
Current information
Perplexity searches the web at the time of the run, so recent funding, launches and hires are included.
Only new rows
Leads that already have research are skipped, so you only pay for new work.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime reads your sheet for leads that have no research yet.
Perplexity researches the person and their company.
AI shapes the findings into a three-line summary and a personal opening line.
Both are written back into the row with the sources, and you get an email listing the leads that were done.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Perplexity
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 Google Sheets and Perplexity 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 clickruntime import on_trigger, report_fetched, credentials, http, notify, ai
SHEET_ID = "your-spreadsheet-id"
def sonar(prompt):
r = http.post("https://api.perplexity.ai/chat/completions", headers={"Authorization": f"Bearer {credentials.secret('PERPLEXITY_API_KEY')}"},
json={"model": "sonar", "messages": [{"role": "user", "content": prompt}]}, timeout=90).json()
return r["choices"][0]["message"]["content"], [s["url"] for s in r.get("search_results", [])]
@on_trigger
def run(event):
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")),
cache_discovery=False).spreadsheets().values()
rows = sheets.get(spreadsheetId=SHEET_ID, range="Leads!A2:F").execute().get("values", [])
new = [(i + 2, r) for i, r in enumerate(rows) if len(r) == 3]
report_fetched(len(new))
if not new:
return {"new": 0}
updates = []
for n, (name, company, title) in new:
research, links = sonar(f"Research {name}, {title} at {company}: what the company does, recent news, and their role.")
out = ai.generate(f"From this research write a three-line summary, then on a new line starting 'Opener:' one personal "
f"opening sentence for an email to {name}.\n{research[:3000]}", max_output_tokens=250).text
summary, _, opener = out.partition("Opener:")
updates.append({"range": f"Leads!D{n}:F{n}", "values": [[summary.strip(), opener.strip(), "\n".join(links[:5])]]})
sheets.batchUpdate(spreadsheetId=SHEET_ID, body={"valueInputOption": "RAW", "data": updates}).execute()
notify.email_me(f"{len(new)} leads researched", "\n".join(f"{r[0]} ({r[1]})" for _, r in new))
return {"researched": len(new)}FAQ
Common questions
What does it need in each row?
Can I check the sources?
What if the person can't be found?
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
Turn topics in a sheet into researched video scripts
Each new topic in your sheet is researched and a 30-second video script is written in the next column, ready to record.
See how it worksWrite researched blog drafts for topics marked ready
Each topic you mark ready in your sheet becomes a researched blog draft, saved back to the sheet with its sources.
See how it worksCheck each week whether AI search answers mention your brand
Each week your key buyer questions are put to Perplexity, and your sheet records whether your brand was mentioned, how, and which sources were cited.
See how it worksKeep exploring
Set up “Research each new lead in your sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.