CORTEXFLOW · FREE FOREVER

Automation

Missed-Call Text-Back AI Booker

↓ Download workflow JSON

Import in n8n: Workflows → ⋯ → Import from file, then add your credentials. Free download with a free account.

How it works

Your AI receptionist that never lets a missed call go cold:

  1. STEP 1 — Twilio webhook + instant response — a missed-call status callback or inbound SMS hits the “Twilio Incoming (Missed Call / SMS)” webhook. “Respond Empty TwiML” answers Twilio immediately with an empty <Response/>, then “Normalize Twilio Payload” turns the form-encoded params into a standard lead event (event_type: missed_call or sms).
  2. STEP 2 — Config + 24h dedupe — two Config Set nodes (“CONFIG — Business Settings”, “CONFIG — AI + Services”) hold every editable value: business name, owner phone, Twilio number, calendar ID, AI business profile, model. For missed calls, the log is read first — if this caller was already texted in the last 24h, the run stops (no double-texting).
  3. STEP 3 — Instant text-back + logging — a new missed call is appended to the sheet with status NEW, a friendly SMS goes out via the Twilio Messages API (“Sorry we missed your call…”), and the sheet flips to CONTACTED.
  4. STEP 4 — AI classifies the reply — inbound SMS rebuilds the conversation history from the Sheets log (“Build History Array”), then “AI Agent — Classify + Draft Reply” (gpt-4o-mini) with the “Structured Output Parser — Intent + Reply” returns {intent, summary, missing_fields, suggested_reply}. Intents: booking, quote, existing_job, wrong_number, other.
  5. STEP 5 — Booking branch — intent booking with zero missing fields → “Google Calendar — Create Booking” → confirmation SMS → sheet BOOKED → “Telegram — Owner Alert” pings you a one-line summary. Missing details → the AI’s follow-up question is texted and the sheet flips to REPLIED.
  6. STEP 6 — Quote / wrong-number branches — quote gets a quote-capture SMS (REPLIED); wrong_number gets a polite close (DROPPED); existing_job / other get the AI’s friendly acknowledgement (REPLIED).
  7. STEP 7 — Daily no-reply sweeper — a second flow in the same workflow (“Daily No-Reply Sweeper”, every 2 hours) scans for CONTACTED rows older than 2h with no reply → sends exactly one nudge SMS → marks NUDGED.

Status flow in Sheets: NEW → CONTACTED → REPLIED → BOOKED (plus DROPPED, NUDGED)

Set up steps

You’ll need:

  • n8n (self-hosted or cloud)
  • A Twilio account with a phone number — twilio.com/try-twilio (free trial works; set the number’s voice status-callback URL and SMS webhook to this workflow’s production URL)
  • An OpenAI API key — platform.openai.com/signup → API keys
  • Google Sheets + Google Calendar OAuth2 credentials — n8n Credentials → Google Sheets OAuth2 / Google Calendar OAuth2
  • A Telegram bot — telegram.org → message @BotFather, send /newbot, copy the token; get your chat ID from @userinfobot

Steps:

  1. Import the workflow — in n8n, Workflows → Import from File → select missed-call-textback-ai-booker.json.
  2. CONFIG — Business Settings — open the Set node and fill in:
    • business_name — e.g. Acme Plumbing
    • owner_phone — your phone in E.164 format (e.g. +1555…)
    • twilio_number — your Twilio number in E.164 format
    • calendar_id — your Google Calendar ID (Calendar settings → “Integrate calendar”)
    • nudge_hours — how long before the sweeper nudges a silent lead (default 2)
  3. CONFIG — AI + Services — open the Set node and fill in:
    • spreadsheet_id — the Google Sheet ID
    • sheet_name — tab name (default Leads)
    • twilio_account_sid — from your Twilio console
    • openai_model — gpt-4o-mini by default
    • telegram_chat_id — your Telegram chat ID
    • ai_business_profile — describe your services, prices, hours, and booking rules — the AI receptionist’s whole brain lives here
  4. Create the sheet — in your Google Sheet, make a tab named Leads with exactly these headers: Date | Phone | Name | Status | Last Message | Conversation | Intent | Booking Date | Summary | Last Updated. Then select your Google Sheets credential in all ten Sheets nodes (or use the credential prompt on import).
  5. Twilio auth — in each “Send * SMS” HTTP node, select your HTTP Header Auth credential. Set the header name to Authorization and the value to Basic <base64(AccountSID:AuthToken)> (encode it once with any base64 tool; the workflow never stores your SID/token in the JSON).
  6. Twilio webhooks — in the Twilio console → your number → Voice: set the Status Callback URL to this workflow’s production webhook URL (POST); Messaging: set “A message comes in” to the same URL (POST).
  7. Google Calendar + OpenAI + Telegram — select your Google Calendar credential in “Google Calendar — Create Booking”, your OpenAI credential in “OpenAI Chat Model — Booker”, and your Telegram credential in “Telegram — Owner Alert”. Then activate the workflow.

Customize it

  • Business tone — rewrite the instant SMS in “Send Instant SMS — Sorry We Missed You” and the nudge in “Send Nudge SMS” to match your brand voice; keep them short and human.
  • Booking requirements — edit the ai_business_profile in “CONFIG — AI + Services” to list exactly what a booking needs (name, address, preferred day/time); the AI only books when missing_fields is empty, so this text is your real booking form.
  • Dedupe window — “Check 24h Dedupe” skips callers texted within the last 24h; the sweeper’s quiet window is nudge_hours in “CONFIG — Business Settings”. Tighten or loosen both for your call volume.
  • Quote handling — the quote branch just captures interest today. Route it into a CRM or a pricing sheet by swapping “Send Quote-Capture SMS“‘s follow-on node.
  • Quiet hours — add a schedule-aware IF before the SMS nodes if you don’t want 2 AM texts going out; queue them for morning instead.
  • Sell it — this is the classic $1.5–3K-setup agency product: clone the workflow per client, swap the two CONFIG nodes, point their Twilio number at it, done.

Workflow nodes

This workflow is built from 37 nodes. Here's what each one does:

#NodeTypeWhat it does
1 Twilio Incoming (Missed Call / SMS) Webhook Entry point — receives incoming HTTP requests that trigger the workflow.
2 Respond Empty TwiML Respond to Webhook Sends the HTTP response back to whoever called the webhook.
3 Normalize Twilio Payload Code Runs custom JavaScript to transform, filter, or compute data between steps.
4 CONFIG — Business Settings Set Holds editable configuration values — fill in your own settings here before activating.
5 CONFIG — AI + Services Set Holds editable configuration values — fill in your own settings here before activating.
6 IF — Missed Call or SMS IF Splits the flow into branches based on a condition.
7 Read Conversation Log — Missed Call Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
8 Check 24h Dedupe Code Runs custom JavaScript to transform, filter, or compute data between steps.
9 IF — Texted in Last 24h IF Splits the flow into branches based on a condition.
10 No Action — Already Handled Set Holds editable configuration values — fill in your own settings here before activating.
11 Log Lead — Status NEW Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
12 Send Instant SMS — Sorry We Missed You HTTP Request Calls an external API or webhook endpoint.
13 Update Sheet — Status CONTACTED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
14 Read Conversation Log — Lookup Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
15 Build History Array Code Runs custom JavaScript to transform, filter, or compute data between steps.
16 AI Agent — Classify + Draft Reply AI Agent The AI brain — reasons over the task and calls tools to get it done.
17 OpenAI Chat Model — Booker OpenAI Chat Model The language model powering the AI agent.
18 Structured Output Parser — Intent + Reply Structured Output Parser Forces the AI to return clean, structured JSON instead of free text.
19 IF — Booking Ready IF Splits the flow into branches based on a condition.
20 Google Calendar — Create Booking Google Calendar Creates or reads events in Google Calendar.
21 Send Booking Confirmation SMS HTTP Request Calls an external API or webhook endpoint.
22 Update Sheet — Status BOOKED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
23 Telegram — Owner Alert Telegram Sends you a Telegram message or alert.
24 IF — Needs Booking Info IF Splits the flow into branches based on a condition.
25 Send Follow-up SMS — AI Question HTTP Request Calls an external API or webhook endpoint.
26 Update Sheet — REPLIED (Follow-up) Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
27 IF — Wrong Number IF Splits the flow into branches based on a condition.
28 Send Polite Close SMS HTTP Request Calls an external API or webhook endpoint.
29 Update Sheet — Status DROPPED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
30 Send Quote-Capture SMS HTTP Request Calls an external API or webhook endpoint.
31 Update Sheet — REPLIED (Quote/Other) Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
32 Daily No-Reply Sweeper Schedule Trigger Starts the workflow automatically on a schedule.
33 Read Conversation Log — Sweeper Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
34 Find Stale CONTACTED Leads Code Runs custom JavaScript to transform, filter, or compute data between steps.
35 IF — Stale Leads Found IF Splits the flow into branches based on a condition.
36 Send Nudge SMS HTTP Request Calls an external API or webhook endpoint.
37 Update Sheet — Status NUDGED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.

Setup instructions

1. Add your credentials

In n8n go to Credentials → New, create each credential below, then open the named node and select it:

NodeCredential to add
Read Conversation Log — Missed Call Google Sheets OAuth2
Log Lead — Status NEW Google Sheets OAuth2
Send Instant SMS — Sorry We Missed You HTTP Header Auth
Update Sheet — Status CONTACTED Google Sheets OAuth2
Read Conversation Log — Lookup Google Sheets OAuth2
OpenAI Chat Model — Booker OpenAI API
Google Calendar — Create Booking Google Calendar OAuth2
Send Booking Confirmation SMS HTTP Header Auth
Update Sheet — Status BOOKED Google Sheets OAuth2
Telegram — Owner Alert Telegram Bot API
Send Follow-up SMS — AI Question HTTP Header Auth
Update Sheet — REPLIED (Follow-up) Google Sheets OAuth2
Send Polite Close SMS HTTP Header Auth
Update Sheet — Status DROPPED Google Sheets OAuth2
Send Quote-Capture SMS HTTP Header Auth
Update Sheet — REPLIED (Quote/Other) Google Sheets OAuth2
Read Conversation Log — Sweeper Google Sheets OAuth2
Send Nudge SMS HTTP Header Auth
Update Sheet — Status NUDGED Google Sheets OAuth2

2. Fill in your config values

Open the config node listed below and replace each placeholder with your own value before activating the workflow:

NodeFieldWhat to paste
CONFIG — Business Settings business_name PASTE_YOUR_BUSINESS_NAME
Your business name
CONFIG — Business Settings owner_phone PASTE_YOUR_OWNER_PHONE
Your owner phone
CONFIG — Business Settings twilio_number PASTE_YOUR_TWILIO_NUMBER
Your twilio number
CONFIG — Business Settings calendar_id PASTE_YOUR_GOOGLE_CALENDAR_ID
Your google calendar id
CONFIG — AI + Services spreadsheet_id PASTE_YOUR_SPREADSHEET_ID
Your spreadsheet id
CONFIG — AI + Services twilio_account_sid PASTE_YOUR_TWILIO_ACCOUNT_SID
Your twilio account sid
CONFIG — AI + Services telegram_chat_id PASTE_YOUR_TELEGRAM_CHAT_ID
Your telegram chat id
CONFIG — AI + Services ai_business_profile PASTE_YOUR_AI_BUSINESS_PROFILE
Your ai business profile

How this workflow starts

  • Webhook: Listens on path /missed-call-textback — copy the production URL from the node after activating the workflow.
  • Schedule Trigger: Runs every hours.

Use cases

Missed calls are the quietest leak in a service business. The phone rings while you are under a sink, on a roof, or mid-appointment — and by the time you call back an hour later, the customer has already hired whoever picked up first. This template turns every missed call into an instant text conversation: a Twilio webhook fires when a call goes unanswered, the caller gets a friendly SMS within seconds, and an AI agent reads their reply, classifies what they want, and books the job straight into Google Calendar. Every step is tracked in Sheets, from NEW to BOOKED.

The plumbing contractor who can never reach the phone

Sam runs a two-van plumbing outfit and spends his day under sinks and behind water heaters, so most calls ring out — and plumbing customers rarely leave voicemails. With this workflow, the missed-call status callback hits the Twilio Incoming webhook, an empty TwiML response keeps Twilio satisfied, and the Normalize Twilio Payload node turns the form data into a clean lead event. The caller gets the instant SMS within seconds, the sheet logs them as NEW then CONTACTED, and when they reply with an address and a day, the AI books the slot and flips the row to BOOKED. Practical tip: treat the ai_business_profile text as your real booking form — the AI only books when no fields are missing, so spell out exactly what you need: service type, address, and preferred day or time.

The HVAC company buried in quote requests

During a heatwave, an HVAC company can get thirty calls a day, most of them price shoppers. The AI classifier sorts them automatically: booking intent goes to the calendar, while quote intent gets the quote-capture SMS and lands at REPLIED. The Daily No-Reply Sweeper re-scans every two hours and sends exactly one nudge to anyone still sitting at CONTACTED, marking them NUDGED. Practical tip: the quiet window is nudge_hours in CONFIG — Business Settings — tighten it to one hour or loosen it to four depending on how aggressive you want the follow-up to be.

The dental clinic separating new patients from existing ones

Clinics get two kinds of calls: existing patients chasing appointments and new patients asking about services. The Structured Output Parser labels each reply — booking, quote, existing_job, wrong_number, or other — so existing patients get a warm acknowledgement and new bookings flow into the calendar with all details captured. The 24h dedupe check means a patient who calls twice in one afternoon only gets one text-back — a small thing that matters a lot in a practice full of repeat callers. Practical tip: put your clinic hours and the insurance plans you accept in the AI business profile so the agent answers those questions itself instead of escalating everything to your front desk.

The salon that keeps losing Saturday bookings

A three-chair salon's Saturdays fill fast, and missed calls on Friday afternoon become lost revenue by Monday. When a caller replies wanting a cut and color, the AI asks for whatever is missing — which stylist, what time — texting the follow-up question and marking the row REPLIED until every field is collected. Once the reply is complete, the booking lands on Google Calendar and the owner gets a one-line Telegram alert. Practical tip: list services, durations, and prices in the business profile so the AI quotes accurately and only books realistic slots.

The real estate agent fielding weekend showing calls

Agents get calls at the worst moments — mid-showing, mid-negotiation. Wrong numbers are a real cost here too, and the workflow closes them politely with a short SMS and marks them DROPPED, so they never clog the pipeline. Real buyers get booked into the calendar, and every booking triggers the Telegram owner alert with a one-line summary. Practical tip: if you do not want 2 AM texts going out, add a schedule-aware IF node before the SMS nodes to hold messages until morning.

Selling it as a done-for-you agency product

This is a classic agency offer: a missed-call text-back system for local businesses at a setup fee plus monthly. Cloning the workflow per client takes minutes — swap the two CONFIG nodes, point their Twilio number at the webhook URL, and it is live. Each client gets their own sheet, their own calendar, and their own 24h dedupe behavior, while you manage everything from one n8n instance. Practical tip: keep a master sheet of client CONFIG values so onboarding a new roofer or electrician is a ten-minute job, not a rebuild.

← All templates