Skip to content

On a schedule

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

Runs
On a schedule
Apps
Airtable, Twilio
AI
Not needed
Access
read/write records; Twilio send

Send this to your assistant

Create a ClickRuntime automation: send this text to every contact in my Airtable 'To text' view through Twilio, and mark each one as sent with the message id.

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 community sports club keeps its members in Airtable. When a match is cancelled because of the weather or the training time changes, someone has to tell forty parents quickly, and email is too slow on a Saturday morning. Texting everyone from a personal phone is tedious and exposes the number.

Putting the people to message into an Airtable view and texting them all from the club's Twilio number gets the news out in minutes. Marking each record as sent means anyone added to the view later can be texted without repeating the message to everyone else.

What you get out of it

  • One message, everyone in the view

    Filter the view by team, group or tag, and the message goes to exactly those people.

  • Sent from your business number

    Texts come from your Twilio number, not someone's personal phone.

  • A record of who got it

    Each record is marked sent with Twilio's message id, so you can check delivery later.

  • Safe to run again

    People already marked as sent are skipped, so adding someone to the view and running again texts only them.

How it works

What happens, step by step

  1. When you run it, or on the schedule you choose, ClickRuntime reads the contacts in your To text view.

  2. It skips anyone already marked as sent or opted out.

  3. Each remaining contact gets the message from your Twilio number, one at a time.

  4. Each record is marked as sent with the message reference, so nobody gets it twice.

Before it runs live

  • Connect Airtable
  • Connect Twilio

What you get

RunsOn a schedule
Text everyone in an Airtable viewtoday, 9:00Succeeded
SMS · Club membersHi Ben, Saturday's match is cancelled because of the weather. Training as normal on Tuesday.

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

  • Run it at a different time, more or less often, or only on weekdays
  • 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.
send_sms_to_an_airtable_list.pyexample
import time
from clickruntime import on_trigger, credentials, http

BASE_ID, FROM = "appXXXXXXXXXXXXXX", "+447700900000"
MESSAGE = "Hi {name}, Saturday's match is cancelled because of the weather. Training as normal on Tuesday."

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_trigger
def run(event):
    api = f"https://api.airtable.com/v0/{BASE_ID}/Contacts"
    headers = {"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"}
    rows = http.get(api, headers=headers, params={"view": "To text",
                    "filterByFormula": "AND({Sent SID}=BLANK(), NOT({Opted out}))"}).json()["records"]
    sent = 0
    for rec in rows:
        f = rec["fields"]
        if not f.get("Phone"):
            continue
        resp = sms(f["Phone"], MESSAGE.format(name=f.get("First name", "there")))
        if resp.ok:
            http.patch(api, headers=headers, json={"records": [{"id": rec["id"], "fields": {"Sent SID": resp.json()["sid"]}}]})
            sent += 1
        time.sleep(1)
    return {"sent": sent, "listed": len(rows)}

FAQ

Common questions

Can I personalise each text?
Yes. Use the contact's first name or any other field in the message, such as 'Hi {First name}, training moves to 6pm'.
How fast does it send?
About one message per second, which keeps within Twilio's standard sending rate for a single number.
What about people who opted out?
Records marked Opted out are skipped, and Twilio itself blocks numbers that replied STOP.
What permissions does it need?
read/write records; Twilio send. 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 each time it runs (on a schedule). Checks that find nothing to do and stop right away aren't counted.
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 everyone in an Airtable view” from your assistant

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