The moment it happens
Reply to texts with the weather and log each request
Someone texts a town name and gets the current weather back, and every request is logged in Airtable.
- Runs
- The moment it happens
- Apps
- Airtable, Twilio
- AI
- Not needed
- Access
- Airtable write; Twilio number config
Send this to your assistant
Create a ClickRuntime automation: when someone texts a city to my Twilio number, reply with the current weather and log the request in my Airtable 'Requests' table.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A farm co-op wants to give members a quick way to check the weather by text, because signal in the fields is often too weak for apps but strong enough for SMS. The organisers also want to see how often members use it and from which areas, to decide whether to keep paying for the number.
Answering each text with the current conditions, and logging the request in Airtable, gives members something useful on a basic phone and gives the organisers real usage numbers. The same pattern works for any look-up by text, such as opening hours or stock checks.
What you get out of it
Works on any phone
No app or data needed: text a place name, get the weather back.
Usage you can see
Every request is a row in Airtable with the number, place and time, ready to group and count.
Clear reply when a place isn't found
If the town name cannot be matched, the reply asks for a nearby larger town.
Free weather data
It uses the free Open-Meteo service, so there is no weather subscription to manage.
How it works
What happens, step by step
Someone texts a place name to your Twilio number, and Twilio passes it to ClickRuntime.
It looks up the place and fetches the current weather from a free weather service.
The weather is texted back to the person.
The request is logged in your Airtable Requests table with the number, place and reply.
Before it runs live
- Connect Airtable
- 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
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Airtable and Twilio steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http
BASE_ID, FROM = "appXXXXXXXXXXXXXX", "+447700900000"
def sms(to, body):
sid = credentials.secret("TWILIO_ACCOUNT_SID")
return http.post(f"https://api.twilio.com/2010-04-01/Accounts/{sid}/Messages.json",
auth=(sid, credentials.secret("TWILIO_AUTH_TOKEN")), data={"From": FROM, "To": to, "Body": body})
@on_event
def handle(event):
msg = event.json or {}
sender, place = msg.get("From"), (msg.get("Body") or "").strip()[:60]
if not sender or not place:
return {"ignored": True}
found = http.get("https://geocoding-api.open-meteo.com/v1/search", params={"name": place, "count": 1}).json().get("results")
if found:
loc = found[0]
now = http.get("https://api.open-meteo.com/v1/forecast", params={"latitude": loc["latitude"], "longitude": loc["longitude"],
"current": "temperature_2m,wind_speed_10m,precipitation"}).json()["current"]
reply = (f"{loc['name']}: {now['temperature_2m']}C, wind {now['wind_speed_10m']} km/h, "
f"rain {now['precipitation']} mm now.")
else:
reply = f"Sorry, I couldn't find {place}. Try a nearby larger town."
sms(sender, reply).raise_for_status()
http.post(f"https://api.airtable.com/v0/{BASE_ID}/Requests",
headers={"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"},
json={"records": [{"fields": {"From": sender, "Place": place, "Reply": reply,
"Received": event.received_at}}]}).raise_for_status()
return {"found": bool(found)}FAQ
Common questions
Which weather service does it use?
Are people's phone numbers stored?
Can it send a forecast instead of current weather?
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
Answer texted questions from your Airtable info
People text a question to your number and get a short answer drawn from the details you keep in Airtable.
See how it worksTurn tenant repair texts into tickets and alert the vendor
When a tenant texts about a problem, an Airtable ticket is created with an urgency rating, the right vendor gets a text, and the tenant gets a confirmation.
See how it worksText everyone in an Airtable view
One message is sent by SMS to every contact in an Airtable view, and each record is marked as sent.
See how it worksKeep exploring
Set up “Reply to texts with the weather and log each request” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.