How to Build a WhatsApp AI Sales Agent with ElevenLabs (Text, Voice Notes, Business API)
A customer texts at 10:30 p.m. The agent replies in chat or a voice note, qualifies the project, and never invents a price. How we wired that on ElevenLabs plus the WhatsApp Business Application Programming Interface (API), then embedded the same agent on the website as a Need help widget.

A customer messages the business WhatsApp at 10:30 p.m.: how long does this take, what does a site cost, can you start next week. If nobody replies until morning, that thread is often gone. If a model replies and invents a fee, you have a worse problem than silence.
This is the stack we actually run: an ElevenLabs conversational agent on a WhatsApp Business Account (WABA), so chat and voice notes both get an answer, and the brain is a system prompt plus procedures plus a visual workflow. Official product overview: ElevenAgents. Official channel: WhatsApp on ElevenLabs. Screenshots below are from our live agent. When you fill a field, use Your business name and your services, not ours.
If you have not scored whether WhatsApp should get a model at all, read which business processes to automate with AI first. This channel has high blast radius: the reply lands on the customer’s phone.
What you are building (and what you are not)
The customer talks to WhatsApp. Meta delivers the event. ElevenLabs runs Speech to Text (STT) on voice notes, a large language model (LLM) on the turn, and Text to Speech (TTS) if you reply in audio. You watch the transcript in Conversations. You do not host a webhook on Vercel unless you choose a second stack.
flowchart LR
Cust["Customer<br/>text or voice note"] --> WA["WhatsApp"]
WA --> Meta["WhatsApp Business API"]
Meta --> El["ElevenLabs agent"]
El --> STT["STT if audio"]
STT --> LLM["LLM + prompt<br/>procedures workflow"]
LLM --> Out["Text or voice note"]
Out --> WA
El --> Hist["Conversations history"]
| Piece | Job | Skip if |
|---|---|---|
| ElevenLabs agent | Identity, prompt, voice, LLM, workflow | You only need a canned auto-reply with no voice |
| WhatsApp Business Account | The number customers already message | The number is stuck in the WhatsApp Business app or another provider |
| Knowledge base | Services, FAQs, public process. Retrieval-Augmented Generation (RAG) for long docs | The prompt already fits a one-page offer |
| Procedures + workflow | Qualify, refuse fake prices, offer a consult | You are only answering store hours |
Before you start
- An ElevenLabs agent: any existing agent works. You will create one below if you do not have it.
- A Meta business portfolio you can administer: import runs Meta’s authorization flow. A phone number that is not already in the WhatsApp Business app or registered with another provider.
- A payment method in WhatsApp Manager: required if you send templates or make calls. Meta bills those separately from ElevenLabs.
- A one-page SOP: what you sell, what you never quote in chat, when a human must take it. If that page does not exist, write it before the prompt.
Create the agent in ElevenAgents
The ElevenLabs home screen is Creative (speech, music, dubbing). Agents live in a different product. Bottom left: Switch, then ElevenAgents (Deploy and monitor conversational agents).

New agent. Pick Business Agent, not Personal Assistant and not a blank agent unless you already know the full config. Business Agent is the sales-shaped start (pricing questions, plan fit). Then pick the industry that matches your work. We used Professional Services. You pick yours.

Use case: we selected Customer Support because inbound WhatsApp is mostly questions, not cold outbound. If the number exists only to chase unpaid invoices, pick Billing Inquiries. If it exists only to book calls, pick Consultation Booking. Do not pick Outbound Sales unless you have approved templates and a list you are allowed to message.
Complete your agent:
- Agent name: [Your business name] WhatsApp assistant. Stay under 50 characters.
- Website (optional): https://yourwebsite.com. ElevenLabs says it only reads public pages to personalize the agent. Still curate a knowledge base. A marketing site is not a price sheet.
- Main goal: Help visitors understand your services, qualify whether you are a fit, and offer a consult. Never invent prices, discounts, client names, or availability.
- Chat only: leave off if customers send voice notes. On means audio is ignored and only text is used.

Ground your agent: add knowledge base documents (PDF, Word, Markdown, up to 20 MB). Put your services, FAQs, process, and anything you are willing to say in writing. Skip for now only if the prompt is a single page. Large docs should use Retrieval-Augmented Generation (RAG), not a stuffed system prompt.
System prompt: identity, then guardrails
The system prompt is personality and policy, not turn-taking. ElevenLabs is explicit: prompts do not control interruptions or which languages the agent can speak. Those are platform settings. Prompting guide: system prompt best practices. Split headings. Keep lines short. Repeat the one rule that would hurt the brand if missed.

Paste this and replace the brackets. First message can stay empty on WhatsApp so the agent waits for the customer. Wait time of a few seconds is for voice calls, not chat.
# Identity
You are [Your business name] AI, the WhatsApp assistant for [Your business name], [one-line description], based in [Your city, country].
You help potential and existing clients understand services, answer questions, qualify inquiries, and guide them to next steps.
You are professional, warm, knowledgeable, conversational, and efficient.
# Services
[Your services, one line each. Example: Branding and visual identity. Website design and development.]
# Goal
Explain what we do. Ask one question at a time. Offer a consult when they are a fit.
This step is important: never invent prices, discounts, guarantees, previous results, client names, availability, or capabilities.
# Guardrails
Do not send a proposal from chat.
Do not claim we can start on a date unless a human confirmed it.
If you do not know, say so and offer to have a person follow up.
Keep replies short enough to read on a phone.
- Voice: pick one that matches the brand. Voice notes will sound like this person. We use an engaging, friendly English voice. You pick yours.
- Language: set Default to the language customers actually write. Extra languages are available. Do not enable a mode you cannot support in the knowledge base.
- LLM: a small, cheap model is enough for qualify-and-handoff if the prompt is tight. We used GPT-4o Mini. Upgrade the node in the workflow if a later step needs heavier reasoning.
- Timezone: set to your operating timezone so “tomorrow” is local.
Procedures: the interview, not a brochure
A procedure fires on a trigger, then runs numbered steps. Ours is Qualify a lead and discover project requirements. Yours should use Your business name in the trigger so the model does not wander into generic agency advice.

Copy this skeleton:
- Trigger: User asks about [Your business name] services, requests a quote, asks how much a service costs, describes a business problem, or shows interest in working together.
- Step 1, early pricing: If they ask for a number before the brief exists, say work is scoped from requirements. Do not promise an immediate proposal. Do not paste a generic price list. Ask one clarifying question.
- Step 2, gather: One question at a time. Core problem first, not the service they guessed. Then: audience, timeline, constraints, whether they already have a site or identity.
- Step 3, hand-off: If they are a fit, offer a consult with a person. If they are not, say so cleanly. Do not keep pitching.
Workflow: welcome, qualify, next step
Workflows are a visual graph on top of the base agent. Edges can be LLM conditions (“customer has expressed interest”). Official reference: agent workflows. Three nodes is enough for a first sales loop.

- Welcome and service inquiry: Greet them as an AI assistant for [Your business name]. Ask what they need. Do not dump the full service menu.
- Qualify and inform: Clarifying questions. Match to your services only when the problem is clear. Pull facts from the knowledge base, not from memory.
- Next steps and hand-off: If qualified, offer to schedule a consult with a human. Collect name, company, and the one-line problem. Stop generating fake calendar slots.
Native WhatsApp human takeover is not a shipped button yet (ElevenLabs lists it as coming soon). Until it is, the honest next step is a consult link or a person who watches Conversations. Pair this with the human-in-the-loop review pattern if a later tool would send email or write a Customer Relationship Management (CRM) row.
Connect WhatsApp (the actual Business API step)
In the agent: Settings or Channels. Open WhatsApp (Calls and messaging via WhatsApp Business). Import account. Meta’s screen asks you to pick (or create) the WhatsApp Business Account and grant ElevenLabs permission. Then assign this agent to the number. Until you assign it, inbound messages are ignored and inbound calls are rejected.

On the imported number, set behavior:
- Enable messaging: on, or the agent will not answer chat.
- Enable audio message response: on to reply to voice notes with voice notes. Off to always reply in text. Extra STT and TTS charges apply for audio.
- Enable typing indicator: on so WhatsApp marks the inbound as read while the model works.
Then WhatsApp Manager (business.facebook.com): profile photo, about text, and call settings if you want voice calls on the same number. Add a payment method before templates or outbound calls. Outbound free-form chat is only allowed inside an open customer window. To start a thread you send a Meta-approved template first.
Embed the same agent on your website
WhatsApp is one channel. The site widget is another channel on the same agent, so the prompt, procedures, and workflow do not get rewritten. Official embed: widget customization. In the dashboard: Channels, Widget. The widget is multimodal: Start a call for voice, the chat bubble for text. Voice only is the vendor default. Turn on text if you want both, which we did.
Style it before you paste code. Avatar: Orb, Link, or Image. We used Orb and set the two gradient colors to the site cream and russet (`#f4efe9` and `#7d3e28`). You pick Your brand colors. Enable terms and conditions if a voice call starts from the site. Markdown is allowed. Write Your terms, not a paste of ours. Publish. Widget settings are part of the agent. They go live on publish, not on save-and-hope.

The embed is one custom element plus the official script. The agent must be public (authentication off in Advanced). Restrict hosts in the Security Allowlist to Your domain. Paste this in the HTML that every page shares, usually index.html, and put YOUR_AGENT_ID from the Widget tab:
<elevenlabs-convai agent-id="YOUR_AGENT_ID"></elevenlabs-convai>
<script
src="https://unpkg.com/@elevenlabs/convai-widget-embed"
async
></script>
On this site the tag sits after #root. CSS pins it bottom-right, under the cookie banner (the banner must win the z-index). We do not load the embed script in the first paint. boot.js waits for the first pointer, key, or touch, then injects the script. That keeps Largest Contentful Paint (LCP) from eating a third-party widget on a cold load. Copy that idea if PageSpeed already hurts.
- Placement: fixed, right 20px, bottom 20px. Do not cover Cookie Preferences.
- Copy: dashboard text fields control Need help? and Start a call. Change them to Your language.
- One agent, two doors: the footer widget and WhatsApp should qualify the same way. If the site starts inventing prices, the prompt is the bug, not the embed.

Test like an operator, not a demo
- Text Hello from a personal phone: you should get a short greeting that names [Your business name] as an AI assistant.
- Ask how much it costs: the agent must refuse a fake menu and ask one scoping question. If it quotes a number that is not in your knowledge base, the prompt failed. Tighten Guardrails and republish.
- Send a voice note: it should transcribe and, if audio response is on, reply in the configured voice. If you get silence, check Chat only and Enable audio message response.
- Open Conversations: the same thread should be there. That is how you know what the model said at 10:30 p.m. WhatsApp will not give you a nice agency dashboard.
- Click the site widget: Need help should appear bottom-right after first click or tap (the script loads then, not on first paint). Start a call and chat should both open the same agent. If nothing appears, check the Allowlist host and that the agent is public.
- Walk away for 15 minutes: message conversations time out after the configured max duration or a default 15-minute inactivity window from the agent’s last reply. The next customer message starts a new conversation.
Failure modes we already hit on paper
| Symptom | Usual cause | Fix |
|---|---|---|
| Import refuses the number | Number in WhatsApp Business app, another provider, or a developer-app WhatsApp Business Account | Use a free number in a Meta business portfolio. Do not fight the limitation with a second Cloud API token |
| Texts arrive, nothing replies | Agent not assigned to the imported account | Assign the agent. Unassigned inbound is ignored on purpose |
| Voice notes ignored | Chat only on, or audio response off | Turn Chat only off. Enable audio message response if you want a voice back |
| Invented price or client name | Thin prompt, no procedure, empty knowledge base | Repeat the never-invent line. Add a procedure. Put real facts in documents |
| Outbound template fails | No approved template, or user id includes + | Approve a Utility template. Digits only, country code, no plus |
| You cannot jump into the chat | Human handoff not shipped on WhatsApp yet | Watch Conversations. Offer a consult. Do not sell a takeover button you do not have |
| Need help widget never appears | Embed script blocked on first paint, agent not public, or host missing from Allowlist | Load the script after first click. Authentication off. Add Your domain to Security Allowlist. Publish the agent |
What this is worth
A WhatsApp agent is not a chatbot that says hi. It is Answer, Qualify, Refuse fake numbers, Store the transcript, Hand to a human. That is the same loop as our n8n intake, on a channel customers already have open. The dashboard question (“what is it saying?”) is Conversations, not a custom app, until you outgrow it.
Print the WhatsApp agent launch card and do not share the number until Hello, price, and voice pass. If you want this wired on a real number, with your services in the prompt and a knowledge base that matches the website, start a conversation. Bring the SOP. The agent cannot invent one.
Frequently asked questions
Do I need to code a webhook to put an AI agent on WhatsApp?
Not on this stack. ElevenLabs ElevenAgents can import a WhatsApp Business Account (WABA) and assign an agent. The agent then handles text, voice notes, media, and (if you enable it) calls. A custom Vercel plus OpenAI webhook is a different architecture. Use it only if you need a dashboard ElevenLabs does not give you.
Can the agent answer WhatsApp voice notes?
Yes. Inbound voice notes are transcribed with Speech to Text (STT) and passed to the agent. If Enable audio message response is on, the agent replies with a voice note in its configured voice via Text to Speech (TTS). If generation fails, it falls back to text. Audio adds STT and TTS charges on top of the large language model (LLM).
What should I put in the agent name and main goal?
Agent name: Your business name plus a role, for example “[Your business name] WhatsApp assistant.” Main goal: what it is allowed to do (explain services, qualify, book a consult) and what it must never do (invent prices, send a proposal, claim a slot). Leave Chat only off if you want voice notes processed.
Why did WhatsApp import fail?
The number cannot already live in the WhatsApp Business app or another provider. WhatsApp Business Accounts created under a Meta developer app often cannot use the standard Import account flow. Use a number you can administer in a Meta business portfolio, then import from ElevenLabs. Official limitations live in the ElevenLabs WhatsApp docs.
Where do I see what the agent said to a customer?
ElevenLabs conversation history, not WhatsApp’s own inbox. Open Conversations for the agent. That is the operator dashboard. Native human takeover on WhatsApp is listed as coming soon in the vendor FAQ, so do not promise a “take over” button until it ships.
How do I put the same agent on my website?
In the agent dashboard: Channels, Widget. Copy the elevenlabs-convai custom HTML tag with your agent ID into the site HTML. The widget is multimodal (voice call and text chat). Style the orb and terms in the Widget tab, then publish. Official embed notes: widgets need a public agent with authentication disabled, and you can restrict hosts in the Security Allowlist.
Should the agent quote prices on WhatsApp?
Not from memory. Put scoped fees in a knowledge base document if they are public. If work is quoted from a brief, the procedure should refuse a price list, ask one clarifying question at a time, and offer a human consult. Never invent discounts, client names, or availability.