Guides

Guide · n8n template · 6 min read

Transcribe Twilio call recordings and extract details with n8n

Phone calls hold details people never type in: amounts, names and what the caller actually asked for. This workflow takes each Twilio call recording, transcribes it, pulls out structured fields with an LLM and writes one clean row per call to Google Sheets. The template extracts donation details, but the same pattern works for any call you need logged.

Free template: Extract Twilio voice donation details with Groq, Gemini, and Google Sheets

By MD Faizan Uzzaman · Verified n8n Creator · Published 12 Oct 2026

How do I send Twilio call recordings to n8n?

Set your n8n webhook URL as the Twilio Recording Status Callback. n8n replies with empty TwiML, then downloads the recording using your Twilio Account SID and Auth Token.

  1. Twilio sends a Recording Status Callback to an n8n webhook, which replies straight away with empty TwiML.
  2. n8n captures the call metadata (CallSid, caller number, recording URL and SID, duration) and continues only if the recording is at least 2 seconds long.
  3. It waits briefly for Twilio to finalise the file, then downloads the MP3 using Twilio HTTP Basic Auth.
  4. The audio goes to Groq's Whisper transcription endpoint.
  5. A LangChain prompt with Google Gemini and Groq chat models extracts the amount, any fee, beneficiary name, currency, a needs-review flag and a short summary.
  6. The output is parsed as JSON. If parsing fails, it falls back to an error summary with needs_review set to yes.
  7. It checks Google Sheets for an existing row with the same CallSid or RecordingUrl and only appends if there isn't one, so retries don't create duplicates.

What does the workflow extract from each call?

Structured fields plus the full transcript and call details, so someone can always check the AI against the original.

FieldNotes
Amount and currencyAs spoken by the caller
FeeOnly if mentioned
Beneficiary nameWho the payment is for
Needs reviewSet to yes when the model's output can't be parsed
Summary and transcriptShort summary plus the full Whisper transcript

How do you set it up?

You need Google Sheets OAuth2, Google Gemini (PaLM) API key, Groq API key, Twilio Account SID and Auth Token connected in n8n. Then:

  1. Import the template into n8n.
  2. Create credentials for Google Sheets OAuth2, a Google Gemini (PaLM) API key and Groq API access.
  3. Add Twilio HTTP Basic Auth (Account SID and Auth Token) so n8n can download recordings.
  4. Set your spreadsheet ID and tab in both Google Sheets steps, and make sure the mapped columns exist.
  5. Copy the n8n webhook URL into Twilio as the Recording Status Callback for your voice setup.

What should you test before it goes live?

The edge cases, not just the happy path.

TestWhat should happen
A very short call (under 2 seconds)Skipped, no row written
Twilio retries the same callbackStill only one row, matched by CallSid or RecordingUrl
Caller never says an amountRow written with needs_review so a person checks it
Model returns broken JSONError summary row with needs_review = yes, nothing lost

Which speech-to-text does it use?

Groq's Whisper transcription endpoint.

What if the AI gets a field wrong?

Each row has a needs_review flag and the full transcript, and parsing failures are flagged automatically, so a person can check before acting on it.

Can I extract something other than donations?

Yes. Change the LangChain extraction prompt and the column mapping to the fields you need.

Related

About the author

I'm Faizan, a Verified n8n Creator. I build n8n automations and the booking back-ends behind voice agents. This template is free on n8n.io.

Want this set up for your business or your clients?

I build and test these workflows for small businesses and voice AI agencies, paid through Upwork escrow.