SMSTunnel for Airtable

Texts from your bases, sent from your own phone

Built into Airtable automations · no extension
Run a script action
Airtable script docs

A text when a record says so

Tick a "Send text" box on a booking, an order or a job, and an Airtable automation hands the text to your SMSTunnel account. Your own Android phone sends it from your own number, so the person can simply reply.

1. Get your key

  1. 1. Install the SMSTunnel app from Google Play on your Android phone and sign in.
  2. 2. In your dashboard, open Apps → Add an app, pick Script or server, name it (for example "Airtable") and click Create the key.
  3. 3. Copy the key right away: it's shown only once. You can stop or delete the app there anytime, and Airtable can't send texts anymore.

Get the steps with your key in them

It opens Add an app with Script or server picked. Once the key is made, the dashboard shows every step and command with the key already filled in, ready to copy.

2. The automation

  1. 1. Add a checkbox field "Send text", a phone field and a text (or formula) field with the message.
  2. 2. Automations → Create automation, trigger When a record matches a condition: "Send text" is checked.
  3. 3. Add the action Run a script. In its input variables, add to (the phone field) and message (the message field).
  4. 4. In the script editor's Secrets tab, add a secret named smstunnel_api_key with your key, and paste the script:
Run a script
// Automation → Run a script. Input variables: "to" (the phone field) and "message".
// Secrets: smstunnel_api_key = your SMSTunnel key.
const { to, message } = input.config();
const apiKey = input.secret('smstunnel_api_key');

const phone = String(to ?? '').replace(/[^\d+]/g, '');
const text = String(message ?? '').trim();
if (!/^\+\d{7,15}$/.test(phone)) throw new Error('Not an international number: ' + to);
if (!text) throw new Error('The message is empty');

const res = await fetch('https://smstunnel.io/api/v1/sms/send', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'X-API-Key': apiKey },
  body: JSON.stringify({ to: phone, message: text.slice(0, 1600) }),
});
const reply = await res.text();
output.set('smsStatus', res.status);
if (!res.ok) throw new Error('SMSTunnel answered ' + res.status + ': ' + reply);
  • The script checks the number (international format, like +14155550123) and stops with a clear error when SMSTunnel says no, so the run shows as failed.
  • Add an Update record step after it that unticks "Send text" (and fills a "Texted at" date), so a record can't send twice by accident.
  • Testing the step runs the script and sends a real text: use a test record with your own number.

Worth knowing

  • Run a script needs a paid Airtable plan (Team, Business or Enterprise Scale). Each run can take up to 30 seconds and make up to 50 calls.
  • Use the secret, not a field. Anyone who can edit the base can read its automations; a secret keeps the key out of the script and out of the run logs.
  • One record, one text, one number. For several people, one record (or one run) per number.
  • Phone offline? The text waits and goes out as soon as the phone is back.

If it doesn't work

  • Open the automation's Run history: the error the script throws includes SMSTunnel's answer.
  • 401 "Invalid or expired API key": the key is wrong or was deleted. "API key is required. Use X-API-Key header.": the key isn't in an X-API-Key header. SMSTunnel reads the key only from that header: Bearer or Basic authentication won't work.
  • 403 with PERMISSION_REQUIRED: the key may not send texts. Make a new one under Apps → Add an app.
  • 400 "property … should not exist": the body has a field SMSTunnel doesn't know. Send only to and message (and, if you need them, deviceId and defaultCountryCode). "message must be shorter than or equal to 1600 characters": shorten the text. "Phone number must contain…": put the number in international format, like +14155550123.
  • 400 with "to must be a string" and "message must be a string": the body didn't arrive as JSON. Add the header Content-Type: application/json.
  • 404 "Cannot GET /api/v1/sms/send": the tool sent a GET. Choose POST.
  • 429: too many texts at once. SMSTunnel takes 30 send requests a minute. Wait a minute and try again.
  • No text, but no error? If your phone is offline, the text waits and goes out as soon as the phone is back online. Open the SMSTunnel app on the phone to check it's linked.

Build it with an AI assistant

Copy this prompt into Claude, ChatGPT, Cursor or Copilot and replace the part in [brackets]. Don't paste your API key into the chat: the prompt doesn't need it.

Help me send texts from an Airtable automation from my own phone, with SMSTunnel.

About SMSTunnel (https://smstunnel.io): my own apps and tools hand text messages (SMS) to my SMSTunnel account, and my own Android phone sends them from my own number, on my own SIM and plan. The phone runs the SMSTunnel app from Google Play (https://play.google.com/store/apps/details?id=io.smstunnel.app), signed in to my account.

What I want: [describe what should send a text, to whom, and when]

How it works:
- No extension: an automation with a "Run a script" action (paid Airtable plans: Team, Business, Enterprise Scale). Trigger "When a record matches a condition", e.g. a "Send text" checkbox is checked.
- Input variables (left panel of the script step): "to" = the record's phone field (international format), "message" = a text or formula field. Secrets tab: smstunnel_api_key = my key (input.secret keeps it out of the script and out of the logs).
- Script:
// Automation → Run a script. Input variables: "to" (the phone field) and "message".
// Secrets: smstunnel_api_key = your SMSTunnel key.
const { to, message } = input.config();
const apiKey = input.secret('smstunnel_api_key');

const phone = String(to ?? '').replace(/[^\d+]/g, '');
const text = String(message ?? '').trim();
if (!/^\+\d{7,15}$/.test(phone)) throw new Error('Not an international number: ' + to);
if (!text) throw new Error('The message is empty');

const res = await fetch('https://smstunnel.io/api/v1/sms/send', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'X-API-Key': apiKey },
  body: JSON.stringify({ to: phone, message: text.slice(0, 1600) }),
});
const reply = await res.text();
output.set('smsStatus', res.status);
if (!res.ok) throw new Error('SMSTunnel answered ' + res.status + ': ' + reply);
- After it, an "Update record" step can untick "Send text" and fill a "Texted at" field, so the record can't send twice by accident.
- Limits: 30 seconds per script run and 50 fetch calls. Testing the step runs the script, so it sends a real text: test with my own number.
- One recipient per request: SMSTunnel sends one text to one number. For several people, one request (or one notification) per number.
- Answers: 200 {"success": true, "messageId": "…"}; 401 wrong or deleted key; 403 the key lacks a permission ("code": "PERMISSION_REQUIRED"); 400 a missing, unknown or too long field; 429 too many requests (30 sends a minute, with Retry-After): wait and retry; without Retry-After, the plan's limit for the day or month is reached. If my phone is offline the text waits and goes out when it is back, within 3 days.
- The API key comes from my SMSTunnel dashboard (https://dashboard.smstunnel.io): Apps → Add an app → Create the key. It is shown only once and can send texts and check whether they went out.

Rules for your answer:
- Do not ask for my SMSTunnel password or API key and do not put a real key in your answer; I will not paste it in this chat.
- Phone numbers must be in international format (+ and the country code).
- Help me test it with my own number first.
- Only send texts people expect from me. No unsolicited texts.
- Keep the key in an Airtable secret, never in the script or a field.

Responsible use

Built for alerts to yourself and your team, and texts people expect from you. One text goes to one number. Sending unsolicited messages from a consumer SIM generally breaches mobile carrier terms of service.

Airtable is a trademark of Formagrid Inc. SMSTunnel is a third-party integration and is not affiliated with, endorsed by, or sponsored by Formagrid Inc..

No phone paired yet?

Install the Android app and sign in with your account, and you're ready in about a minute.

Get it on Google Play