How to Build an AI WhatsApp Customer Support Assistant with n8n

This workflow automates customer support via WhatsApp using AI that dynamically crawls your company’s website to answer queries instantly. It saves hours of manual responses and ensures up-to-date, precise information.
WhatsApp Trigger
agent
toolHttpRequest
+7
Workflow Identifier: 1282
NODES in Use: WhatsApp Trigger, AI Agent, list_links, get_page, OpenAI Chat Model, Postgres Users Memory, Code, If, Send Pre-approved Template Message to Reopen the Conversation, Send AI Agent’s Answer

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow makes WhatsApp a smart helper to answer customer questions fast. It solves the problem of business owners spending lots of time replying to repeated questions. The workflow uses live website data and AI to give quick and correct answers. Customers get replies in seconds, and businesses save hours daily.

It works by catching WhatsApp messages, finding answers from the website in real time, and sending clean replies back. It also stores chat history to keep conversations natural. This keeps answers fresh as the website changes.


Who Should Use This Workflow

This is good for small or big businesses using WhatsApp to talk with customers. If many people ask similar questions like about products, shipping, or payment, this workflow helps a lot. It cuts down hours spent on simple replies and lowers mistakes. It also works for those who want answers always based on the current website.


Tools and Services Used

  • WhatsApp Business API: gets and sends customer messages.
  • OpenAI GPT-4o-mini: understands questions and helps create good answers.
  • Lemolex API (list_links and get_page tools): finds website links and reads page text.
  • Postgres database: saves chat memory for each customer.
  • n8n automation platform: runs and manages the workflow.

How the Workflow Works: Inputs, Processing, and Output

Inputs

  • Customer sends a message to the business WhatsApp number.
  • Message text and sender info are captured by the WhatsApp Trigger node.

Processing Steps

  • The message text is sent to AI Agent node, which uses AI and website crawling tools to find the best answer.
  • list_links node calls Lemolex API to get internal URLs from the company’s website.
  • get_page node fetches clean text from those URLs for analysis.
  • Postgres Users Memory node keeps the chat history per user to add context.
  • A Code node named cleanAnswer removes markdown and formats the AI reply for WhatsApp.
  • An If node checks if the user contacted within 24 hours to follow WhatsApp rules.
  • Depending on timing, a pre-approved message template node reopens chats or the AI reply is sent.

Output

  • User gets a fast, accurate, and easy-to-read answer to their WhatsApp message.
  • The conversation continues smoothly with stored context.

Beginner Step-by-Step: How to Use This Workflow in n8n

Importing the Workflow

  1. Open the n8n editor.
  2. Download the workflow file using the Download button on this page.
  3. In n8n, choose “Import from File” and upload the downloaded file.

Configuring Credentials and Settings

  1. Enter your WhatsApp Business API OAuth credentials in the WhatsApp Trigger node and message sending nodes.
  2. Set your OpenAI API Key in the OpenAI Chat Model node.
  3. Input the Lemolex API Key in both the list_links node and get_page node.
  4. Provide Postgres database connection details in the Postgres Users Memory node.
  5. Update the system message inside the AI Agent node with your company name and website URL.
  6. Check any IDs, templates, or table names if needed.

Testing and Activating

  1. Send a test WhatsApp message to ensure the workflow triggers and replies correctly.
  2. If all works, turn on the workflow using the toggle at the top right of n8n.
  3. Monitor executions and adjust settings if needed.

For users who prefer more control, consider self-host n8n on your server.


Customizations

  • Change company name and website URL in the AI Agent’s system message to fit your brand.
  • Modify or replace the pre-approved WhatsApp template message to match your style.
  • Adjust how long chat history is kept by changing Postgres retention settings.
  • Pick a different OpenAI model if you want other balances of cost and response quality.

Handling Common Problems

  • If AI Agent returns “Non-subscribed user.”, check your Lemolex API Key is correct and active.
  • If WhatsApp Trigger node doesn’t work, verify the OAuth credentials and try reconnecting.
  • If replies are empty or irrelevant, update company name and URL in the AI Agent node.
  • If get_page node shows 404 errors, ensure URLs are only from your website collected by list_links.

Pre-Production Checklist

  • Confirm all API Keys and credentials for WhatsApp, OpenAI, Lemolex, and Postgres are set.
  • Make sure the AI Agent’s system message has accurate company data.
  • Test sending a WhatsApp message to activate the workflow.
  • Check Postgres database stores chat sessions after test runs.
  • Manually run list_links and get_page nodes and verify correct website data.
  • Verify 24-hour window logic sends proper responses.

Deployment Guide

Turn the workflow from inactive to active in n8n. Make sure all nodes have working credentials before activating.

Once active, the workflow listens to WhatsApp messages and replies automatically. You can watch workflow runs in logs for errors or delays and tune settings as needed.


Summary

✓ This workflow answers WhatsApp queries fast by crawling live website data.

✓ It saves many hours by stopping repetitive manual replies.

✓ Replies are clear, accurate, and always up to date.

→ Businesses get happier customers and less work.

→ Conversations stay natural with stored chat memory.

→ The workflow can be customized for any company or website.


Frequently Asked Questions

The AI Agent uses the customer’s message and calls the list_links and get_page tools to fetch current website text. Then it processes this info with OpenAI to generate an answer.
Check the WhatsApp Business API OAuth credentials in the WhatsApp Trigger node and reconnect if invalid.
The Postgres Users Memory node saves user chat sessions keyed by WhatsApp user ID to keep context.
404 errors happen if get_page is called with invalid or off-site URLs. Use only URLs fetched by list_links from the company website.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free