WhatsApp FAQ assistant

Answer common customer questions on WhatsApp 24/7 using your own FAQ.

Advanced Saves ~15 hours/month Customer SupportBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: WhatsApp — new incoming message
  1. Receive the customer's message through the WhatsApp Business Cloud API.
  2. Give an AI agent your FAQ text and the customer's question.
  3. Reply with the answer, or hand over to a human if it's not covered.

Diagram

WIncoming messageWhatsApp Trigger{ }Get questionCodeAnswer from FAQBasic LLM ChainClaude modelAnthropic Chat Mo…WReply on WhatsAppWhatsApp Business Cloud
Trigger App Code AI

Code

JavaScript used in the Code step — already included in the template below.

Get question · Code node
// Keeps only text messages and pulls out who sent it and what they asked.
const msg = $input.first().json.messages?.[0];
if (!msg || msg.type !== "text") return [];

return [{ json: { from: msg.from, question: msg.text.body } }];

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.

Workflow JSON
Show code (151 lines)
{
  "name": "WhatsApp FAQ assistant (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## WhatsApp FAQ assistant\nAnswer common customer questions on WhatsApp 24/7 using your own FAQ.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "updates": [
          "messages"
        ]
      },
      "id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
      "name": "Incoming message",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "webhookId": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1"
    },
    {
      "parameters": {
        "jsCode": "// Keeps only text messages and pulls out who sent it and what they asked.\nconst msg = $input.first().json.messages?.[0];\nif (!msg || msg.type !== \"text\") return [];\n\nreturn [{ json: { from: msg.from, question: msg.text.body } }];"
      },
      "id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
      "name": "Get question",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are the WhatsApp assistant for YOUR_BUSINESS. Answer ONLY using the FAQ below, in the customer's language, in 1–3 short sentences. If the answer is not in the FAQ, reply exactly: \"Good question! Let me connect you with a team member.\"\n\nFAQ:\nYOUR_FAQ_TEXT\n\nCustomer: {{ $json.question }}"
      },
      "id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
      "name": "Answer from FAQ",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        600,
        220
      ]
    },
    {
      "parameters": {
        "operation": "send",
        "phoneNumberId": "YOUR_PHONE_NUMBER_ID",
        "recipientPhoneNumber": "={{ $('Get question').item.json.from }}",
        "textBody": "={{ $json.text }}"
      },
      "id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
      "name": "Reply on WhatsApp",
      "type": "n8n-nodes-base.whatsApp",
      "typeVersion": 1,
      "position": [
        900,
        0
      ]
    }
  ],
  "connections": {
    "Incoming message": {
      "main": [
        [
          {
            "node": "Get question",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get question": {
      "main": [
        [
          {
            "node": "Answer from FAQ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Answer from FAQ": {
      "main": [
        [
          {
            "node": "Reply on WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Answer from FAQ",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • Only use the official WhatsApp API — unofficial tools get numbers banned.
  • Tell customers they're chatting with an assistant.

Related flows