Log and triage inbound calls with Twilio, Whisper, Claude, and Google Sheets
Quick overview This workflow handles Twilio recording-complete webhooks, downloads the call audio, transcribes it with OpenAI Whisper, and uses Anthropic Claude to extract structured call insights. It logs every call to Google Sheets, emails urgent calls via Gmail, and returns an empty TwiML response to close the Twilio request.
How it works Receives a Twilio Recording Status Callback webhook when an inbound call recording is completed. Normalizes the webhook payload to capture the call SID, caller/recipient numbers, recording URL, duration, and a timestamp. Downloads the MP3 recording from Twilio using HTTP Basic Auth and sends the audio to OpenAI Whisper to generate a transcript. Sends the transcript and call metadata to Anthropic Claude and parses its JSON output into fields like intent, urgency, summary, sentiment, and whether a callback is needed. Appends the combined call metadata, transcript, and AI analysis to a Google Sheets tab for logging and reporting. If the call is flagged as urgent (high urgency or a complaint), sends a detailed HTML alert email via Gmail. Returns an empty TwiML XML response to Twilio to complete the webhook response cleanly.
Setup Configure Twilio call recording (TwiML Bin/Studio/Voice setup) and set the Recording Status Callback URL to this workflow’s webhook endpoint. Add Twilio HTTP Basic Auth credentials in n8n (Account SID as username and Auth Token as password) and attach them to the Twilio recording download request. Add an OpenAI API key as an HTTP Header Auth credential (Authorization: Bearer ) for the Whisper transcription request. Add an Anthropic API key as an HTTP Header Auth credential (x-api-key: ) for the Claude messages request. Connect Google Sheets credentials, replace the spreadsheet ID, and create an “Inbound Calls” sheet with columns matching the logged fields. Connect Gmail credentials and replace the recipient address (you@example.com) with the operator inbox for urgent-call alerts.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
Automatic News Summarization & Email Digest with GPT-4, NewsAPI and Gmail
📰 AI News Digest Agent: Auto News Summarizer & Email Newsletter Create an intelligent news curation system that automat...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments