The moment it happens
Score every new lead and post the hot ones to Slack
Each new lead gets an AI score and is saved to your Supabase leads table, and hot leads are posted to your sales channel straight away.
- Runs
- The moment it happens
- Apps
- Slack, Supabase
- AI
- Yes, uses the built-in AI allowance
- Access
- Supabase read+write; Slack chat:write
Send this to your assistant
Create a ClickRuntime automation: when a new lead arrives at this link, score it with AI, save it to my Supabase leads table, and post leads scoring 70 or more to #sales.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Sales teams at small companies get leads from forms, ads and events, all into one table. The rep checks it when they can, so a perfect-fit enquiry can wait half a day behind a student project.
Scoring each lead on arrival and posting the best ones to Slack means the hottest prospects get a call within minutes, while every lead is still kept in Supabase.
What you get out of it
Call the best leads first
Hot leads are in front of sales the moment they arrive.
Every lead kept
All leads are saved with their score, not just the hot ones.
Consistent scoring
Each lead is judged against the same description of your ideal customer.
Re-submissions update the record
A lead who submits twice updates their row instead of creating a duplicate.
How it works
What happens, step by step
A new lead arrives at your automation's link from your form or lead source.
AI scores it out of 100 against your ideal customer and gives a short reason.
The lead is saved to your Supabase leads table, updating any earlier record with the same email.
Leads scoring 70 or more are posted to #sales in Slack.
Before it runs live
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- Connect Supabase
- 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
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Google Sheets
- Combine it with other Slack and Supabase steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, notify, ai
IDEAL = "B2B companies of 20-500 staff in logistics or retail, operations or finance roles"
SUPABASE = "https://your-project.supabase.co/rest/v1"
def sb(method, path, **kw):
key = credentials.secret("SUPABASE_KEY")
r = http.request(method, f"{SUPABASE}/{path}", **kw, headers={"apikey": key, "Authorization": f"Bearer {key}", "Prefer": "return=representation,resolution=merge-duplicates"})
return r.raise_for_status() or (r.json() if r.content else None)
SCHEMA = {"type": "object", "properties": {"score": {"type": "integer"}, "reason": {"type": "string"}}}
@on_event
def handle(event):
lead = event.json or {}
if not lead.get("email"):
return {"skipped": "no email"}
s = ai.generate(f"Ideal customer: {IDEAL}\nScore this lead 0-100 with a one-line reason:\n"
f"{lead.get('company')} | {lead.get('role')} | {lead.get('message', '')[:1000]}", json_schema=SCHEMA, max_output_tokens=80).json
sb("POST", "leads?on_conflict=email", json={"email": lead["email"].lower(), "name": lead.get("name"), "company": lead.get("company"),
"role": lead.get("role"), "message": lead.get("message"), **s})
if s["score"] >= 70:
notify.slack(f":fire: Hot lead ({s['score']}): {lead.get('name')}, {lead.get('role')} at {lead.get('company')} – {s['reason']}", channel="#sales")
return sFAQ
Common questions
How does the score work?
Can I change what counts as hot?
Where can leads come from?
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
Warn Slack about duplicate invoices before they're paid
When a new invoice arrives, it's checked against your Supabase records, saved with a status, and any likely duplicate is flagged in Slack.
See how it worksStore new reviews in Supabase and send angry ones to Slack
Every 3 hours, new reviews are saved once in Supabase with a sentiment label, and negative ones go straight to Slack.
See how it worksPost a monthly summary of your Supabase figures to Slack
On the 1st of each month, Slack gets a short written summary of last month's figures from your Supabase table, with the changes from the month before.
See how it worksKeep exploring
Set up “Score every new lead and post the hot ones to Slack” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.