Skip to content

The moment it happens

Qualify text-message leads and route them in Slack

When a prospect texts your number, AI pulls out what they need and how serious they are, replies, and alerts the right Slack channel.

Runs
The moment it happens
Apps
Slack, Twilio
AI
Yes, uses the built-in AI allowance
Access
Twilio number webhook config; chat:write

Send this to your assistant

Create a ClickRuntime automation: when someone texts our Twilio number, extract their name, need and budget, score the lead, text them a quick reply, and post it to #sales-hot or #sales depending on the score.

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

Ads and signs that say 'text us' bring in a steady stream of messages, from serious buyers to people asking the time. Someone has to read each one and decide who should handle it.

Reading each text, scoring it and sending it to the right channel means hot leads go straight to the people who close deals, while everything else waits in the general channel without cluttering anyone's day.

What you get out of it

  • Hot leads go straight to closers

    High-scoring leads land in a dedicated channel.

  • Every texter gets a reply

    An automatic text confirms the message was received.

  • Details pulled out for you

    Name, need and budget are summarised in the Slack post.

  • Consistent routing

    Every lead is judged the same way.

How it works

What happens, step by step

  1. A prospect texts your Twilio number.

  2. AI pulls out their name, need and budget and gives the lead a score.

  3. They get a quick text back confirming someone will be in touch.

  4. The lead is posted to your hot-leads channel or the general sales channel, depending on the score.

Before it runs live

  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
  • Connect Twilio
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Qualify text-message leads and route them in Slackjust nowSucceeded
Slack · #sales-hot:iphone: Jesse (score 8) — full bathroom refit at Northwind Lane · budget £12k

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 Twilio 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.
qualify_inbound_sms_leads_and_route_to_slack.pyexample
from twilio.rest import Client
from clickruntime import on_event, credentials, http, notify, ai

SCHEMA = {"type": "object", "properties": {"name": {"type": "string"}, "need": {"type": "string"},
          "budget": {"type": "string"}, "score": {"type": "integer"}}, "required": ["need", "score"]}
FROM = "+15005550006"

def sms(to, body):
    return Client(credentials.secret("TWILIO_ACCOUNT_SID"), credentials.secret("TWILIO_AUTH_TOKEN")).messages.create(to=to, from_=FROM, body=body)

@on_event
def handle(event):
    f = event.json or {}
    body = (f.get("Body") or "").strip()
    if not body:
        return {"skipped": "empty"}
    lead = ai.generate(body[:1000], json_schema=SCHEMA, max_output_tokens=120,
                       system="Extract the prospect's name, need and budget. Score 1-10 for a home renovation company.").json
    sms(f["From"], "Thanks for your message! Someone from our team will be in touch today.")
    channel = "#sales-hot" if lead["score"] >= 7 else "#sales"
    notify.slack(f":iphone: {lead.get('name') or f['From']} (score {lead['score']}) — {lead['need']} · budget {lead.get('budget') or '?'}\n>{body[:300]}",
                 channel=channel)
    return {"score": lead["score"]}

FAQ

Common questions

What makes a lead hot?
You describe it in plain words, such as a clear need and a budget over a certain amount.
What does the auto-reply say?
A short thank-you saying someone will be in touch, which you can change.
Can it route by category instead?
Yes. Leads can be sent to different channels by type, such as sales or support.
What permissions does it need?
Twilio number webhook config; 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 “Qualify text-message leads and route them in Slack” from your assistant

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