Skip to content

The moment it happens

Text new leads instantly and log them in a sheet

New leads get a text within seconds, are logged in your sheet, and their reply is qualified so you know who's hot.

Runs
The moment it happens
Apps
Google Sheets, Twilio
AI
Optional
Access
Twilio send; Sheets edit

Send this to your assistant

Create a ClickRuntime automation: when a lead comes in from my form, add them to my Leads sheet and text them right away; when they reply, judge how interested they are, update their row, and text me about hot leads.

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

Home service businesses, such as roofers, cleaners and movers, compete on speed. The company that texts first usually gets the job, but the owner is often up a ladder or driving when the lead arrives.

An instant text keeps the lead warm, their reply tells you how serious they are, and the sheet gives you a running list to call back in order of priority.

What you get out of it

  • First to reply

    Leads get a text within seconds, while they're still comparing quotes.

  • Know who's serious

    Replies are judged so you can call the hottest leads first.

  • A list to work from

    Every lead and reply is in your sheet.

  • Hot leads reach you fast

    You get a text the moment a promising lead replies.

How it works

What happens, step by step

  1. Your form sends each new lead to ClickRuntime.

  2. The lead is added to your sheet and texted straight away.

  3. When they text back, their reply is added to their row.

  4. AI can rate the reply as hot, warm or cold, and you get a text about hot leads.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Twilio
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Text new leads instantly and log them in a sheetjust nowSucceeded
SMS · Me🔥 Hot lead Drew Park +447700900888: This week if possible, the whole roof at Acme Street needs looking at

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 Slack
  • Combine it with other Google Sheets 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.
instant_sms_reply_to_new_leads_logged_in_a_sheet.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from twilio.rest import Client
from clickruntime import on_event, credentials, http, ai

SHEET_ID = "your-spreadsheet-id"
MY_PHONE = "+447700900123"
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)
sheets = lambda: build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()

@on_event
def handle(event):
    f = event.json or {}
    if "Body" in f:
        rows = sheets().get(spreadsheetId=SHEET_ID, range="Leads!A2:B").execute().get("values", [])
        row = next((i for i, r in enumerate(rows, start=2) if len(r) > 1 and r[1] == f["From"]), None)
        if row is None:
            return {"skipped": "unknown number"}
        rating = ai.generate(f["Body"][:500], system="Rate this lead's reply: hot, warm or cold. One word.", max_output_tokens=5).text.strip().lower()
        sheets().update(spreadsheetId=SHEET_ID, range=f"Leads!D{row}:E{row}", valueInputOption="RAW", body={"values": [[f["Body"], rating]]}).execute()
        if rating == "hot":
            sms(MY_PHONE, f"🔥 Hot lead {rows[row - 2][0]} {f['From']}: {f['Body'][:200]}")
        return {"rating": rating}
    sheets().append(spreadsheetId=SHEET_ID, range="Leads!A:C", valueInputOption="RAW",
                    body={"values": [[f.get("name", ""), f.get("phone", ""), f.get("message", "")]]}).execute()
    sms(f["phone"], f"Hi {f.get('name', 'there')}, thanks for your enquiry! When are you hoping to get the work done?")
    return {"lead": f.get("phone")}

FAQ

Common questions

What does the first text say?
Whatever you write, usually a thank-you and a question like when they need the work done.
Is AI required?
No. Without it, replies are still logged; AI only adds the hot, warm or cold rating.
Do I need two trigger links?
No. Point your form and your Twilio number at the same link; it can tell them apart.
What permissions does it need?
Twilio send; Sheets edit. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in 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 “Text new leads instantly and log them in a sheet” from your assistant

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