Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Every 15 minutes, ClickRuntime reads your sheet for leads that have no research yet.

  2. Perplexity researches the person and their company.

  3. AI shapes the findings into a three-line summary and a personal opening line.

  4. 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

RunsEvery 15 minutes
Research each new lead in your sheettoday, 9:00Succeeded
Google Sheets · LeadsOpener: Congratulations on Acme opening its Leeds warehouse last month. That must have changed how you plan deliveries.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
research_leads_in_a_sheet_with_perplexity.pyexample
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?
At least a name and a company name or website. A job title or LinkedIn link makes the research more accurate.
Can I check the sources?
Yes. The links Perplexity used are saved in a column next to the summary.
What if the person can't be found?
The summary focuses on the company and says the person could not be confirmed, so you do not rely on a guess.
What permissions does it need?
Perplexity key; Sheets read+write. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.