n8n Voice Agent Business Intelligence with Search
Build voice AI agents in n8n with real-time search data. Pre-cache common lookups and route live search by question type for sub-2s latency.
Building a voice AI agent with business intelligence in n8n requires solving the data lookup latency problem. The voice model responds in milliseconds, but if the agent needs real-time business data mid-call (pricing, availability, hours), the data retrieval step must stay under 2 seconds or the conversation flow breaks.
The Architecture
The n8n workflow handles the orchestration: incoming voice webhook triggers a search query, the search API returns structured data, and the response feeds back to the voice agent for spoken delivery. The key insight is pre-caching common lookups and reserving live search for edge cases.
// n8n HTTP Request node configuration for voice agent search
// Trigger: webhook from Vapi/Retell when agent needs data
const query = $input.first().json.query; // from voice agent
const platform = /price|cost|buy/i.test(query) ? "amazon" : "google";
const response = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.SCAVIO_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({ platform, query })
});
const data = await response.json();
const answer = data.ai_overview?.text?.slice(0, 200)
|| data.organic?.[0]?.snippet?.slice(0, 200)
|| "I could not find that information right now.";
return [{ json: { answer, source: platform } }];Pre-Caching Strategy
Most voice agents handle a predictable set of questions. For a real estate voice agent, 80% of questions are about listing prices, neighborhood info, and scheduling. Pre-cache these in a lookup table (n8n database node or Redis). Only trigger the live search API when the question is outside the cached set. This keeps 80% of responses instant and only 20% hit the 1-2 second search latency.
Platform Routing for Better Answers
Different question types get better answers from different search platforms. Product pricing questions route to Amazon for actual current prices. General factual questions route to Google. "What do people think about X?" routes to Reddit. n8n's IF node handles this routing based on keywords in the voice agent's query.
Cost at Scale
A voice agent handling 50 calls/day with an average of 2 live search queries per call (the rest cached) uses 100 credits/day. At $0.005/credit, that is $0.50/day or $15/month. Compare that to the voice synthesis costs ($50-200/mo for the same call volume) and the search data layer is a negligible cost. The 500 free credits/mo cover 5 days of operation, enough to validate the entire voice agent pipeline before paying.