Customer support AI agent

A chat agent that answers from your FAQ, looks up orders, and hands tricky cases to a human.

AI agentAdvanced Saves ~25 hours/month AI AgentsBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Chat — a visitor sends a message on your website
  1. A visitor asks a question in the chat on your website.
  2. The agent decides what it needs: your FAQ, an order lookup, or a human.
  3. It answers using only what its tools return, and remembers the conversation.
  4. If the customer is upset or needs an exception, it emails your team with a summary.

What it can do

Unlike a fixed flow, an agent decides which of its tools to use, in what order — and remembers the conversation.

  • Answers questions from your FAQ sheet — and only from it
  • Looks up an order's status, items and tracking by order number
  • Escalates to your team by email with the customer's details and a summary
  • Remembers the last messages, so customers don't repeat themselves
  • Replies in the customer's language

System prompt

The instructions that shape the agent. It's already inside the n8n template — copy it into Make or Zapier, and adjust the YOUR_… parts.

System prompt
You are the customer support assistant for YOUR_BUSINESS.

Your job: answer customers' questions accurately and help them with their orders.

Tools:
- "Search FAQ": our questions-and-answers sheet. Use it for anything about products, shipping, returns, payments or policies. Answer only from what it returns.
- "Look up order": finds an order by its order number. Ask for the number if the customer hasn't given it.
- "Escalate to human": emails the support team. Use it when the customer is upset, asks for a refund or an exception, or you can't find the answer.

Rules:
- Never invent policies, prices or delivery dates. If the tools don't have the answer, say so and offer to escalate.
- Never ask for card numbers, passwords or other sensitive data.
- Before escalating, collect the customer's name and email, and tell them a person will reply.
- Keep replies short (2–4 sentences), friendly, and in the customer's language.

Safety rules

Built into the prompt and the tools:

  • Never invents policies, prices or delivery dates
  • Never asks for card numbers or passwords
  • Refunds and exceptions always go to a human

Uses your own AI key (Claude, OpenAI or another model). Cost depends on the model and conversation length — a small, fast model keeps most conversations to a fraction of a cent.

Diagram

Website chatChat TriggerSupport agentAI AgentClaude modelAnthropic Chat Mo…◷MemorySimple MemoryGSearch FAQGoogle Sheets ToolGLook up orderGoogle Sheets ToolGEscalate to hu…Gmail Tool
Trigger AI Agent tool

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 (242 lines)
{
  "name": "Customer support AI agent (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## Customer support AI agent\nA chat agent that answers from your FAQ, looks up orders, and hands tricky cases to a human.\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": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "public": true,
        "mode": "hostedChat",
        "initialMessages": "Hi! 👋 How can I help you today?",
        "options": {
          "responseMode": "lastNode"
        }
      },
      "id": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Website chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "webhookId": "2c527cac-899b-4e84-aed5-20e53f8aab89"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=You are the customer support assistant for YOUR_BUSINESS.\n\nYour job: answer customers' questions accurately and help them with their orders.\n\nTools:\n- \"Search FAQ\": our questions-and-answers sheet. Use it for anything about products, shipping, returns, payments or policies. Answer only from what it returns.\n- \"Look up order\": finds an order by its order number. Ask for the number if the customer hasn't given it.\n- \"Escalate to human\": emails the support team. Use it when the customer is upset, asks for a refund or an exception, or you can't find the answer.\n\nRules:\n- Never invent policies, prices or delivery dates. If the tools don't have the answer, say so and offer to escalate.\n- Never ask for card numbers, passwords or other sensitive data.\n- Before escalating, collect the customer's name and email, and tell them a person will reply.\n- Keep replies short (2–4 sentences), friendly, and in the customer's language."
        }
      },
      "id": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Support agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        -40,
        220
      ]
    },
    {
      "parameters": {
        "contextWindowLength": 10
      },
      "id": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        130,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Returns all rows of our FAQ sheet (columns: question, answer). Use it to answer questions about products, shipping, returns, payments and policies.",
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "FAQ",
          "mode": "name"
        },
        "options": {}
      },
      "id": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Search FAQ",
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        300,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Finds a customer's order by order number. Returns status, items, total and tracking.",
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Orders",
          "mode": "name"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "order_id",
              "lookupValue": "={{ $fromAI('order_id', \"The customer's order number\", 'string') }}"
            }
          ]
        },
        "options": {}
      },
      "id": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Look up order",
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        470,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Emails the support team so a person takes over. Include the customer's name, email and a short summary.",
        "sendTo": "support@yourcompany.com",
        "subject": "={{ $fromAI('subject', \"Short subject line for the support team\", 'string') }}",
        "emailType": "text",
        "message": "={{ $fromAI('summary', \"Summary of the issue, including the customer's name and email\", 'string') }}",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "2c527cac-899b-4e84-aed5-20e53f8aab89",
      "name": "Escalate to human",
      "type": "n8n-nodes-base.gmailTool",
      "typeVersion": 2.1,
      "position": [
        640,
        220
      ]
    }
  ],
  "connections": {
    "Website chat": {
      "main": [
        [
          {
            "node": "Support agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Support agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "Support agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Search FAQ": {
      "ai_tool": [
        [
          {
            "node": "Support agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Look up order": {
      "ai_tool": [
        [
          {
            "node": "Support agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Escalate to human": {
      "ai_tool": [
        [
          {
            "node": "Support agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • Start with your 20 most common questions in the FAQ sheet; add more as real questions come in.
  • n8n's Chat Trigger gives you a hosted chat page and an embeddable widget for your site.

Related flows