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.
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
Your form sends each new lead to ClickRuntime.
The lead is added to your sheet and texted straight away.
When they text back, their reply is added to their row.
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
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 Google Sheets and Twilio 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 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?
Is AI required?
Do I need two trigger links?
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
Text a receipt photo to log it in a sheet
Text a photo of a receipt to your number and the date, supplier and total are added to your expenses sheet, with a text back to confirm.
See how it worksText back missed callers and log them in a sheet
Anyone whose call you miss gets a text right away, is added to your Missed Calls sheet, and you get an email about it.
See how it worksAnswer product questions by text from a sheet catalogue
Customers who text a question get an answer from the products in your sheet within seconds.
See how it worksKeep exploring
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.