See llms.txt for all machine-readable content.

Back to Templates

Reply to missed calls with Twilio, Google Sheets, and Gmail

Created by

Created by: Ali Amin || ali-amin
Ali Amin

Last update

Last update 3 hours ago

Categories

Share


Quick overview

This workflow receives Twilio call status webhooks, identifies missed inbound calls, and automatically sends an SMS reply via Twilio, logs the call to Google Sheets, and optionally emails a notification through Gmail.

How it works

  1. Receives a Twilio webhook (HTTP POST) with the outcome of a phone call.
  2. Checks whether the call is an inbound missed call (no-answer, busy, or failed) and ignores answered or outbound calls.
  3. Calculates whether the call occurred during your defined working days and opening hours in the configured timezone.
  4. Builds an in-hours or out-of-hours SMS message and sends it back to the caller using Twilio (continuing even if SMS delivery fails).
  5. Appends a missed-call record (time, caller, number called, status, in-hours flag, reply text, and Call SID) to a Google Sheets log.
  6. Sends an email via Gmail to alert the owner with the call details and the text message that was sent.

Setup

  1. In Twilio, set your phone number’s “Call status changes” webhook to this workflow’s production webhook URL (HTTP POST) for the /missed-call endpoint.
  2. Add Twilio credentials in n8n and ensure the SMS is sent from the same Twilio number that receives the calls.
  3. Add a Google Sheets OAuth connection, select the target spreadsheet and sheet, and create the required headers: Time, Caller, Number called, Call status, In hours, Reply text, Call SID.
  4. Add a Gmail OAuth connection (or remove the email step) and set the recipient address in the email configuration.
  5. Update the configuration values in the code block (business name, timezone, working days, opening/closing hours, and the in-hours/out-of-hours SMS text).