Skip to content

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.

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

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

  1. A new lead arrives at your automation's link from your form or lead source.

  2. AI scores it out of 100 against your ideal customer and gives a short reason.

  3. The lead is saved to your Supabase leads table, updating any earlier record with the same email.

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

RunsThe moment it happens
Score every new lead and post the hot ones to Slackjust nowSucceeded
Slack · #sales🔥 Hot lead (86): Dana Park, Ops Director at Northwind Logistics – 200 staff, asking about multi-site setup

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 Google Sheets
  • Combine it with other Slack and Supabase 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.
score_new_leads_saved_in_supabase_and_alert_slack.pyexample
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 s

FAQ

Common questions

How does the score work?
AI compares the lead's company, role and message with a short description of your ideal customer and gives a score out of 100 with a reason.
Can I change what counts as hot?
Yes. The cut-off is 70 by default, and you can change it or the ideal customer description.
Where can leads come from?
Any form, ad platform or tool that can send the lead to your automation's link.
What permissions does it need?
Supabase read+write; Slack chat:write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly 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 “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.