Watch this first for a full click-through: installing the n8n-nodes-sarvam community node, creating Sarvam AI API credentials in n8n, and wiring a TTS → STT → Chat sample chain.
Then continue with Overview and Quick start for prerequisites, install commands, and importable JSON.
This guide shows how to use n8n as your automation layer and Sarvam AI for speech-to-text, text-to-speech, and chat completions across Indian languages — without maintaining a custom backend. It follows the same flow as our LiveKit and Pipecat integration pages: what you will build, a quick path to a first success, then customization, reference tables, best practices, and troubleshooting.
If you already use n8n for CRM, support, or internal tools, you can add Sarvam nodes wherever you need audio or Indic-language text intelligence.
You will be able to:
n8n-nodes-sarvam from Settings → Community Nodes (or npm on self-hosted).transcript, binary data, or choices[0].message.content.Tip: Package and install docs also live on npm — n8n-nodes-sarvam and n8n community nodes.
You reuse this credential on every Sarvam AI node in the workspace.
Hello from Sarvam in n8n.en-IN or hi-IN.data) containing generated audio.That confirms install, credentials, and outbound calls to Sarvam.
{{ $json.transcript }}.{{ $json.choices[0].message.content }}.data — set Input Binary Field on the next STT node to match exactly.If you prefer to start from JSON, skip to Import sample workflows below, import one template, then re-attach your credential on each Sarvam node (n8n may show a warning until you do).
Use the workflow menu ⋯ → Import from URL / File, or File → Import from File, then paste JSON. After import:
Flow: Form Trigger → Sarvam AI (Speech → Speech to Text) → transcript in JSON.
Sarvam node fields
Same pattern as the sample fern/n8n.json: proves binary handoff (data) and {{ $json.transcript }} into chat.
Unlike a single Python pipeline, n8n runs discrete nodes. Think in terms of JSON (text fields) and binary (files / audio).
Typical voice Q&A path
data or a custom name like audio).transcript on the JSON item.data).When multiple Sarvam nodes exist, disambiguate with $('Exact node name').item.json... if {{ $json }} is ambiguous.
Use this when you want HTTP POST with raw audio → transcript → Sarvam model → spoken answer.
data).data — Mode: Transcribe (or Translate to English if the model should only see English).={{ $json.transcript }} — optional System Message with tone and safety rules — Model: sarvam-105b or sarvam-30b for lower latency.={{ $('Sarvam AI').item.json.choices[0].message.content }} (adjust the node name to match your Chat node’s label in the canvas).data unless you renamed it).Naming tip: Give each Sarvam node a unique, descriptive name (for example Sarvam STT, Sarvam Chat, Sarvam TTS) so expressions and logs stay readable.
These mirror the “Hindi / Tamil / multilingual / translate” progression from our LiveKit and Pipecat guides, expressed as node fields instead of Python.
hi-IN — Mode: Transcribe.hi-IN — Options → Speaker: e.g. simran, shubh, or any voice from the list below.ta-IN — Mode: Transcribe.ta-IN — pick a Speaker that fits your UX tests.unknown in the API) when callers may switch languages.Difference: use Mode: Translate to English on STT when the rest of the workflow (CRM, ticketing, English-only LLM) should only consume English text. Then wire User Message on Chat to ={{ $json.transcript }} as usual.
Under Options you can tune temperature, max tokens, top p, penalties, reasoning effort (where applicable), seed, and wiki grounding — same concepts as in Chat completion docs.
STT supports 23 Indian languages (full list in the node’s language dropdown). TTS Target language supports 11 languages (also listed in the UI).
Under Options on Text to Speech:
wav (default), mp3, aac, flac, opus, mulaw, alaw, linear16.8000–48000 Hz (see dropdown).0.5–2.0 (default 1.0).shubh). Try a few in the UI to match your brand.Male: aayan, aditya, advait, amit, anand, ashutosh, dev, gokul, kabir, manan, mani, mohit, rahul, rehan, rohan, ratan, shubh, soham, sumit, sunny, tarun, varun, vijay.
Female: amelia, ishita, kavitha, kavya, neha, pooja, priya, ritu, roopa, rupali, shreya, shruti, simran, sophia, suhani, tanya.
{{ $json.transcript }} — transcript from the immediately previous node when that node outputs it on the same item.{{ $json.choices[0].message.content }} — assistant reply from Chat → Complete.$('Node display name').item.json... — use when several nodes ran before the current one or when you need a specific upstream node. The string must match the node name on the canvas exactly.Always turn on “Execute previous nodes” (or run the whole workflow) so the expression editor can resolve previews.
The Input Binary Field on STT must equal the binary field name from the upstream node (data, audio, etc.). Inspect the Binary tab on the previous node’s output — do not guess.
Rename nodes from generic Sarvam AI to Sarvam STT – inbound, Sarvam Chat – support, and so on. It prevents broken $('...') references after copy-paste.
Use Pin data on a trigger or HTTP node with a small sample file so you can iterate on STT options without re-uploading each run.
Imported samples use executionOrder: v1. For multi-branch workflows, understand n8n’s execution model so STT always runs after the node that fetches audio.
Do not embed API keys in expressions or static JSON exports you commit to git. Use Credentials and n8n’s external secrets integrations for production.
The community node is built usableAsTool: true — on n8n versions that support it, you can expose Sarvam operations to AI Agent-style workflows as tools.
sarvam-30b is a good default for fast replies in chat-heavy automations; move to sarvam-105b when quality matters more.Node does not appear after install — Restart n8n. On self-hosted, confirm the package is installed in the same environment n8n loads and check server logs for install errors.
Community nodes disabled — Your admin may block installs. Ask for n8n-nodes-sarvam to be allow-listed or pre-baked into the image.
Binary data not found on STT — Wrong Input Binary Field name, or the previous node did not output binary on that execution (e.g. GET returned JSON instead of file). For HTTP Request, set response to File when downloading audio.
Empty or nonsense transcript — Check audio format (wav, mp3, ogg, flac), duration, and corruption. Try a fixed Language instead of auto-detect for debugging.
Chat returns errors — Verify User Message is non-empty (expressions must evaluate to text). Confirm Model is set and the Sarvam API is reachable from your host.
401 / 403 from Sarvam — Rotate the key in the dashboard and update the Sarvam AI API credential; ensure no stray spaces in the key field.
Expressions show “undefined” — Prior node did not run in this execution, or the JSON path is wrong. Open OUTPUT on each upstream node and copy paths from the JSON view.
Happy building!