AutomationFlowsAI & RAG › Line AI Customer Support Bot - Ollama No Parser

Line AI Customer Support Bot - Ollama No Parser

LINE AI Customer Support Bot - Ollama No Parser. Uses httpRequest, agent, lmChatOllama, memoryBufferWindow. Webhook trigger; 9 nodes.

Webhook trigger★★★★☆ complexityAI-powered9 nodesHTTP RequestAgentOllama ChatMemory Buffer Window
AI & RAG Trigger: Webhook Nodes: 9 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "LINE AI Customer Support Bot - Ollama No Parser",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "line-ai-customer-bot",
        "options": {}
      },
      "id": "webhook-1",
      "name": "LINE Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -900,
        1600
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "combinator": "and",
          "conditions": [
            {
              "leftValue": "={{ $json.body.events[0].type }}",
              "rightValue": "message",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            },
            {
              "leftValue": "={{ $json.body.events[0].message.type }}",
              "rightValue": "text",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ]
        },
        "options": {}
      },
      "id": "if-1",
      "name": "Is LINE Text Message",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -620,
        1600
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "user_id",
              "value": "={{ $json.body.events[0].source.userId }}",
              "type": "string"
            },
            {
              "name": "reply_token",
              "value": "={{ $json.body.events[0].replyToken }}",
              "type": "string"
            },
            {
              "name": "message",
              "value": "={{ $json.body.events[0].message.text }}",
              "type": "string"
            },
            {
              "name": "channel_access_token",
              "value": "YOUR_LINE_CHANNEL_ACCESS_TOKEN",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "set-1",
      "name": "Set Context",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -360,
        1600
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.line.me/v2/bot/chat/loading/start",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set Context').first().json.channel_access_token }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"chatId\": \"{{ $('Set Context').first().json.user_id }}\",\n  \"loadingSeconds\": 10\n}",
        "options": {
          "timeout": 1000
        }
      },
      "id": "http-1",
      "name": "LINE Loading",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -120,
        1600
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Set Context').first().json.message }}",
        "options": {
          "systemMessage": "You are a multilingual wholesale customer support assistant. Reply in the customer's language. Be concise, polite, and professional. Never invent exact pricing or stock."
        }
      },
      "id": "agent-1",
      "name": "Process Customer Message",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        120,
        1600
      ]
    },
    {
      "parameters": {
        "model": "llama3.2:latest",
        "options": {}
      },
      "id": "model-1",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "typeVersion": 1,
      "position": [
        20,
        1860
      ]
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Set Context').first().json.user_id }}_line",
        "contextWindowLength": 10
      },
      "id": "memory-1",
      "name": "Conversation Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        260,
        1860
      ]
    },
    {
      "parameters": {
        "jsCode": "const input = $input.first().json;\nlet raw = input.output ?? input.text ?? input.response ?? input.message ?? input;\nlet out;\nif (typeof raw === 'object' && raw !== null) out = raw;\nelse {\n  raw = String(raw || '').trim().replace(/^```json\\s*/i, '').replace(/^```\\s*/i, '').replace(/```$/i, '').trim();\n  const match = raw.match(/\\{[\\s\\S]*\\}/);\n  if (match) {\n    try { out = JSON.parse(match[0]); } catch { out = {}; }\n  } else out = {};\n}\nout.text = out.text || out.message || 'Sorry, our team will check and reply shortly.';\nlet text = String(out.text).trim();\nconst quickReply = { items: [\n  { type: 'action', action: { type: 'message', label: 'Check Price', text: 'Check Price' } },\n  { type: 'action', action: { type: 'message', label: 'Contact Sales', text: 'Contact Sales' } },\n  { type: 'action', action: { type: 'message', label: 'Track Order', text: 'Track Order' } }\n]};\nreturn [{ json: { line_messages: [{ type: 'text', text, quickReply }] } }];"
      },
      "id": "code-1",
      "name": "Format LINE Messages",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        580,
        1600
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.line.me/v2/bot/message/reply",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set Context').first().json.channel_access_token }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"replyToken\": \"{{ $('Set Context').first().json.reply_token }}\",\n  \"messages\": {{ JSON.stringify($json.line_messages) }}\n}",
        "options": {}
      },
      "id": "http-2",
      "name": "Send LINE Reply",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        860,
        1600
      ]
    }
  ],
  "connections": {
    "LINE Webhook": {
      "main": [
        [
          {
            "node": "Is LINE Text Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is LINE Text Message": {
      "main": [
        [
          {
            "node": "Set Context",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Set Context": {
      "main": [
        [
          {
            "node": "LINE Loading",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LINE Loading": {
      "main": [
        [
          {
            "node": "Process Customer Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Process Customer Message",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "Process Customer Message",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Process Customer Message": {
      "main": [
        [
          {
            "node": "Format LINE Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format LINE Messages": {
      "main": [
        [
          {
            "node": "Send LINE Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

LINE AI Customer Support Bot - Ollama No Parser. Uses httpRequest, agent, lmChatOllama, memoryBufferWindow. Webhook trigger; 9 nodes.

Source: https://github.com/mobizmad/n8n-workflow-templates/blob/main/chatbots/line-ai-customer-support-bot/workflow.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

W_ADMIN_AGENT - Autonomous AI Admin Assistant. Uses httpRequest, agent, lmChatOllama, memoryBufferWindow. Webhook trigger; 11 nodes.

HTTP Request, Agent, Ollama Chat +3
AI & RAG

VEP WAPP. Uses openAi, lmChatOpenAi, toolCalculator, agent. Webhook trigger; 100 nodes.

OpenAI, OpenAI Chat, Tool Calculator +7
AI & RAG

L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.

HTTP Request, Agent, Google Calendar Tool +9
AI & RAG

AI Customer Service Automation - Portfolio. Uses googleSheets, httpRequest, agent, memoryBufferWindow. Webhook trigger; 91 nodes.

Google Sheets, HTTP Request, Agent +9
AI & RAG

Agente_DamaresEstetica. Uses postgres, agent, n8n-nodes-evolution-api, lmChatGoogleGemini. Webhook trigger; 87 nodes.

Postgres, Agent, N8N Nodes Evolution Api +6