Back to Library
Tech Deep DiveEngineering

ManyChat n8n WhatsApp Voice Bot: ElevenLabs API Guide

Alfaz Mahmud Rizve
Alfaz Mahmud Rizve
@whoisalfaz
July 25, 2026
6 min read
ManyChat n8n WhatsApp Voice Bot: ElevenLabs API Guide

This technical breakdown contains affiliate links. If you deploy this stack using my links, I earn a commission at no extra cost to you.

Voice messages have quickly become the preferred mode of communication for millions of global users on messaging platforms like WhatsApp. However, converting incoming mobile voice notes into actionable data and returning natural audio responses presents significant technical challenges for enterprise automation teams. By combining ManyChat for frontend messaging handle management, n8n for backend workflow orchestration, OpenAI Whisper for Speech-to-Text (STT), and ElevenLabs for Text-to-Speech (TTS), developers can construct a fully automated, asynchronous WhatsApp Voice Bot.

This step-by-step engineering blueprint explains how to build a production ManyChat n8n WhatsApp Voice Bot. You will learn how to handle WhatsApp media attachments, transcribe Opus-encoded audio files, generate voice responses, and bypass webhook timeouts using asynchronous Meta API endpoints.


Asynchronous Architecture for WhatsApp Voice Note Processing

Building a voice-enabled conversational bot on Meta messaging channels requires overcoming strict media attachment constraints and handling continuous audio stream conversions asynchronously. When a user sends a voice note over WhatsApp, ManyChat captures the incoming message event but receives only a temporary media CDN URL rather than raw audio text. To process voice inputs without triggering ManyChat's rigid 10-second HTTP request timeout, technical teams deploy an event-driven decoupled architecture using n8n. The initial webhook payload is acknowledged immediately with an HTTP 200 response code, releasing the messaging interface while n8n downloads the voice file, executes speech-to-text transcription via OpenAI Whisper, generates contextual conversational responses using LLM chains, synthesizes audio via ElevenLabs, and dispatches the final voice message back to WhatsApp via async API endpoints. This structural design ensures optimal system throughput across high-volume enterprise production environments.

JSON Payload
graph TD
    A[WhatsApp Voice Note] -->|ManyChat Ingress| B[n8n Webhook Ingress]
    B -->|200 OK Handshake| C[ManyChat Interface]
    B -->|Async Queue| D[Fetch Audio CDN File]
    D -->|Binary Buffer| E[OpenAI Whisper STT]
    E -->|Transcribed Text| F[LLM Agent Reasoning]
    F -->|Response Text| G[ElevenLabs TTS Synthesis]
    G -->|Public Audio URL| H[ManyChat sendContent API]
    H -->|Play Audio Note| A

Ingesting Media URLs via ManyChat Webhooks and n8n Nodes

Capturing media attachments from WhatsApp voice messages involves configuring ManyChat custom user fields to store binary audio URLs before triggering external automation webhooks. When an inbound voice note is received, ManyChat populates a custom field with the direct Meta CDN link and fires an HTTP POST request to your n8n workflow endpoint. Inside n8n, the Webhook node parses the incoming JSON body to extract the subscriber ID, channel metadata, and voice file URL. An n8n HTTP Request node then fetches the binary audio data, handling required authentication headers and content-type headers appropriately. Preserving binary buffer integrity during media ingestion is critical to ensure downstream Speech-to-Text models receive uncorrupted audio files for accurate transcription across various mobile device codecs and regional phone networks. This structural design ensures optimal system throughput across high-volume enterprise production environments.

JSON Payload
{
  "name": "ManyChat WhatsApp Audio Ingress Workflow",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "manychat-whatsapp-audio",
        "responseMode": "onReceived"
      },
      "name": "Webhook Audio Ingress",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "url": "={{ $json.body.voice_note_url }}",
        "responseFormat": "file",
        "options": {}
      },
      "name": "Download Voice Audio File",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [480, 300]
    }
  ],
  "connections": {
    "Webhook Audio Ingress": {
      "main": [
        [
          {
            "node": "Download Voice Audio File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Speech-to-Text Transcription with OpenAI Whisper and Node.js

Converting ingested mobile voice recordings into accurate text transcripts requires passing raw binary audio streams into high-performance automatic speech recognition engines like OpenAI Whisper. Mobile voice notes recorded on WhatsApp typically use compressed OGG audio containers encoded with the Opus codec, which must be decoded or passed directly to API endpoints supporting multi-format audio ingestion. Within n8n, a JavaScript Code node prepares multipart form-data request parameters, appending the binary audio buffer alongside model configuration flags such as language selection and prompt context. Transcribing voice notes with high accuracy ensures downstream large language models receive clean text inputs, eliminating phonetic misinterpretations and enabling sophisticated intent classification for automated lead qualification and customer support workflows across business platforms. This structural design ensures optimal system throughput across high-volume enterprise production environments. Engineering teams must maintain strict monitoring over these cloud execution boundaries for operational reliability.

JSON Payload
/**
 * Formats Binary Audio Buffer for OpenAI Whisper API Transcription
 */
const binaryData = $input.item.binary.data;

if (!binaryData) {
  throw new Error("No binary voice note data found in incoming item.");
}

return [{
  json: {
    mimeType: binaryData.mimeType || "audio/ogg",
    fileName: binaryData.fileName || "whatsapp_voice_note.ogg",
    fileSize: binaryData.fileSize,
    model: "whisper-1",
    language: "en"
  },
  binary: {
    file: binaryData
  }
}];

Generating Natural Speech Responses with ElevenLabs API

Delivering voice responses back to WhatsApp users involves converting text generated by language models into hyper-realistic spoken audio using ElevenLabs speech synthesis APIs. Once the conversational response text is generated in n8n, an HTTP Request node calls ElevenLabs' Text-to-Speech endpoint, specifying voice ID parameters, stability settings, and audio format options optimized for messaging apps. The returned binary audio buffer is stored temporarily on a secure public cloud storage bucket or hosted via an n8n static file endpoint to generate an accessible public HTTPS media URL. Passing this public media URL back to Meta messaging APIs ensures seamless audio playback within the user's WhatsApp chat window, creating an immersive, hands-free conversational experience for active subscribers. This structural design ensures optimal system throughput across high-volume enterprise production environments. Engineering teams must maintain strict monitoring over these cloud execution boundaries for operational reliability.

JSON Payload
/**
 * ElevenLabs TTS Request Payload Formatter Node
 */
const responseText = $input.item.json.llm_response_text;
const voiceId = "21m00Tcm4TlvDq8ikWAM"; // Rachel Voice ID

return [{
  json: {
    endpoint: `https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`,
    method: "POST",
    headers: {
      "xi-api-key": $env['ELEVENLABS_API_KEY'],
      "Content-Type": "application/json"
    },
    body: {
      text: responseText,
      model_id: "eleven_turbo_v2_5",
      voice_settings: {
        stability: 0.5,
        similarity_boost: 0.75
      }
    }
  }
}];

Bypassing Webhook Timeouts and Async Meta API Delivery

Transmitting synthesized audio files back to WhatsApp subscribers while avoiding messaging policy blocks requires adhering strictly to Meta API rate limits and window restrictions. Because processing voice transcription and speech generation can require 15 to 30 seconds of total background execution time, responses must be pushed asynchronously using the ManyChat sendContent API or WhatsApp Business Cloud API endpoints. Calling the ManyChat subscriber messaging endpoint with a structured audio component payload delivers the voice file directly into the active chat session without relying on synchronous HTTP response blocks. Implementing Redis queue throttling inside n8n protects upstream speech synthesis keys from rate limits, guaranteeing high availability and robust performance during peak marketing campaigns across worldwide user bases. This structural design ensures optimal system throughput across high-volume enterprise production environments. Engineering teams must maintain strict monitoring over these cloud execution boundaries for operational reliability.

JSON Payload
{
  "name": "Send WhatsApp Audio Response Payload",
  "subscriber_id": "={{ $json.subscriber_id }}",
  "data": {
    "version": "v2",
    "content": {
      "messages": [
        {
          "type": "audio",
          "url": "={{ $json.synthesized_audio_url }}"
        }
      ]
    }
  }
}

In this Article

Ready to automate your agency?

Skip the manual grunt work. Let's build a custom system that runs your business on autopilot 24/7.