March 25, 2025
6 min read
Share article

How to Build a Missed Call Text-Back Automation for Local Businesses

Build a missed call text-back automation for local businesses using n8n and Twilio

Missed call text-back is one of the highest-converting, easiest-to-sell automation products for local business clients. The pitch is simple: when a potential customer calls your client and doesn't get an answer, they immediately receive a text message that keeps the conversation alive. According to research, 78% of customers buy from the first business that responds, and most businesses are responding hours later, or not at all.

In this complete build guide, we'll set up the entire missed call text-back system using n8n and Twilio. You'll leave with a working automation you can deploy for clients in under an hour once you've built it once.

For context on how this fits into a broader local business automation offering, see our guide on starting an AI automation agency in 2026.

How the System Works

Here's the complete flow:

  1. Caller dials the business phone number
  2. Call goes unanswered (rings out or voicemail), or is intentionally forwarded to a Twilio number
  3. Twilio detects the missed call and sends a webhook to n8n
  4. n8n workflow processes the caller's phone number and the call context
  5. GPT-4 generates a personalized, business-specific text message
  6. Twilio sends the SMS to the caller within 30–60 seconds
  7. If the caller replies, n8n handles the conversation and notifies the business owner
  8. Lead is logged to CRM and follow-up is scheduled

What You Need Before Starting

  • Twilio account: Sign up at twilio.com. You'll need a Twilio phone number ($1/month) with SMS and Voice capabilities.
  • n8n instance: Either n8n Cloud or self-hosted. Needs to be publicly accessible for Twilio webhooks.
  • OpenAI API key: For AI-generated SMS responses.
  • Client's business details: Business name, hours, services, and the personalized context for the text message.

Step 1: Setting Up the Twilio Phone Number

In your Twilio Console:

  1. Go to Phone Numbers → Buy a Number
  2. Search for a local number in the client's area code (customers prefer local numbers)
  3. Ensure the number has Voice and SMS capabilities
  4. Purchase the number ($1.15/month typical)

Two deployment options:

  • Option A (Call forwarding): Configure the client's existing phone to forward unanswered calls to the Twilio number. The Twilio number handles the missed call detection. This is easier to set up and doesn't require changing the client's existing number.
  • Option B (Direct Twilio number): Give the client a new Twilio number as their primary business number. More control but requires updating all their marketing materials.

For most local business clients, Option A is the fastest path to deployment.

Step 2: Configuring Twilio to Send Webhooks

First, set up your n8n webhook URL. In n8n, create a new workflow and add a Webhook node:

  • HTTP Method: POST
  • Path: /missed-call/{{client_id}}
  • Response Mode: Immediately (important, Twilio expects a fast response)
  • Response Body: <Response></Response> (empty TwiML, tells Twilio to do nothing else)
  • Response Content Type: text/xml

Copy the webhook URL. Then in Twilio Console:

  1. Go to your phone number's configuration
  2. Under Voice & Fax → A Call Comes In: Set to Webhook, paste your n8n URL
  3. Under Call Status Changes: Also set to your n8n URL (this gives you call status events)
  4. Save the configuration

Step 3: Understanding the Twilio Webhook Payload

When a call comes in (and goes unanswered), Twilio sends your webhook a POST request with these fields:

{
  "CallSid": "CAxxxxxxxxxxxx",
  "AccountSid": "ACxxxxxxxxxxxx",
  "From": "+15551234567",
  "To": "+15559876543",
  "CallStatus": "no-answer",
  "Direction": "inbound",
  "CallerName": "",
  "FromCity": "PORTLAND",
  "FromState": "OR",
  "FromZip": "97201",
  "FromCountry": "US",
  "Duration": "0",
  "Timestamp": "Wed, 27 Mar 2026 14:32:00 +0000"
}

The CallStatus field is key. You'll receive multiple webhook calls per call attempt with different statuses: ringing, in-progress, completed, no-answer, busy, failed. You only want to send a text-back on no-answer, busy, and failed, not on completed calls.

Step 4: Filtering for Missed Calls Only

In n8n, add an IF node after your webhook:

  • Condition: {{$json.CallStatus}} is one of: "no-answer" "busy" "failed"
  • True branch: Continue with text-back logic
  • False branch: End workflow (don't send a text for completed calls)

Add a second check to avoid duplicate texts. Use a Redis node or Airtable node to check if you've already texted this number in the last 24 hours:

// Function node: Check for duplicate
const callerPhone = items[0].json.From;
const dedupKey = 'missed_call:' + callerPhone.replace('+', '');
// Check Redis for this key — if exists, skip sending
return [{ json: { dedup_key: dedupKey, caller_phone: callerPhone } }];

Step 5: Generating the AI-Powered Text Message

This is what separates a great missed call text-back from a generic one. Use an OpenAI node to generate a message that feels human and business-specific:

  • Model: gpt-4o-mini (fast and cheap for SMS generation)
  • Temperature: 0.7
  • Max Tokens: 150 (SMS messages should be concise)

System prompt:

You are writing an SMS text message for [Business Name], a [type of business] in [City].

Write a friendly, conversational missed call text-back message that:
- Is under 160 characters (one SMS)
- Acknowledges you missed their call
- Offers to help via text
- Includes a brief, specific CTA
- Sounds like a real person, not a robot

Business context: [Services offered, key differentiators]
Do NOT include the business name at the start — it will be added automatically.
Return ONLY the message text, no quotes or explanation.

Example output: Hi! Sorry we missed your call. I'm happy to help via text — what can we assist you with today? We typically reply within 5 minutes.

Prepend the business name using an n8n expression: {{$node.SetBusinessContext.json.business_name}}: {{$json.choices[0].message.content}}

Step 6: Sending the SMS via Twilio

Use the Twilio node in n8n:

  • Resource: SMS
  • Operation: Send
  • From: Your Twilio phone number
  • To: {{$json.caller_phone}}
  • Message: {{$json.ai_generated_message}}

Alternatively, use an HTTP Request node to call the Twilio Messages API directly, which gives you more control:

  • URL: https://api.twilio.com/2010-04-01/Accounts/{{$credentials.accountSid}}/Messages.json
  • Method: POST
  • Authentication: Basic Auth (Account SID as username, Auth Token as password)
  • Body Type: Form-Data Multipart
  • Body fields: From, To, Body

Step 7: Logging the Lead and Notifying the Business Owner

After sending the SMS, do these two things in parallel using n8n's parallel execution:

Log to Airtable/CRM

  • Airtable node: Create record with caller phone, call timestamp, city/state, message sent, and outcome tracking field
  • Or use a HubSpot node to create a contact and log the missed call activity

Notify the Business Owner

Send an instant notification so the owner knows someone tried to call:

  • Twilio node: SMS to the owner's mobile: "Missed call from {{FromCity}} area ({{From}}), text-back sent automatically. Check your messages!"
  • Or Gmail node: Email with call details and the message that was sent
  • Or Slack node: If the business uses Slack for internal comms

Step 8: Handling Replies

The automation doesn't end when the first text is sent. Build a reply handler:

  1. In Twilio, configure the Messaging webhook for inbound SMS to a new n8n webhook path: /sms-reply/{{client_id}}
  2. The reply webhook receives the caller's response
  3. Look up the caller in your Airtable/CRM to get conversation context
  4. Use GPT-4 to generate a contextual reply that handles common questions (hours, pricing, availability, etc.)
  5. Send the AI response back via Twilio
  6. Alert the business owner when the conversation reaches a booking intent

For the reply handler, use the same AI chatbot architecture covered in our n8n chatbot tutorial, conversation history in Redis, GPT-4 for response generation, business context in the system prompt.

Step 9: Testing Your Workflow

Before going live for a client, test thoroughly:

  1. Call the Twilio number from your own phone and let it ring without answering, verify you receive the text-back within 60 seconds
  2. Test the deduplication, call again within 24 hours and verify no second text is sent
  3. Test reply handling, reply to the text and verify the AI response is appropriate and the business owner is notified
  4. Test the CRM logging, verify each test call creates the correct record
  5. Test with a real number from the target area, verify local number presentation works correctly

Pricing This for Clients

Missed call text-back is a highly productized service, easy to price consistently:

  • Setup fee: $500–$800 (simple configuration, can be done in 2-3 hours once you have the template)
  • Monthly fee: $97–$197/month (covers Twilio costs, AI costs, maintenance, and monitoring)
  • Twilio costs to you: $1.15/month for the number + ~$0.0079/SMS + ~$0.0085/minute for calls = typically $10–$30/month for an active local business
  • OpenAI costs: $0.01–$0.05/call with gpt-4o-mini for message generation
  • Your margin: $60–$160/month after costs

At 20 clients on this recurring service, that's $1,200–$3,200/month in recurring revenue. It's a great upsell to any local business automation project. For more revenue strategies, see our guide on automation platform selection for agencies.

Get the Free Template

The complete Vapi + n8n voice agent template is available for free inside our community. Import the workflow, connect your Vapi account, and deploy this for a client the same day.

Join Kingstone AI Operators, free, to access all templates.

Want n8n templates and training? Join 215+ AI agency owners. Join Kingstone AI Operators on Skool, free.

FAQ

Frequently Asked Questions

How do I build a missed call text back automation with n8n and Twilio?

Set up a Twilio phone number, configure it to send webhooks to your n8n instance when calls come in. In n8n, create a workflow with a Webhook node to receive Twilio call events, an IF node to filter for missed calls only (CallStatus equals no-answer or busy), an OpenAI node to generate a personalized SMS response, and a Twilio node to send the text back. Add Google Sheets or Airtable for lead logging, and a Slack or email notification to alert the business owner. The entire build takes 2-3 hours.

How much does it cost to run a missed call text back system with Twilio?

Twilio costs are minimal. A local phone number costs $1.15/month, SMS messages cost approximately $0.0079 each, and voice minutes cost about $0.0085/minute. For a typical local business with 200 missed calls per month, total Twilio costs run $10-$30/month. Add approximately $0.01-$0.05 per call for OpenAI API costs if using AI-generated messages. Your total infrastructure cost per client is typically under $35/month.

What should I charge clients for missed call text back automation?

The standard pricing model is $500-$800 as a one-time setup fee (the build takes 2-3 hours once you have the template) plus $97-$197 per month for ongoing service. Your Twilio and OpenAI costs run $10-$35/month per client, giving you $60-$160/month margin per client. At 20 clients, that is $1,200-$3,200 in monthly recurring revenue. Position it as 'never lose another lead to a missed call', for a plumber losing 10 calls per week, your $200/month system pays for itself with one recovered job.

How do I prevent duplicate text messages from being sent to the same caller?

Use a deduplication check before sending the SMS. Store each caller's phone number and timestamp in Redis, Airtable, or Google Sheets. Before sending a text-back, check if you have already texted that number in the last 24 hours. If the record exists, skip the SMS. In n8n, add a lookup node between your IF node and Twilio send node. This prevents annoying callers with multiple texts if they call back several times in the same day.

How do I handle incoming SMS replies from callers in n8n?

Create a second n8n workflow with a separate Webhook node for inbound SMS. In Twilio, configure your phone number's Messaging webhook to point to this new endpoint. When a caller replies, Twilio sends the message body and sender phone number to your webhook. Look up the original missed call record, update it with the reply content, notify the business owner via Slack or SMS, and optionally use GPT-4 to generate a contextual auto-response that handles common questions about hours, pricing, and availability.

Should I use call forwarding or a dedicated Twilio number for missed call text back?

Call forwarding (Option A) is the fastest path for most local business clients. Configure the client's existing phone to forward unanswered calls to the Twilio number, which handles detection and text-back. This requires no changes to marketing materials or existing phone numbers. Option B (dedicated Twilio number) gives you more control but requires updating all the client's marketing materials with the new number. For most deployments, start with call forwarding.

Program · 90 days

Client Accelerator bundles the demo software with live coaching.

A one-time $1,499 purchase, or 4 interest-free payments of $374.75. Includes 90 days of Ciela Core with 150 personalized demos a month, two live group coaching calls a week, the private Client Accelerator spaces, priority approval to Build With Adhiraj, and 200+ n8n workflow templates.

See what is included

Ciela is the demo platform for AI agencies and AI consultants. It turns any prospect's website into a live, personalized AI demo (chat, voice, or missed-call text-back) you can send before the first call.

Start Client AcceleratorCiela pricingAgent builds by nicheAll articles

Community · Training

Join Build With Adhiraj free.

Build With Adhiraj is the free community for people building and growing AI service businesses. Learn alongside other operators as you package, demonstrate, sell, and deliver practical AI systems.

Join Build With Adhiraj free