A multilingual voice AI agent for ecommerce lets you take orders, answer product questions, and upsell shoppers entirely over the phone in any of your supported languages. In this guide you'll assemble a Vapi-driven sales bot, connect it to Shopify via API, and add OpenAI-powered conversation plus Google Cloud Text-to-Speech for truly multilingual responses.
What is a voice AI sales agent? It is an automated conversational system that interacts with customers through spoken language, answering queries, guiding purchases, and completing transactions without human intervention.
What you need
| Tool | Plan / Price | Role |
|---|---|---|
| Vapi | Pay-as-you-go (check the current pricing page) | Voice gateway, call handling, multilingual STT/TTS |
| Shopify | Standard plan (starts at $39 /mo) | Product catalogue, order management, GraphQL API |
| n8n | Cloud (free tier available for low-volume testing - verify on n8n.io) or self-hosted (Community Edition - free) | Orchestration of API calls and webhook routing |
| OpenAI GPT-4 | $0.03 / 1 K prompt tokens, $0.06 / 1 K completion tokens (check OpenAI pricing) | Conversational reasoning and dynamic response generation |
| Google Cloud Text-to-Speech | $4.00 / 1 M characters (standard voices) - see Google Cloud pricing | High-quality multilingual speech synthesis |
| Supabase (optional) | Free tier (up to 500 MB storage) - verify on supabase.com | Persistent storage for user sessions and analytics |
Estimated build time: 8-12 hours, depending on familiarity with each platform.
How to create a multilingual voice AI agent for ecommerce
Below is a step-by-step walk-through that you can follow line-for-line. Every setting, field, and API endpoint is spelled out so you can copy-paste where possible.
1. Register and configure Vapi
- Sign up at Vapi.ai and create a new Voice Application.
- In Application Settings enable Multilingual Speech-to-Text and Multilingual Text-to-Speech. Add the languages you want to support (e.g., English, Spanish, French).
- Note the generated API Key (under Developer > API Keys) - you'll need it for n8n authentication.
Vapi supports over 30 languages with a single endpoint, removing the need for separate language-specific pipelines.
2. Set up a private Shopify app
- Log into your Shopify admin and navigate to Apps → Develop apps for your store.
- Click Create an app, give it a name like VoiceSalesBot, and enable the following API scopes:
read_products,read_inventory,write_orders. - After saving, click API credentials and copy the Admin API access token and Storefront access token. Keep them secure; they will be used by n8n to query product data and create orders.
For the full spec see Shopify developer docs.
3. Spin up an n8n workflow
We'll use n8n to glue Vapi, OpenAI, Google Cloud, and Shopify together.
- Create a new workflow and add a Webhook node. Set HTTP Method to
POSTand copy the generated URL - this will be the callback URL you register in Vapi (see step 5). - Add a Set node named ExtractIntent to pull the
transcriptandlanguagefields from Vapi's request payload.
What this does: isolates the raw spoken text and the detected language so downstream nodes can work with a clean payload.
- Insert an OpenAI node (use the Chat Completion operation). Map the
promptto a template like:
Set Model to gpt-4.
- Add a HTTP Request node called FetchProduct that calls Shopify's GraphQL endpoint (
https://{{store}}.myshopify.com/admin/api/2023-10/graphql.json). Use the Admin API access token in theAuthorization: Bearerheader. The GraphQL query can be:
What this does: pulls the top-matching products for the user's request, which the OpenAI node can then reference when building its answer.
- Connect the Webhook node to Vapi: In Vapi's dashboard, under Application → Webhooks add a new Call Ended webhook and paste the n8n webhook URL. Choose POST and set Content-type to
application/json.
- Add a Google Cloud TTS HTTP Request node named SynthesizeSpeech. Use the
languageCodefrom Vapi's payload (e.g.,es-ESfor Spanish) and the text from OpenAI's response. Example request body:
Remember to set the Authorization header to Bearer {{YOUR_GOOGLE_CLOUD_ACCESS_TOKEN}}.
- Finally, add a Response node that returns the synthesized MP3 URL back to Vapi. Vapi will stream the audio to the caller automatically.
4. Deploy the workflow
Press Activate in n8n. The workflow will now listen for incoming calls, process the spoken request, query Shopify, generate a multilingual answer via OpenAI, synthesize it, and play it back.
5. Test end-to-end
- From the Vapi console, click Dial Test Number (you can use any SIP-compatible phone or a mobile).
- Speak a request such as "¿Cuál es el precio de la chaqueta azul?"
- The system should:
Detect Spanish, Query Shopify for "blue jacket", Have GPT-4 formulate a short answer in Spanish, Synthesize the reply with Google Cloud TTS, * Play the audio back to you.
If anything fails, the Execution Log in n8n will show which node errored and the exact response payloads.
6. Optional: Persist sessions in Supabase
Add a PostgreSQL node after ExtractIntent to store call_id, language, and last_intent. This lets you implement multi-turn dialogues (e.g., "Add that to my cart") without losing context between webhook calls.
7. Scale and monitor costs
- Vapi charges per minute of call time; monitor via the Usage dashboard.
- OpenAI usage is token-based; a typical sales interaction consumes ~150 prompt tokens and ~250 completion tokens.
- Google Cloud TTS charges per character; a 30-second reply is roughly 400 characters.
Set up alerts in n8n or your cloud provider to avoid surprise bills.
Where this breaks
| Failure mode | Symptom | Fix |
|---|---|---|
| Vapi language detection mismatch | Agent replies in the wrong language | Verify the language codes sent by Vapi; override by forcing a known code in the Set node if needed. |
| Shopify API rate limit (40 req/s per shop) | HTTP 429 Too Many Requests in FetchProduct node | Implement an n8n Delay node (e.g., 200 ms) before each Shopify request, or cache frequent queries in Supabase. |
| OpenAI token quota exceeded | 429 Too Many Requests from OpenAI node | Upgrade the OpenAI billing plan or add a Retry node with exponential back-off. |
| Google Cloud TTS auth expiration | 401 Unauthorized in SynthesizeSpeech | Use a service account key and rotate the token every hour with a Cron workflow that refreshes YOUR_GOOGLE_CLOUD_ACCESS_TOKEN. |
| n8n webhook unreachable (e.g., public URL not reachable) | Vapi logs "Webhook delivery failed" | Ensure the n8n instance has a stable HTTPS endpoint (use n8n.cloud or expose self-hosted via ngrok for testing). |
| Cost blow-up on high call volume | Unexpected spikes in Vapi or OpenAI bills | Set a daily spend limit in Vapi, and add a Function node that checks a Supabase-stored budget_remaining flag before proceeding with expensive calls. |
A single Vapi-Shopify integration can handle at least 5 concurrent calls on a modest cloud VM without degradation, provided you respect Shopify's 40 req/s limit.