ChatGPTSalesCustomer supportAI score · 74/100AI-assisted edit · no obvious prompt-injection riskn8n.io

n8n AI Customer Support Assistant: WhatsApp Real-Time Q&A + Auto Website Crawling

Input: WhatsApp user message → Process: AI Agent crawls website in real time and generates answer → Output: WhatsApp reply (with 24h window template message fallback)

Some experienceStepsWorkflowPrompt
Who
Small businesses, developers, or agencies looking to deploy WhatsApp AI customer support for their websites
You get
Users ask questions via WhatsApp; the AI crawls the specified website for answers in real time with multi-turn conversation memory; auto-sends pre-approved template message if outside 24-hour window
You need
n8n · whatsapp · postgres

Constraints

Prerequisites: n8n instance; OpenAI API key; Meta WhatsApp Cloud API number + permanent token; Supabase/Postgres database; lemolex membership auth-token ($29/month). Estimated setup time: ~15 minutes.

What they did

Author lemolex published a template workflow on n8n demonstrating WhatsApp-triggered AI customer support: an AI Agent using gpt-4o-mini with two HTTP tools (list_links and get_page) to crawl a user-specified website in real time, combined with Postgres database for conversation memory. Within Meta WhatsApp's 24-hour service window it replies freely; outside the window it auto-sends a pre-approved template message to reopen the conversation. A cleanAnswer node uses JavaScript to strip Markdown formatting for WhatsApp plain text compatibility.

How it went

The template description claims the entire setup takes approximately 15 minutes, and can replace third-party AI support SaaS tools costing $300–$500/month, or be resold as a white-label service to clients (author_report).

Worth knowing

The core crawling tools (list_links, get_page) are hosted at lemolex.app.n8n.cloud and require a paid membership ($29/month) to obtain an auth-token; if the tools return 404, the AI replies "Non-subscribed user". If the 24-hour window check is not needed, the "24-hour window check", "If", and "Send Pre-approved Template Message to Reopen the Conversation" nodes can be deleted, connecting AI Agent directly to cleanAnswer (not recommended by source). WhatsApp template messages must be pre-approved in the Meta dashboard. This site has not actually run this workflow.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • OpenAI Chat Model node: connect OpenAI API credentials.
  • WhatsApp Trigger node: connect whatsAppTriggerApi credentials.
  • Send Pre-approved Template Message to Reopen the Conversation node: connect whatsAppApi credentials.
  • Send AI Agent's Answer node: connect whatsAppApi credentials.
  • Postgres Users Memory node: connect Postgres credentials.

Configuration to replace

  • Source template is n8n public workflow #3859 (~12 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-25

Steps

  1. Import template

    Open the template page at https://n8n.io/workflows/3859/ in n8n and click "Use workflow" to import. After import, you should see a workflow containing AI Agent, list_links, get_page, WhatsApp Trigger, Postgres Users Memory, and other nodes.

  2. Configure crawling tool parameters

    Open the list_links and get_page HTTP Request tool nodes. In Body Parameters, add: Name=auth-token, Value=your membership key (from lemolex.gumroad.com); Name=url, Value=your website root domain (e.g. https://www.example.com). Configure both nodes separately with the same auth-token and url.

    Execution prompt · Source text。list_links tool node Tool Description field

    Returns up to 100 unique, fully-qualified INTERNAL links for a given page.
    
    Input  (JSON body the model must supply)
      {
        "url": "<absolute https://…>"
      }
    
    Behaviour
      • Crawls only the domain of the input URL.
      • Converts relative <a href> values to absolute URLs.
      • Drops empty roots ("/"), mailto:, tel:, javascript:, and off-site links.
      • De-duplicates the list.
      • Responds with a JSON object:
    
          {
            "urls": [ "<link-1>", "<link-2>", … ]
          }
    
    Use this tool when you need a navigation map of the current page.
    Pass one of the returned URLs back into other tools (e.g. get_text) to read its content.

    Execution prompt · Source text。get_page tool node Tool Description field

    Fetches the fully-rendered **plain text** of a single web.  
    • Input  : { "url": "<absolute https://…>" }  
    • Auth   : token is sent as HTTP basic-auth.  
    • Query  : url=<encoded url>  
    • Output : { "text": "<visible text of the body>", "url": "<same url>" }  
    • The "text" field already has **all HTML tags removed** .  
    • Use this tool whenever you need the actual words that appear on the page—product details, prices, stock lines, shipping terms, payment options, company policies, etc.  
    • Do **not** call it on off-site links or mailto:/tel:/javascript: pseudo-links.
  3. Edit AI Agent system prompt

    Open the AI Agent node and in the System Message, replace [Company Name] with your company name and https://www.your-company-url.com with your website root domain. Verify both placeholders are replaced throughout the text. This prompt controls the AI's search strategy, answer format, and 404 handling.

    Execution prompt · Source text。AI Agent node System Message field (replace [Company Name] and URL variables)

    =You are [Company Name]’s real-time website assistant for https://www.your-company-url.com.
    
    AVAILABLE TOOLS
    • list_links(url) → { urls:[ … ] }  — returns up to 100 internal links from that page  
    • get_page(url)   → { text:"…" }    — returns the visible, tag-free text of the page (JavaScript rendered if needed)
    
    SEARCH STRATEGY
    1. Start with list_links on the root page.  
    2. Pick ≤ 5 links whose URL or anchor text best match the user’s question (producto, pago, envío, servicio, política, etc.).  
    3. For each chosen link call get_page once.  
    4. Read the returned text and look for the answer.  
    5. If the answer is still unknown, you may repeat steps 1-4 one level deeper.  
    6. Stop after two list_links rounds **or** eight get_page calls (whichever comes first).
    
    ANSWER RULES
    • Reply in clear and friendly toon **as part of [Company Name]** (use “we”, “our”).  
    • Keep answers concise but complete.  
    • **No Markdown ni símbolos de formato. Nunca uses \*, **, \_, \~, ni [texto](url).**  
      Write urls like: Descriptive Text ␣URL   Ej.: Combos https://…  
    • Quote the exact wording for facts such as stock status, prices, envíos, métodos de pago, garantías o políticas.  
    • If the information is not on the site, reply exactly:  
      “I can't find that information on our site right now. Do you want me to put you through to a human agent?”  
    • Stay on-domain; ignore mailto:, tel:, javascript:, or off-site links.
    • Finally, if any of the tools returns a status code 404, then reply:
    "Non-subscribed user."
  4. Connect credentials

    Configure credentials in sequence: OpenAI Chat Model node → OpenAI API key; Postgres Users Memory node → Supabase/Postgres connection details; WhatsApp Trigger, Send Pre-approved Template Message, and Send AI Agent's Answer nodes → Meta WhatsApp Cloud API credentials. In the Send Pre-approved Template Message node, select a pre-approved template message.

  5. Configure Meta Webhook

    In the Meta Developer Dashboard under WhatsApp product settings, set the Webhook URL to the URL shown in your n8n WhatsApp Trigger node (typically https://your-n8n-instance/webhook/...). Verify and subscribe to the messages event.

  6. Test execution

    Click "Execute Trigger" in n8n, then send "Hi" from the linked WhatsApp number. Observe whether the AI Agent crawls the website and returns an answer. If no interaction occurs within 24 hours, the next user message will trigger the pre-approved template message to reopen the conversation.

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant for prerequisite and permission check

This block is the prompt. Ads are never placed here.

You are setting up a WhatsApp AI customer support workflow in n8n. Confirm you have ready: n8n instance, OpenAI API key, Meta WhatsApp Cloud API credentials, Supabase/Postgres database, and lemolex membership auth-token. First check that list_links and get_page tool nodes have URL and auth-token filled in, then edit the company name and domain in the AI Agent System Message, finally connect all credentials and configure the Meta Webhook.

This prompt is for pre-setup verification, not a node execution instruction. Actual node prompts are in each step's prompts array.

Source

Ai customer support assistant · WhatsApp ready · works for any business · lemolex · n8n.io · 2025-05-04

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related