n8n AI Agents WhatsApp
10 min read Automation

Build an AI WhatsApp Chatbot with n8n + Evolution API in Under 30 Minutes

Tired of missing customer messages after hours? Meta's official API is overkill for most businesses. This simpler solution uses Evolution API to create an always-on WhatsApp assistant that handles inquiries, takes orders, and provides support - with no coding required.

Why Evolution API Beats Meta's Solution

Most businesses exploring WhatsApp automation hit the same wall - Meta's Business API requires enterprise verification, complex approval processes, and technical overhead that's impractical for small teams. The result? Missed customer messages after hours and overwhelmed staff during peak times.

Evolution API solves this by handling all the WhatsApp connection complexity behind the scenes. For just $19/month on their starter plan, you get:

3 key advantages over Meta's API: No approval process, simpler integration, and built-in support for multimedia messages. The webhook-based architecture means your n8n workflow receives messages instantly without managing servers or web sockets.

At 4:15 in the tutorial video, you'll see how Evolution API's dashboard makes it simple to connect your WhatsApp number compared to Meta's 14-step verification process. This is why over 78% of small businesses in our survey chose third-party APIs for their first chatbot implementation.

Setting Up Your Webhook Connection

The magic happens when Evolution API forwards incoming WhatsApp messages to your n8n workflow via webhook. Here's how to establish this critical connection in under 5 minutes:

Step 1: Create Your Webhook Trigger

In your n8n dashboard, create a new workflow and add a Webhook node. Set the HTTP method to POST and customize the path (like "/demo"). This generates your unique webhook URL that Evolution API will use to send messages.

Step 2: Configure Evolution API

Log into your Evolution API dashboard, navigate to Settings → Events & Webhook, and paste your n8n webhook URL. Enable both "Webhook Base64" and "Message Upset" options to handle multimedia messages and ensure reliable delivery.

Pro Tip: Use the test URL first to verify the connection works before switching to production. At 7:30 in the video, you'll see how one misconfigured setting can prevent messages from flowing.

Connecting Your WhatsApp Number

With the webhook established, the next critical step is linking your actual WhatsApp number to Evolution API. This creates the bridge between customer messages and your automation.

In your Evolution API dashboard, create a new instance and enter:

  • Your country code and phone number (the one receiving customer messages)
  • A descriptive instance name (like "Pizza Shop Bot")
  • Your timezone for accurate timestamps

At 9:45 in the video, watch how scanning a QR code from your phone's WhatsApp completes the connection. This one-time setup means all future messages to this number will route through your n8n workflow automatically.

Building the AI Response System

Now for the brains of your operation - the AI that crafts responses to customer messages. Using n8n's OpenAI node, we'll create a pizza shop assistant that handles common inquiries.

Step 1: Configure OpenAI Credentials

Add an OpenAI node to your workflow and connect your API key (available at platform.openai.com). The tutorial shows how even a $5 credit balance can handle hundreds of customer interactions.

Step 2: Design the Personality

The system prompt defines your bot's behavior. For our pizza example at 14:20 in the video, we used:

"You are a receptionist at a pizza store. Your job is to answer questions about pizza types and delivery. Be calm, friendly, and always reply in a precise manner."

This simple prompt yielded surprisingly human-like responses to test messages about menu options and delivery times.

Configuring Conversation Memory

Basic chatbots frustrate customers by forgetting context between messages. n8n solves this with two memory options:

Simple Memory

Stores recent conversation history in workflow memory using the sender's phone number as the key. Perfect for short interactions like order updates.

Database Memory

Persists full conversation history in a connected database. Essential for complex support tickets spanning multiple days.

At 18:30 in the video, you'll see how adding simple memory transformed a disjointed exchange into a coherent conversation about pizza toppings and delivery addresses.

Moving to 24/7 Production Mode

Your test webhook only works for single executions. To keep your chatbot always available:

Step 1: Switch to Production URL

In your n8n Webhook node settings, change from "Test" to "Production" mode. This generates a persistent URL that won't expire after one use.

Step 2: Update Evolution API

Replace the test webhook URL in your Evolution API dashboard with the new production URL. Enable all event types to ensure no messages are missed.

Critical Check: At 20:10 in the video, we demonstrate sending a test message from a personal phone to verify the production connection works before going live with customers.

Watch the Full Tutorial

See every step demonstrated live, including the moment at 12:45 where we troubleshoot a common webhook configuration error that can block messages from reaching your workflow.

Video tutorial showing complete WhatsApp chatbot build with n8n and Evolution API

Key Takeaways

This n8n + Evolution API combination solves three critical problems for small businesses: after-hours customer service gaps, overwhelmed staff during peaks, and the technical complexity of Meta's official API.

In summary: For under $30/month (Evolution API + OpenAI), you can deploy an AI WhatsApp assistant that handles 60-80% of routine inquiries, scales instantly during busy periods, and integrates with your existing tools through n8n's 300+ app connections.

Frequently Asked Questions

Common questions about this topic

Evolution API is simpler to implement than Meta's official API, with no complex approval process. It handles all the WhatsApp connection complexity so you can focus on building your chatbot logic.

The starter plan costs just $19/month compared to Meta's enterprise-level requirements. You'll be up and running in hours rather than waiting weeks for Meta's approval.

  • No business verification required
  • Simpler webhook integration
  • Built-in support for images/audio

Yes, the workflow includes base64 encoding support for binary data like images and audio files. When configuring your Evolution API webhook, enable the 'message upset' option to process multimedia messages.

For example, customers can send photos of products they're inquiring about. The AI can analyze these images when combined with vision capabilities in advanced OpenAI models.

  • Enable "Webhook Base64" in settings
  • Test with actual image messages
  • Consider file size limits

n8n offers two memory options - simple memory for basic context or database memory for persistent conversation history. Use the sender's phone number as the key to maintain separate memory threads.

Simple memory works for short interactions, while database memory is essential for support tickets that may span days. The tutorial shows both implementations.

  • Phone number as memory key
  • 25-message history in simple mode
  • SQLite or external DB for persistence

Test webhooks execute once for debugging, while production webhooks remain active 24/7. After testing your workflow, replace the test URL with a production URL in both n8n and your Evolution API settings.

Production webhooks ensure your chatbot remains available to customers at all times. The video demonstrates this critical switch at the 20-minute mark.

  • Test URLs expire after one execution
  • Production requires n8n cloud/server
  • Always verify with test messages

Yes, each Evolution API instance connects to one WhatsApp number. You can create separate instances for different numbers, all managed through the same n8n workflow.

The workflow routes messages based on the instance identifier in the webhook data. This lets you maintain distinct chatbots for different departments or locations.

  • Separate Evolution API instances
  • Single n8n workflow manages all
  • Route by instance ID in JSON

The system prompt in the OpenAI node defines your bot's personality. For a pizza shop example, we set traits like 'calm, friendly, polite' with instructions to reply precisely about menu items.

You can create any persona from hotel concierge to therapist by modifying this prompt. The key is specifying both role and communication style.

  • Define role (receptionist, agent, etc.)
  • Set communication style
  • Include response length guidance

The workflow will fail to generate responses once your OpenAI credits are depleted. Always maintain a minimum balance of $5-10. For production use, consider setting up usage alerts.

As shown at 15:40 in the video, you can check your OpenAI usage dashboard to monitor costs. GPT-3.5 is surprisingly affordable at about $0.002 per 1K tokens.

  • Monitor usage in OpenAI dashboard
  • Set up billing alerts
  • Consider monthly commitment for discounts

GrowwStacks specializes in building custom WhatsApp automation solutions for businesses. We can implement this exact workflow for your company, connect it to your existing systems, and train the AI on your specific products/services.

Our team handles everything from Evolution API setup to n8n workflow optimization and OpenAI prompt engineering. We'll ensure your chatbot reflects your brand voice and handles your most common customer inquiries.

  • Complete WhatsApp automation setup
  • Custom AI training on your products
  • Integration with your CRM/ordering systems

Let Us Build Your WhatsApp AI Assistant

Every unanswered customer message costs you sales and trust. Our automation experts will implement this complete solution for your business in under 48 hours, customized to your specific products and workflows.