TwilioAirtable

Log inbound Twilio SMS to an Airtable table

A Twilio + Airtable agent flow

Replies to your Twilio number, opt-outs, support texts, a 'yes' to a reminder, live in Twilio's message logs and nowhere a non-engineer can read them. An Airtable table makes them sortable, taggable, and visible to whoever runs the campaign. The agent lists message records through Twilio's Messaging tool, keeps the inbound ones, and writes each as a row with create_record, carrying the from-number, the body, the timestamp, and the status. Twilio returns records when the agent queries them, it doesn't push to Airtable, so the agent reads on a schedule and a message SID it has already logged is skipped.

The flow

TwilioMessaging (twilio_api_v2010)

Send and manage SMS, MMS, and WhatsApp messages; list and inspect message records and media.

Airtablecreate_record

Create a new record in a table with the given field values.

Step by step

  1. Build the table and pick the window

    Create an Airtable table with fields for from-number, body, direction, status, and received-at. Decide the window the agent reads, for instance inbound messages from the last hour.

  2. List the messages

    The agent uses the Messaging tool's list operation, filtered to inbound messages in the window, reading each message's SID, from-number, body, and timestamp.

  3. Write a row per message

    It calls create_record once per message with those fields mapped to your columns, storing the message SID so a re-read of the window doesn't duplicate the row.

Tell your agent

Every 10 minutes, list inbound Twilio messages from the last 15 minutes. For each one, create a record in the SMS Log table in Airtable with the from-number, body, status, and received-at timestamp. Store the message SID and skip any SID already logged.

Setup

This flow needs both servers connected to your agent. Follow each install guide:

Worth knowing

  • The Messaging entry is a multi-operation tool that both sends and lists messages. Be explicit that the agent uses its list/read operation here, and filter to inbound, or it reads your outbound sends too.
  • Twilio paginates message records. On a wide window the agent walks the pages, so cap a first backfill or it logs the whole message history at once.
  • create_record adds a row every call. Use the message SID as a dedupe key and skip SIDs already present, since the same message reappears in an overlapping window.

Questions

Can it pull MMS media too?
The record references attached media, but the body fields are what map cleanly to columns. To store an image you'd have the agent fetch the media URL and attach it, which is a heavier per-message step.
Does it log delivery status of outbound texts?
It can, with a different filter. Point the agent at outbound messages and it reads each one's delivery status, writing sent, delivered, or failed into a status column.