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.
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
When you run it, or on the schedule you choose, ClickRuntime reads the contacts in your To text view.
It skips anyone already marked as sent or opted out.
Each remaining contact gets the message from your Twilio number, one at a time.
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
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
- 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
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?
How fast does it send?
What about people who opted out?
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 appointment reminders and follow-ups from Airtable
Leads who haven't booked get a friendly follow-up text, booked clients get a reminder the day before, and each record is updated.
See how it worksReply 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.
See how it worksAnswer 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 worksKeep exploring
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.