Connect WhatChimp with N8N AI Agent

Build advanced AI agents with N8N and connect them to WhatChimp for complex WhatsApp automation workflows.

Updated 10 February 2026

Video: https://www.youtube.com/watch?v=SOoM20jkaXM

If you need more flexibility than WhatChimp's built-in AI Agent, you can connect WhatChimp with N8N — a powerful workflow automation platform — to build complex AI agents that respond to WhatsApp messages. This is ideal for advanced use cases like multi-step reasoning, external API lookups, database queries, or custom business logic.

Prerequisites:
- A WhatChimp account with a connected WhatsApp number
- An N8N instance (self-hosted or cloud). Agency Server is recommended for affordable self-hosting
- An OpenAI API key (or another AI model provider)

Overview

The integration works with two pieces:

  1. Outgoing Webhook — WhatChimp sends every incoming WhatsApp message to N8N via a webhook
  2. WhatChimp API — N8N uses the WhatChimp API to send reply messages back

Step 1: Disable the Built-in AI Agent

If you're using WhatChimp's default AI Agent, disable it first so it doesn't conflict with the N8N agent.

  1. Go to Bot Manager in the left sidebar
  2. Select your WhatsApp number
  3. Click AI Agent > Change Settings
  4. Disable the AI Agent and save

Disable built-in AI Agent Bot Manager showing AI Agent settings with Successful message after disabling

Step 2: Create a Webhook in N8N

  1. Open your N8N instance and create a new workflow
  2. Add a Webhook node
  3. Switch the HTTP method to POST
  4. Activate the workflow
  5. Copy the Production URL (not the test URL)

Step 3: Set Up the Outgoing Webhook in WhatChimp

  1. Go to Bot Manager > select your WhatsApp number
  2. Scroll down to the Configuration section
  3. Find Trigger Webhook for Incoming Message and enable it
  4. Paste the N8N webhook Production URL
Important: Make sure you enable the webhook for incoming messages, not outgoing messages. This is a common mistake.
  1. Scroll to the bottom and click Save Settings

Webhook configuration in Bot Manager Bot Manager Configuration page showing webhook settings for incoming and outgoing messages with business hour settings

Step 4: Configure the AI Agent in N8N

Add an AI Agent node after the Webhook node:

  1. Set Source for Prompt/Chat Message to "Define below"
  2. Pass the incoming message from the webhook data as the prompt
  3. Configure Memory (use Simple Memory or PostgreSQL for production):
  • Set the Session ID to the sender's chat ID (phone number) — this ensures each customer gets their own conversation context
  • Set the Context Window Length to 5 messages (or more depending on your model's capability)

AI Agent node configuration N8N AI Agent node showing Source for Prompt configuration with Define below selected and webhook JSON data visible

  1. Connect an OpenAI Chat Model (or another provider):
  • Add your OpenAI credentials
  • Select a model (e.g., GPT-4o Mini for cost-effective responses)

OpenAI Chat Model configuration N8N OpenAI Chat Model node showing credential selection and model dropdown

Step 5: Add the Send Message Tool

The AI Agent needs a tool to send replies back via WhatsApp. Add an HTTP Request node as a tool:

  1. Add an HTTP Request node connected to the AI Agent's "Tool" input
  2. Set the method to POST
  3. Use the WhatChimp API endpoint for sending messages
  4. Pass these parameters:
  • api_token — your WhatChimp API token (found in Bot Manager > API Developer)
  • phone_number_id — your WhatsApp phone number ID (found in Connect WhatsApp)
  • message — let the AI Agent define this parameter
  • phone — the sender's phone number from the webhook data
  1. Name the tool "Send Message" with a clear description so the AI knows when to use it

HTTP Request tool for sending messages N8N HTTP Request node configured as a tool with POST method and WhatChimp API URL

Step 6: Set the System Prompt

In the AI Agent node, add a system message that defines the agent's behavior:

You are a support agent for [Your Business Name]. Your job is to listen to incoming messages on WhatsApp and reply to them. Here is the incoming message from the customer below. Make sure you only draft the final reply because we are going to send the message as it is. Always make sure to use the Send Message tool to send the final reply.

Step 7: Test the Integration

  1. Send a message to your WhatsApp number from another phone
  2. Check the N8N execution history — you should see the webhook fire
  3. The AI Agent processes the message, generates a reply, and sends it back via the WhatChimp API

WhatsApp test showing messages and N8N workflow Split screen showing WhatsApp conversation with test messages on the left and N8N workflow execution on the right

You can also verify the conversation in WhatChimp's Omnichannel Inbox:

Conversation in WhatChimp Inbox WhatChimp Omnichannel Inbox showing AI-generated replies in the conversation thread

The Complete Workflow

Your final N8N workflow should look like this:

Webhook → AI Agent (with Memory + OpenAI Chat Model + Send Message Tool)

Complete N8N workflow N8N canvas showing the complete workflow: Webhook connected to AI Agent with OpenAI Chat Model, Simple Memory, and HTTP Request tool nodes

Tips

  • Use PostgreSQL for memory in production instead of in-memory storage for reliability
  • Add a Vector Store to the AI Agent for advanced knowledge retrieval from your business documents
  • N8N offers built-in tools like Web Search, File Search, and Code Interpreter that you can enable on the AI Agent
  • Test your prompt carefully — a clear system message prevents the AI from adding unnecessary prefixes like "Here is the reply:"
  • Monitor the N8N execution history to debug any issues with the webhook or API calls

Next Steps

More in AI Integration