Skip to content

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.

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

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

  1. Someone texts a place name to your Twilio number, and Twilio passes it to ClickRuntime.

  2. It looks up the place and fetches the current weather from a free weather service.

  3. The weather is texted back to the person.

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

RunsThe moment it happens
Reply to texts with the weather and log each requestjust nowSucceeded
SMS · Weather lineShrewsbury: 11.4C, wind 18 km/h, rain 0.2 mm now.

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
  • 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

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.
weather_by_sms_logged_in_airtable.pyexample
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?
Open-Meteo, which is free and needs no key. It looks up the place name, then fetches the current temperature, wind and conditions.
Are people's phone numbers stored?
The sender's number is saved in the Airtable log so you can see repeat users. Leave that field out of the script if you prefer not to keep it.
Can it send a forecast instead of current weather?
Yes. Open-Meteo also gives daily forecasts, so the reply can include today's high, low and chance of rain.
What permissions does it need?
Airtable write; Twilio number config. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's 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 “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.