A8gent
Build guide - n8n + Twilio

Missed call text-back with n8n: the full build

Build missed call text-back in n8n with Twilio: business-hours guard, AI qualification reply, and calendar booking - plus the A2P 10DLC step nobody covers.

A8gent
·

What you get from this guide

  • The exact Twilio call-flow that tells n8n a call was missed (n8n has no missed-call trigger)
  • A business-hours guard so after-hours callers get a booking link, not a we-will-call-back promise
  • An AI qualification reply that stays on one question per message and hands off cleanly
  • Google Calendar booking with a free/busy re-check so nobody gets double-booked
  • The A2P 10DLC registration step that silently kills unregistered builds
  • A realistic monthly cost table instead of a free-forever claim

What the workflow actually does

A missed call text-back workflow watches your business line, and when a call goes unanswered it sends the caller a text within seconds: who you are, that you saw the call, and a concrete next step. For an appointment-driven business that single message is often the difference between a booked job and a caller who dials the next company on the search results page while your voicemail is still recording.

The version in this guide goes further than a canned auto-reply. It knows whether you are open, sends different copy accordingly, reads the reply with an AI step that pulls out job type and urgency, offers real open slots from your calendar, and writes the booking back when the customer confirms. A human gets pulled in the moment anything looks unusual.

Most of what is published about this build is a raw workflow JSON pasted into a forum thread. The JSON is the easy part. The parts that decide whether it works in production are the call-status detection, the business-hours guard, the carrier registration, and the handoff rules, so that is what most of this guide is about.

What you need before you start

  • A Twilio account with a local number that has both voice and SMS capability.
  • An n8n instance reachable from the public internet, because Twilio has to POST to it. Self-hosted behind a domain or n8n Cloud both work; a laptop tunnel is fine for testing and not for production.
  • The real phone number that should ring, and the timezone and opening hours of the business.
  • A Google account with the technician or shared booking calendar.
  • An API key for whichever model you use for the qualification step.
  • Your legal business details for A2P 10DLC registration: legal name, EIN or sole-proprietor details, website, and a customer-facing address.

Version drift

n8n renames nodes and reshuffles parameters between releases, and Twilio changes console layout regularly. The logic in this guide is stable; exact node names, field labels, and menu paths are version-dependent, so check the current n8n and Twilio docs rather than trusting any screenshot, including a recent one.

The build, step by step

The build is two n8n workflows and one Twilio number configuration. Workflow A answers the incoming call and forwards it. Workflow B runs after the call ends, decides whether it was missed, and handles the conversation.

1

Buy the number, then start A2P registration immediately

Buy a local number in Twilio with voice and SMS enabled, then go straight to the messaging compliance section and submit brand and campaign registration. Do this first, on day one, because approval is measured in days and everything else you build is untestable in production until it clears. The full detail is in the A2P section below.

2

Forward the call and capture the outcome with TwiML

In n8n, create Workflow A with a Webhook node set to POST and note its production URL. In the Twilio console, set the number's A call comes in webhook to that URL. The workflow responds with TwiML that dials your real phone, with a ring timeout and an action URL pointing at Workflow B's webhook:

twiml-response.xml

<Response>
  <Dial answerOnBridge="true" timeout="20"
        action="https://YOUR-N8N/webhook/call-status"
        method="POST">
    <Number>+15551234567</Number>
  </Dial>
</Response>

Set the Webhook node to respond with the raw XML and a content type of text/xml. The timeout is how many seconds the phone rings before Twilio gives up; 18 to 22 seconds is the usual window before callers hang up anyway. Some teams prefer to build this leg in Twilio Studio instead of raw TwiML, which is equally valid and gives you the same status callback.

3

Detect a genuine missed call

When the dial ends, Twilio POSTs to the action URL with fields including DialCallStatus, From, and To. Add a Switch or IF node in Workflow B: continue when the status is no-answer, busy, or failed, and stop when it is completed. This is the piece the forum JSON usually gets wrong, and getting it wrong means texting people you just spoke to.

Add two more guards before you send anything: skip numbers already in an open conversation in the last few hours, and skip anything on your blocklist. Repeat texting a supplier who calls you eight times a day is the fastest way for the team to turn the workflow off.

4

Add the business-hours guard

Branch on local time and weekday using an IF node fed by a small Code node that computes the hour in your business timezone rather than the server's UTC clock. This is the single most common source of a workflow that texts people "we are open now" at two in the morning.

business-hours.js (n8n Code node)

const TZ = 'America/Chicago';
const now = new Date();
const parts = new Intl.DateTimeFormat('en-US', {
  timeZone: TZ, hour: 'numeric', hour12: false, weekday: 'short',
}).formatToParts(now);

const hour = Number(parts.find(p => p.type === 'hour').value);
const day  = parts.find(p => p.type === 'weekday').value;

const weekday = !['Sat', 'Sun'].includes(day);
const open = weekday && hour >= 8 && hour < 17;

return [{ json: { open, hour, day } }];

Inside hours the message should promise a callback with a time window, because someone is there to make it. Outside hours it should do the booking work, because nobody is. Two different messages, one branch.

5

Send the first text within seconds

Use the Twilio node in send-SMS mode, from the same number the customer just called, so the thread appears under a number they recognise. Lead with the business name, keep it under one segment where you can, and include opt-out language on the first message of a conversation.

first-touch messages

IN HOURS
Hi, this is {Business}. Sorry we missed your call -
we are on a job. Reply here with what you need and
we will call you back within the hour. Reply STOP to opt out.

AFTER HOURS
Hi, this is {Business}. We are closed right now, but
we can get you on tomorrow's schedule. What is going on
with your system, and what part of town are you in?
Reply STOP to opt out.

Put this Twilio node before any AI node. The acknowledgement must not wait on a model call, and if the model provider is having a bad afternoon the customer should still get a text.

6

Qualify the reply with an AI step

Configure a second Twilio webhook for inbound messages on the number, pointed at a third n8n webhook. Pass the message plus the last few turns of the thread into an AI node with a narrow system prompt. The model's job is extraction and one short reply, not free-form conversation.

system prompt

You are the after-hours text assistant for {Business}, a
{trade} company in {city}. Texting only. Rules:

1. Reply in under 320 characters, plain language, no emoji.
2. Ask at most ONE question per message.
3. Collect, in this order: job type, service address or area,
   urgency (emergency / this week / flexible), name.
4. Never quote a price. If asked, say a tech confirms pricing
   on site and offer to book a visit.
5. If the message mentions gas smell, no heat with an infant or
   elderly person, water actively leaking, or anything unsafe:
   stop qualifying, tell them to call {emergency_number} now,
   and set handoff = true.
6. If you cannot classify the message, set handoff = true.

Return JSON: { reply, job_type, area, urgency, name, handoff }

Have the AI node return structured output and branch on handoff. Anything true goes to a Slack or SMS alert for a human instead of another automated reply. Cap the conversation at four or five automated turns; past that, a person should be in the thread.

7

Offer real times and write the booking to Google Calendar

Once you have job type and urgency, call the Google Calendar node to fetch busy periods for the next few working days, generate two or three concrete slots that fit your job-length rules, and offer them as text: two options plus "or tell me what works". Offering a link to a booking page works too, but reply-with-a-number converts better over SMS.

On confirmation, re-check free/busy immediately before creating the event, because minutes have passed and dispatch may have filled the slot. Create the event with the caller number, job type, and the transcript in the description, and text back a confirmation naming the day, the time window, and the business.

Design choice

Until you trust it, have the workflow create the event as a tentative hold and notify dispatch instead of committing the slot. A double-booked Saturday costs more than the workflow saves that month.
8

Log, alert, and test end to end

Append every conversation to a Google Sheet or your CRM: timestamp, number, missed-call reason, branch taken, outcome, handoff flag. That log is how you find out in week three that a third of after-hours callers are asking something your prompt does not handle.

Then test properly with a real phone: let it ring out, decline the call, let it hit voicemail, call during hours, call after hours, reply with nonsense, reply STOP. Add an n8n error workflow that alerts you when any of the three workflows fail, because a silent failure here looks exactly like a quiet week.

A2P 10DLC registration: the step nobody covers

Almost every published missed-call-text-back tutorial stops at the working n8n canvas. Then the build goes live in the US and the texts quietly do not arrive. The reason is A2P 10DLC: US carriers require application-to-person traffic sent from ordinary 10-digit numbers to be tied to a registered business (the brand) and a declared use case (the campaign). Unregistered traffic gets filtered, and filtering is invisible from your side of the wire.

There are two things to submit, and they are submitted in order:

  1. Brand registration. Your legal business identity: legal name exactly as registered, EIN or the equivalent for a sole proprietor, business address, website, and a named contact. Mismatches between your EIN record and what you type are the number one rejection cause, so copy the details from the tax document rather than from memory.
  2. Campaign registration. What you will actually send. For this build the use case is a customer-care or conversational campaign, and you must supply sample messages, a description of how people opt in, and opt-out handling. Your samples have to match the messages you really send, including the business name and opt-out language.

The consent story matters more than people expect. For missed call text-back, the opt-in is that the customer called your business, which is a recognised basis for replying to them, but you should be able to describe it plainly in the campaign submission, mention it on your website's terms or privacy page, and stop when someone opts out. Do not use this number to blast a promotional list; a customer-care campaign carrying marketing blasts is how a registration gets pulled.

Expect fees, not a free ride: a one-time brand registration charge, possible vetting charge for higher throughput, and a recurring monthly campaign fee. The exact amounts differ by campaign type and change over time, so read Twilio's current A2P pricing page rather than any number in a blog post, including this one. Approval typically takes days rather than hours; some campaign types clear faster than others.

Practical sequence

Submit brand and campaign on day one, build the workflow while you wait, and test the call-flow and the AI logic using your own phone. Point the Twilio number at the registered campaign once approved, then go live. Outside the US the rules differ, and some countries have their own sender-ID or registration regimes, so check the requirements for the country you are texting into.

What it costs to run

Here is a realistic monthly estimate for a small service business handling roughly 50 to 100 inbound calls a month, of which a portion are missed. These are planning ranges, not quotes: telecom pricing varies by country, by message length, and by carrier fees that vendors pass through, and it changes.

Rough monthly cost, US small business, ~50-100 calls/month
Line itemTypical rangeNotes
Twilio phone number~$1-2/moLocal US number; toll-free and other countries differ
Inbound voice + forwarding~$2-5/moTwo legs billed per minute while the call rings and connects
Outbound SMS~$3-8/moPer-segment price plus US carrier pass-through fees; long messages split into segments
A2P 10DLC fees~$2-15/moCampaign fee varies by campaign type, plus one-time brand and vetting fees
n8n hosting$0-25/moSelf-host on a small VPS, or use n8n Cloud on a paid plan
AI model usageUnder $2/moA few hundred short qualification replies is pennies on a small model
Rough all-in~$30/moAt roughly 50-100 calls/month; verify against current vendor pricing

Two things move that number the most. Long messages split into multiple SMS segments and are billed per segment, so keeping replies tight is a cost decision as well as a UX one. And self-hosting n8n on a small VPS versus a managed plan is the difference between a few dollars and a few tens of dollars a month, at the price of you owning the uptime.

What it is worth

The honest way to evaluate this build is against your own average job value, not against a vendor case study. Work it out like this: take the number of calls you miss in a month, apply a conservative share that the text-back recovers, and multiply by your average job value and your close rate. For a trade where the average ticket is in the hundreds of dollars, recovering a single job a month covers the running cost many times over, which is why this workflow tends to be the first one worth building.

Be skeptical of the missed-call statistics that circulate in this space. Most originate with vendors selling the solution, and the number that matters is yours: pull the last 90 days of call logs, count the unanswered inbound calls, and ask the office how many of those ever called back. That count, times your own economics, is the business case.

The second-order benefit is harder to price and often larger. After-hours callers currently reach voicemail and your competitor answers; a text that arrives in ten seconds changes who they book with. If you want the arithmetic done properly against your whole task list, the free AI automation audit template scores this workflow against everything else competing for your attention.

Where these builds go wrong

  • Skipping A2P 10DLC and concluding the workflow is broken when the real answer is carrier filtering.
  • Texting on every inbound call instead of only on no-answer, busy, and failed dial statuses.
  • Running business-hours logic on the server clock instead of the business timezone.
  • Putting the AI call before the acknowledgement text, so the first touch inherits model latency.
  • Letting the AI quote prices or promise arrival times it cannot know.
  • Booking straight into the calendar with no free/busy re-check, then double-booking a technician.
  • No handoff path, so an angry or confused customer keeps talking to a bot.
  • No error workflow, so a silent failure looks identical to a quiet week.

FAQ

Do I need A2P 10DLC registration for missed call text-back?
Yes, if you are texting US numbers from a standard 10-digit long code. US carriers require the sending number to be tied to a registered brand and campaign, and unregistered traffic is filtered or blocked rather than politely rejected. Register the brand and campaign before you build, because approval takes days and every tutorial that skips it produces a workflow that silently fails in production.
Can n8n detect a missed call on its own?
No. n8n has no missed-call trigger; Twilio has to tell it. The reliable pattern is to have Twilio dial your real phone with a timeout and post the dial outcome to an n8n webhook, then treat no-answer, busy, and failed as missed. Node names and parameter labels shift between n8n versions, so check the current Twilio and Webhook node docs for exact field names.
How fast should the text go out?
Within about five to fifteen seconds of the call ending. The whole point is to reach the caller while they are still holding the phone and before they dial the next company on the list. If your workflow adds an AI step before the first outbound message, move that step after the initial acknowledgement so latency never delays the first touch.
What does it cost per month?
For a small service business at roughly 50 to 100 calls a month, budget somewhere around 30 dollars a month all-in once you include the number, voice minutes, SMS segments and carrier fees, A2P campaign fees, hosting for n8n, and a few cents of AI usage. Treat that as a planning figure and confirm against current Twilio pricing for your country, since per-segment and campaign fees change.
Should the AI book the appointment or just qualify?
Start with qualify-and-offer-times, with the booking written only on an explicit confirmation from the customer. Full autonomous booking is achievable, but the failure mode is a double-booked technician on a Saturday morning, which costs more than the workflow saves. Add the automatic write-back once you have watched a few hundred conversations behave sensibly.
What happens if someone replies STOP?
Twilio handles standard opt-out keywords on its own by blocking further messages from that number, but your workflow should record the opt-out too so it does not keep trying, and so a human knows why the thread went quiet. Treat any negative or confused reply as a handoff signal, not just the exact keyword.

Done for you

Want this running on your line by next week?

We build missed call text-back for service businesses end to end, including the A2P registration paperwork, the business-hours and handoff rules, and the calendar write-back. Start with a free audit and we will tell you honestly whether this is your highest-value first automation.

The consult is free, and you keep whatever we build.

Keep building

The rest of the cluster