Every 15 minutes
Score new leads in a sheet and email the best ones
Each new lead in your sheet gets a score and a reason, and you get an email with a suggested first message for any strong one.
- Runs
- Every 15 minutes
- Apps
- Gmail, Google Sheets
- AI
- Yes, uses the built-in AI allowance
- Access
- Sheets read+write; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, score new rows in my Leads sheet against my ideal customer, write the score and reason back, and email me any lead above 80 with a suggested first email.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A consultant collects enquiries from her website form into a Google Sheet. Some are ideal clients with budget and urgency, others are students or vendors pitching their own services. She reads every row, decides who to contact, and often replies to the best ones a day later than she should.
Scoring each row as it lands and emailing only the strongest leads means you reply to the right people first, with a draft already written. Consultants, agencies and small sales teams use it to respond quickly without reading every enquiry.
What you get out of it
The best leads get an answer the same day
An email within minutes for leads above your bar means you can write back while the prospect is still comparing options.
A first email ready to send
Each alert includes a suggested opening message based on what the lead wrote. You edit and send instead of starting from a blank page.
Every lead scored the same way
Scores follow one description of your ideal client, so judgement does not drift with how busy the day is.
The sheet becomes a ranked list
A score and reason on every row lets you sort the sheet and work through the remaining leads in order.
How it works
What happens, step by step
Every 15 minutes ClickRuntime reads your Leads sheet and finds rows without a score.
AI compares each lead with your description of an ideal customer and gives it a score from 0 to 100 and a reason.
The score and reason are written back into the row, so it is not scored twice.
For any lead above 80, you get an email with the lead's details and a suggested first email.
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 your Google Sheets account and pick the spreadsheets it may use
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 Google Sheets 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, credentials, notify, ai, report_fetched
SHEET_ID = "your-spreadsheet-id"
ICP = "Marketing teams at B2B companies with 10-200 staff and a budget over 5,000 a month."
SCHEMA = {"type": "object", "properties": {"score": {"type": "integer"}, "reason": {"type": "string"}, "first_email": {"type": "string"}}}
@on_trigger
def run(event):
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
rows = sheets.values().get(spreadsheetId=SHEET_ID, range="Leads!A2:G").execute().get("values", [])
new = [(i + 2, r) for i, r in enumerate(rows) if len(r) < 6 or not r[5]]
report_fetched(len(new))
if not new:
return {"summary": "Nothing new"}
for row_no, r in new:
lead = ", ".join(r[:5])
res = ai.generate(f"Ideal customer: {ICP}\nLead: {lead}\nScore 0-100, give a reason and a short first email.", json_schema=SCHEMA, max_output_tokens=400).json
sheets.values().update(spreadsheetId=SHEET_ID, range=f"Leads!F{row_no}:G{row_no}", valueInputOption="RAW",
body={"values": [[res["score"], res["reason"]]]}).execute()
if res["score"] > 80:
notify.email_me(f"Hot lead ({res['score']}): {r[1] if len(r) > 1 else r[0]}", f"{lead}\n\nWhy: {res['reason']}\n\nSuggested email:\n{res['first_email']}")
return {"scored": len(new)}FAQ
Common questions
How does it know which rows are new?
Which columns does it need?
Can I change the score that triggers an email?
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
Log PDF invoices from Gmail in a spreadsheet
Every invoice that arrives by email is added as a row in your Invoices sheet with supplier, date, number and total.
See how it worksReply to chosen senders with AI and log every exchange
When someone on your list emails you, they get a prompt reply written by AI, and each email and reply is logged in a Google Sheet.
See how it worksLog TradingView alert emails to a Google Sheet
Every TradingView alert email becomes a row in your Signals sheet with the ticker, buy or sell signal and price.
See how it worksKeep exploring
Set up “Score new leads in a sheet and email the best ones” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.