March 27, 2026
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 the free AI Automation Sprint community to access all templates.

Frequently Asked Questions

Want n8n templates and training? Join 215+ AI agency owners. Join the free AI Automation Sprint on Skool.
Community & Training

Join 215+ AI Agency Owners

Get free access to our all-in-one outreach platform, AI content templates, and a community of builders landing clients in days.

Access the Free Sprint
22 people joined this week