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
- Receives a Twilio webhook (HTTP POST) with the outcome of a phone call.
- Checks whether the call is an inbound missed call (no-answer, busy, or failed) and ignores answered or outbound calls.
- Calculates whether the call occurred during your defined working days and opening hours in the configured timezone.
- 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).
- Appends a missed-call record (time, caller, number called, status, in-hours flag, reply text, and Call SID) to a Google Sheets log.
- Sends an email via Gmail to alert the owner with the call details and the text message that was sent.
Setup
- 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.
- Add Twilio credentials in n8n and ensure the SMS is sent from the same Twilio number that receives the calls.
- 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.
- Add a Gmail OAuth connection (or remove the email step) and set the recipient address in the email configuration.
- 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).