Skip to content

The moment it happens

Get a one-page brief on every new lead

When a new lead comes in, Perplexity researches the company and you get a one-page brief by email before you reach out.

Runs
The moment it happens
Apps
Gmail, Perplexity
AI
Not needed
Access
Perplexity key; gmail.send

Send this to your assistant

Create a ClickRuntime automation: when a new lead is sent to this link, research the company with Perplexity and email me a one-page brief with what they do, recent news and talking points.

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

The first call with a lead goes better when you know what the company does, how big it is and what changed there recently. Finding that out is ten minutes of searching that rarely happens before a quick reply.

Account executives, founders and agency owners use it so every new lead arrives with a brief, and the first conversation starts from something specific.

What you get out of it

  • Prepared for every first call

    A brief lands with each lead, so you are never going in blind.

  • Recent news included

    Funding, launches, hires and other changes give natural openings for a conversation.

  • Sources to check

    Links are listed at the bottom of each brief.

  • No extra tools

    It works with any form or tool that can send a lead to a link.

How it works

What happens, step by step

  1. When a new lead arrives at your automation's link, ClickRuntime receives it straight away.

  2. Perplexity researches the company and, if given, the person's role.

  3. The findings are formatted into a one-page brief with sources.

  4. The brief is emailed to you from your Gmail.

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 Perplexity
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get a one-page brief on every new leadjust nowSucceeded
Email · Lead briefLead brief: Acme Logistics · Mid-size freight forwarder, 300 staff · Opened a Leeds hub in September · Talking point: peak-season capacity

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
  • 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 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.
lead_research_report_by_email.pyexample
import base64
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http

ME = "me@example.com"

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", [])]
def send(to, subject, body):
    raw = f"To: {to}\r\nSubject: {subject}\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n{body}"
    build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users() \
        .messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(raw.encode()).decode()}).execute()

@on_event
def handle(event):
    lead = event.json or {}
    company = lead.get("company") or lead.get("website")
    if not company:
        return {"skipped": "no company"}
    brief, links = sonar(f"Write a one-page brief on {company} for a sales call with {lead.get('name', 'a contact')} "
                         f"({lead.get('title', 'role unknown')}): what they do, size and market, news from the last six months, "
                         "and three talking points. Use short headed sections.")
    send(ME, f"Lead brief: {company}", f"{brief}\n\nLead: {lead.get('name', '')} <{lead.get('email', '')}>\n\nSources:\n"
         + "\n".join(links))
    return {"company": company, "sources": len(links)}

FAQ

Common questions

What does the brief contain?
What the company does, its size and market, recent news, and three suggested talking points, with sources.
What information does a lead need?
A company name or website at least. A person's name and role makes the talking points more specific.
Can the brief go to the assigned rep?
Yes. Send it to a fixed address or to an address that arrives with the lead.
What permissions does it need?
Perplexity key; gmail.send. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
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 “Get a one-page brief on every new lead” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.