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.
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
When a new lead arrives at your automation's link, ClickRuntime receives it straight away.
Perplexity researches the company and, if given, the person's role.
The findings are formatted into a one-page brief with sources.
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
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
- 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
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 information does a lead need?
Can the brief go to the assigned rep?
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
Send new sign-ups a welcome email that mentions their company
Each new sign-up gets a welcome email from your Gmail that refers to their company and how they might use your product.
See how it worksGet a sourced news digest on your topics every morning
Every morning a short newsletter on your chosen topics arrives in your inbox, with each story linked to its source.
See how it worksGet a researched LinkedIn draft in your inbox every Monday
Every Monday a trending topic in your field is researched and a LinkedIn post draft arrives in your inbox for you to edit and post.
See how it worksKeep exploring
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.