AutomationFlowsAI & RAG › Linebot-sys2//success

Linebot-sys2//success

LineBot-SYS2//Success. Uses agent, memoryBufferWindow, @aotoki/n8n-nodes-line-messaging, lmChatGoogleGemini. Event-driven trigger; 39 nodes.

Event trigger★★★★★ complexityAI-powered39 nodesAgentMemory Buffer Window@Aotoki/N8N Nodes Line MessagingGoogle Gemini ChatGoogle Sheets ToolGoogle Sheets
AI & RAG Trigger: Event Nodes: 39 Complexity: ★★★★★ AI nodes: yes Added:
Linebot-sys2//success — n8n workflow card showing Agent, Memory Buffer Window, @Aotoki/N8N Nodes Line Messaging integration

This workflow follows the Agent → Google Sheets 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": "LineBot-SYS2//Success",
  "nodes": [
    {
      "parameters": {
        "promptType": "define",
        "text": "=={{ $json.text }}",
        "options": {
          "systemMessage": "You are a deterministic Ticket Parsing Engine.\n\nYou extract structured ticket data from raw user messages.\n\nYou MUST follow every rule strictly.\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\nABSOLUTE OUTPUT RULES\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n1. Output ONLY valid JSON.\n2. Do NOT wrap in markdown.\n3. Do NOT explain anything.\n4. Do NOT add extra text.\n5. Do NOT add extra keys.\n6. Do NOT rename keys.\n7. Do NOT nest objects.\n8. Do NOT calculate or infer values.\n9. Do NOT translate.\n10. Do NOT modify formats.\n11. If value is missing \u2192 return null.\n12. If value is \"-\" \u2192 return null.\n13. JSON must be flat.\n14. No trailing commas.\n\nIf no fields are found, still return full JSON with all keys set to null.\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\nREQUIRED OUTPUT FORMAT\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n{\n\"ticket_no\": string | null,\n\"severity\": \"NSA1\" | \"NSA2\" | \"NSA3\" | \"NSA4\" | null,\n\"fault_date\": string | null,\n\"expected_date\": string | null,\n\"owner\": string | null,\n\"go_time\": string | null,\n\"start_time\": string | null,\n\"done_time\": string | null,\n\"status\": string | null\n}\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\nEXTRACTION RULES\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nticket_no:\n- Extract ONLY if it matches regex: TT\\d+\n- Return full match only.\n- Ignore \"Ticket: -\" or empty values.\n- If not found \u2192 null.\n\nseverity:\n- Must match exactly: NSA1 | NSA2 | NSA3 | NSA4\n- Case sensitive.\n- If not found \u2192 null.\n\nfault_date:\n- Extract full datetime string after:\n  \"FaultDate :\" OR\n  \"Fault :\" OR\n  \"FaultDate:\" OR\n  \"Fault:\"\n- Return exact string after colon.\n- If value is \"-\" \u2192 null.\n- If not found \u2192 null.\n\nexpected_date:\n- Extract full datetime string after:\n  \"Expected :\" OR\n  \"ExpectedDate :\" OR\n  \"Expected:\" OR\n  \"ExpectedDate:\"\n- Return exact string after colon.\n- If value is \"-\" \u2192 null.\n- If not found \u2192 null.\n\nowner:\n- Extract exact value after:\n  \"OpenTicketName :\" OR\n  \"OwnerTeam :\" OR\n  \"Owner :\" OR\n  \"\u0e1c\u0e39\u0e49\u0e41\u0e08\u0e49\u0e07\u0e07\u0e32\u0e19 :\"\n- Return exact string after colon.\n- If value is \"-\" \u2192 null.\n- If not found \u2192 null.\n\ngo_time:\n- Extract using regex: !Go#(\\d{2}:\\d{2})\n- Return only HH:mm\n- If not found \u2192 null.\n\nstart_time:\n- Extract using regex: !Star#(\\d{2}:\\d{2})\n- Return only HH:mm\n- If not found \u2192 null.\n\ndone_time:\n- Extract using regex: !Done#(\\d{2}:\\d{2})\n- Return only HH:mm\n- If not found \u2192 null.\n\nstatus:\n- Extract exact value after:\n  \"Status :\" OR\n  \"\u0e2a\u0e16\u0e32\u0e19\u0e30 :\"\n- Return exact string after colon.\n- If value is \"-\" \u2192 null.\n- If not found \u2192 null.\n\nticket_no:\nMatch regex /TT\\d+/i\n\nseverity:\nMatch /NSA[1-4]/i\nReturn uppercase (NSA1\u2013NSA4)\n\nfault_date:\nMatch /FaultDate\\s*:\\s*(.+)/i\n\nowner:\nMatch /OpenTicketName\\s*:\\s*(.+)/i OR /OwnerTeam\\s*:\\s*(.+)/i\n\nstatus:\nMatch /Status\\s*:\\s*(.+)/i\n\ngo_time:\nMatch /!Go#(\\d{2}:\\d{2})/i\n\nstart_time:\nMatch /!Star#(\\d{2}:\\d{2})/i\n\ndone_time:\nMatch /!Done#(\\d{2}:\\d{2})/i\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\nFINAL INSTRUCTION\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nReturn JSON only.\nAlways include all keys.\nNever omit keys.\nNever hallucinate values.",
          "returnIntermediateSteps": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        432,
        -128
      ],
      "id": "d38d7771-8b0a-4272-8b7d-6d0dd688b51c",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Line Messaging Trigger').item.json.source.userId }}",
        "contextWindowLength": 10
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        528,
        96
      ],
      "id": "731b5816-5d01-4daf-9de1-c05428ae2102",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "events": [
          "message"
        ]
      },
      "type": "@aotoki/n8n-nodes-line-messaging.lineMessagingTrigger",
      "typeVersion": 1,
      "position": [
        -208,
        -128
      ],
      "id": "ce766736-4fa2-4477-9a76-e8647acb58f8",
      "name": "Line Messaging Trigger",
      "credentials": {
        "lineMessagingApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "modelName": "=models/gemini-2.5-flash",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        432,
        64
      ],
      "id": "685a5a20-e53d-4d52-9790-574df94b7597",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "return items.map(item => {\n  let data = item.json;\n\n  // \u0e16\u0e49\u0e32 AI \u0e2a\u0e48\u0e07\u0e21\u0e32\u0e40\u0e1b\u0e47\u0e19 string \u0e43\u0e2b\u0e49 parse\n  if (typeof data === \"string\") {\n    data = JSON.parse(data);\n  }\n\n  // \u0e16\u0e49\u0e32\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19 key \u0e0a\u0e37\u0e48\u0e2d output\n  if (typeof data.output === \"string\") {\n    data = JSON.parse(data.output);\n  }\n\n  return {\n    json: data\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        128,
        -208
      ],
      "id": "0328b06f-ad2f-4714-8789-ea56a8d27edf",
      "name": "Code in JavaScript1"
    },
    {
      "parameters": {
        "content": "1\ufe0f\u20e3 Line Messaging Trigger\n\u0e23\u0e31\u0e1a\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e08\u0e32\u0e01 LINE OA\ntext\nreplyToken\nuserId",
        "height": 176,
        "width": 214
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -528
      ],
      "typeVersion": 1,
      "id": "8d022a22-0082-4e63-a751-c71f5583b86c",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "3\ufe0f\u20e3 AI Agent\n\u0e41\u0e1b\u0e25\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e18\u0e23\u0e23\u0e21\u0e14\u0e32 \u2192 JSON \u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19\nField \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e44\u0e14\u0e49:\nticket_no\n\nseverity\nfault_date\nexpected_date\nowner\ngo_time\nstart_time\ndone_time\nstatus",
        "height": 272,
        "width": 336
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -528
      ],
      "typeVersion": 1,
      "id": "51ff1190-48b0-4967-8161-ade6ba617866",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "5\ufe0f\u20e3 \u0e04\u0e33\u0e19\u0e27\u0e13 SLA\nSeverity   |    SLA\nNSA1\t |  4 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\nNSA2\t |  8 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\nNSA3\t | 14 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\nNSA4\t | 24 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\n\nExpected Date = fault_date + SLA\nTimeZone: Asia/Bangkok",
        "height": 240,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -528
      ],
      "typeVersion": 1,
      "id": "9d4c7516-c7a5-4af4-981a-a5fe9a5b6b3f",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "7\ufe0f\u20e3 \u0e2a\u0e23\u0e49\u0e32\u0e07 Status \u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\n\u0e21\u0e35 done_time \u2192 Done\n\u0e21\u0e35 start_time \u2192 In Progress\n\u0e21\u0e35 go_time \u2192 On Site\n\u0e44\u0e21\u0e48\u0e21\u0e35\u0e40\u0e25\u0e22 \u2192 Open",
        "height": 240,
        "width": 208
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -528
      ],
      "typeVersion": 1,
      "id": "a6c01ad9-f087-4f64-8bc3-4c36dcfc868b",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "8\ufe0f\u20e3 \u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e01\u0e25\u0e31\u0e1a LINE\n\n\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c:\n\ud83d\udccc Ticket: TT12345\n\u26a1 Severity: \ud83d\udea8 NSA1\n\ud83d\udcc5 Fault: 28/12/2025 23:45\n\ud83d\udcc6 Expected: 29/12/2025 03:45\n\ud83d\ude97 Go: -\n\ud83d\udd27 Start: -\n\u2705 Done: -\n\ud83d\udccd Status: Open",
        "height": 240,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -528
      ],
      "typeVersion": 1,
      "id": "9119ef54-9878-407d-953f-13b04d3fea85",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "IF Node\n\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48:\n\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e27\u0e48\u0e32\u0e21\u0e35\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e04\u0e23\u0e1a\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\n\u0e40\u0e0a\u0e48\u0e19:\nticket_no \u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e07\nstatus \u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e07\n\u0e16\u0e49\u0e32\u0e1c\u0e48\u0e32\u0e19 \u2192 \u0e2a\u0e48\u0e07 LINE\n\u0e16\u0e49\u0e32\u0e44\u0e21\u0e48\u0e1c\u0e48\u0e32\u0e19 \u2192 \u0e2d\u0e32\u0e08\u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21 error",
        "height": 176
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        -528
      ],
      "typeVersion": 1,
      "id": "4cebc26e-b40e-4205-8682-109ec3b8fe61",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "Line Messaging (Send)\n\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48:\n\u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e22\u0e31\u0e07 user \u0e1c\u0e48\u0e32\u0e19 LINE\n\u0e43\u0e0a\u0e49:\nuserId \u0e08\u0e32\u0e01 Trigger\nmessage text \u0e08\u0e32\u0e01 Code node \u0e01\u0e48\u0e2d\u0e19\u0e2b\u0e19\u0e49\u0e32",
        "height": 144,
        "width": 352
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        -496
      ],
      "typeVersion": 1,
      "id": "8173b995-c166-4ba1-9b1f-424f43a40f37",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "content": "\u0e20\u0e32\u0e1e\u0e23\u0e27\u0e21\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ud83d\udccc LINE Ticket Automation Workflow\n1\ufe0f\u20e3 Line Messaging Trigger\n\u0e23\u0e31\u0e1a\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e08\u0e32\u0e01 LINE OA\ntext\nuserId\nreplyToken\n\u2b07\n\n2\ufe0f\u20e3 Detect Mode (Code)\n\u0e27\u0e34\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e42\u0e2b\u0e21\u0e14\u0e2d\u0e30\u0e44\u0e23\nMode \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19\u0e44\u0e1b\u0e44\u0e14\u0e49:\nupdate_ticket\nquery_ticket\ntoday_summary\nquery_site\nunknown\n\n\u2b07\n\n3\ufe0f\u20e3 IF \u2013 \u0e41\u0e22\u0e01\u0e40\u0e2a\u0e49\u0e19\u0e17\u0e32\u0e07\n\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a mode\n\u0e16\u0e49\u0e32\u0e40\u0e1b\u0e47\u0e19 query \u2192 \u0e44\u0e1b AI Agent\n\u0e16\u0e49\u0e32\u0e40\u0e1b\u0e47\u0e19 update_ticket \u2192 \u0e44\u0e1b\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e2a\u0e23\u0e49\u0e32\u0e07/\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01 Ticket\n\u2b07\n\n4\ufe0f\u20e3 AI Agent\n\u0e27\u0e34\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\n\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19 JSON \u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19\nField \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e44\u0e14\u0e49:\nticket_no\nseverity\nfault_date\nexpected_date\nowner\ngo_time\nstart_time\ndone_time\nstatus\n\u2b07\n\n5\ufe0f\u20e3 Parse JSON\n\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e27\u0e48\u0e32 JSON \u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07\nParse \u0e44\u0e14\u0e49\nKey \u0e04\u0e23\u0e1a\n\u0e16\u0e49\u0e32\u0e44\u0e21\u0e48\u0e04\u0e23\u0e1a \u2192 Error\n\u2b07\n\n6\ufe0f\u20e3 \u0e04\u0e33\u0e19\u0e27\u0e13 SLA (Edit Fields)\nSeverity \u2192 SLA \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\nNSA1 = 4 \u0e0a\u0e21\nNSA2 = 8 \u0e0a\u0e21\nNSA3 = 14 \u0e0a\u0e21\nNSA4 = 24 \u0e0a\u0e21\nExpected Date = fault_date + SLA\nTimeZone: Asia/Bangkok\n\n\u2b07\n\n7\ufe0f\u20e3 Append Google Sheet\n\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 Ticket \u0e25\u0e07 Google Sheet\n\u2b07\n\n8\ufe0f\u20e3 Normalize Ticket Data\n\u0e17\u0e33\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e30\u0e2d\u0e32\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\n\u0e2a\u0e23\u0e49\u0e32\u0e07 Status \u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\nStatus Logic:\n\u0e21\u0e35 done_time \u2192 Done\n\u0e21\u0e35 start_time \u2192 In Progress\n\u0e21\u0e35 go_time \u2192 On Site\n\u0e44\u0e21\u0e48\u0e21\u0e35\u0e40\u0e25\u0e22 \u2192 Open\n\n\u2b07\n\n9\ufe0f\u20e3 IF \u0e15\u0e23\u0e27\u0e08\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e01\u0e48\u0e2d\u0e19\u0e2a\u0e48\u0e07\n\u0e40\u0e0a\u0e47\u0e04\u0e27\u0e48\u0e32 ticket_no \u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e07\n\u0e16\u0e49\u0e32\u0e1c\u0e48\u0e32\u0e19 \u2192 \u0e2a\u0e48\u0e07 LINE\n\u0e16\u0e49\u0e32\u0e44\u0e21\u0e48\u0e1c\u0e48\u0e32\u0e19 \u2192 \u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21 error\n\n\u2b07\n\n\ud83d\udd1f Line Messaging (Send)\n\u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e23\u0e38\u0e1b\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e22\u0e31\u0e07\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u2705 Result\nUser \u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21 \u2192 \u0e23\u0e30\u0e1a\u0e1a\u0e2a\u0e23\u0e49\u0e32\u0e07 Ticket \u2192 \u0e04\u0e33\u0e19\u0e27\u0e13 SLA \u2192 \u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01 \u2192 \u0e2a\u0e48\u0e07\u0e2a\u0e23\u0e38\u0e1b\u0e01\u0e25\u0e31\u0e1a\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
        "height": 1696,
        "width": 832
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -2224
      ],
      "typeVersion": 1,
      "id": "0fad679d-9525-44f8-bfc8-48bbddd4161c",
      "name": "Sticky Note8"
    },
    {
      "parameters": {
        "content": "Line Messaging \u0e43\u0e0a\u0e49 Webhook Production \n\u0e44\u0e14\u0e49\u0e40\u0e40\u0e25\u0e49\u0e27 (\u0e1a\u0e2d\u0e17\u0e17\u0e33\u0e07\u0e32\u0e19 24hrs)",
        "height": 80,
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        48
      ],
      "typeVersion": 1,
      "id": "61ca3f64-3fe9-40cb-86ed-0437349aa843",
      "name": "Sticky Note9"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1sjN3thWlP_a1qGjft7MuLglHbT4P9RSx0QGgqKHiT5Y",
          "mode": "list",
          "cachedResultName": "Real\u0e2a\u0e33\u0e40\u0e19\u0e32\u0e02\u0e2d\u0e07 LAB \u0e07\u0e32\u0e19\u0e25\u0e07\u0e23\u0e30\u0e1a\u0e1a NodeB2025",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1sjN3thWlP_a1qGjft7MuLglHbT4P9RSx0QGgqKHiT5Y/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1430076532,
          "mode": "list",
          "cachedResultName": "LABJob_System December 2025",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1sjN3thWlP_a1qGjft7MuLglHbT4P9RSx0QGgqKHiT5Y/edit#gid=1430076532"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Region": "=",
            "TT No. / PW No.": "=",
            "Source": "=",
            "TT : \u0e17\u0e35\u0e48\u0e40\u0e04\u0e25\u0e35\u0e22\u0e23\u0e4c\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e0b\u0e48\u0e2d\u0e21": "=",
            " Destination": "=",
            "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 Ticket \u0e40\u0e1b\u0e34\u0e14": "=",
            "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e34\u0e14 Ticket": "=",
            "\u0e17\u0e35\u0e21": "=",
            "\u0e02\u0e19\u0e32\u0e14\u0e17\u0e35\u0e21\n(\u0e08.\u0e19.\u0e04\u0e19)": "=",
            "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07": "=",
            "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07": "=",
            "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21": "=",
            "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21": "=",
            "\u0e2a\u0e16\u0e32\u0e19\u0e30": "=",
            "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e02\u0e2d\u0e07\u0e2a\u0e16\u0e32\u0e19\u0e30": "=",
            "\u0e40\u0e27\u0e25\u0e32\u0e02\u0e2d\u0e07\u0e2a\u0e16\u0e32\u0e19\u0e30": "=",
            "SLA (OK/NOK)": "=",
            "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38": "=",
            "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48": "=",
            "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2b\u0e22\u0e38\u0e14, \u0e40\u0e25\u0e34\u0e01\u0e0b\u0e48\u0e2d\u0e21": "=",
            "\u0e40\u0e27\u0e25\u0e32": "=",
            "\u0e27\u0e34\u0e18\u0e35\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e2b\u0e15\u0e38\u0e40\u0e2a\u0e35\u0e22": "=",
            "\u0e02\u0e2d\u0e07\u0e14\u0e35/\u0e40\u0e25\u0e02SAP": "=",
            "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38 Over SLA": "=",
            "\u0e02\u0e2d\u0e07\u0e40\u0e2a\u0e35\u0e22/\u0e40\u0e25\u0e02SAP": "=",
            "CM report": "=",
            "Admin Name": "=",
            "Admin Verify Date": "="
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Region",
              "displayName": "Region",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TT No. / PW No.",
              "displayName": "TT No. / PW No.",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Serverity",
              "displayName": "Serverity",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21.)",
              "displayName": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21.)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SLA/T",
              "displayName": "SLA/T",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TT : \u0e17\u0e35\u0e48\u0e40\u0e04\u0e25\u0e35\u0e22\u0e23\u0e4c\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "TT : \u0e17\u0e35\u0e48\u0e40\u0e04\u0e25\u0e35\u0e22\u0e23\u0e4c\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Source",
              "displayName": "Source",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": " Destination",
              "displayName": " Destination",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "displayName": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e34\u0e14 Ticket",
              "displayName": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e34\u0e14 Ticket",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u0e0a\u0e37\u0e48\u0e2d",
              "displayName": "\u0e0a\u0e37\u0e48\u0e2d",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u0e17\u0e35\u0e21",
              "displayName": "\u0e17\u0e35\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e02\u0e19\u0e32\u0e14\u0e17\u0e35\u0e21\n(\u0e08.\u0e19.\u0e04\u0e19)",
              "displayName": "\u0e02\u0e19\u0e32\u0e14\u0e17\u0e35\u0e21\n(\u0e08.\u0e19.\u0e04\u0e19)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "displayName": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "displayName": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 \u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 \u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "displayName": "\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e02\u0e2d\u0e07\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "displayName": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e02\u0e2d\u0e07\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32\u0e02\u0e2d\u0e07\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "displayName": "\u0e40\u0e27\u0e25\u0e32\u0e02\u0e2d\u0e07\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e0b\u0e48\u0e2d\u0e21\u0e40\u0e2a\u0e23\u0e47\u0e08",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e0b\u0e48\u0e2d\u0e21\u0e40\u0e2a\u0e23\u0e47\u0e08",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Total Recovery Time (hh:mm)",
              "displayName": "Total Recovery Time (hh:mm)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SLA (OK/NOK)",
              "displayName": "SLA (OK/NOK)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38",
              "displayName": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
              "displayName": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2b\u0e22\u0e38\u0e14, \u0e40\u0e25\u0e34\u0e01\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2b\u0e22\u0e38\u0e14, \u0e40\u0e25\u0e34\u0e01\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32",
              "displayName": "\u0e40\u0e27\u0e25\u0e32",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e34\u0e18\u0e35\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e2b\u0e15\u0e38\u0e40\u0e2a\u0e35\u0e22",
              "displayName": "\u0e27\u0e34\u0e18\u0e35\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e2b\u0e15\u0e38\u0e40\u0e2a\u0e35\u0e22",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38 Over SLA",
              "displayName": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38 Over SLA",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e02\u0e2d\u0e07\u0e14\u0e35/\u0e40\u0e25\u0e02SAP",
              "displayName": "\u0e02\u0e2d\u0e07\u0e14\u0e35/\u0e40\u0e25\u0e02SAP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e02\u0e2d\u0e07\u0e40\u0e2a\u0e35\u0e22/\u0e40\u0e25\u0e02SAP",
              "displayName": "\u0e02\u0e2d\u0e07\u0e40\u0e2a\u0e35\u0e22/\u0e40\u0e25\u0e02SAP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TT No. / PW No.ServeritySource",
              "displayName": "TT No. / PW No.ServeritySource",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CM report",
              "displayName": "CM report",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Admin Name",
              "displayName": "Admin Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Admin Verify Date",
              "displayName": "Admin Verify Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        928,
        304
      ],
      "id": "d1bd8e42-505e-4e61-a3b5-5586d08ec3c3",
      "name": "Tools Sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const text = ($json.message?.text || '').toLowerCase().trim();\n\nlet mode = \"unknown\";\n\n// \u0e15\u0e23\u0e27\u0e08 TT number\nif (/tt\\d+/i.test(text)) {\n  if (text.includes(\"\u0e40\u0e0a\u0e47\u0e04\") || text.includes(\"check\")) {\n    mode = \"query_ticket\";\n  } else {\n    mode = \"update_ticket\";\n  }\n}\n\n// \u0e2a\u0e23\u0e38\u0e1b\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\nelse if (text.includes(\"\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\")) {\n  mode = \"today_summary\";\n}\n\n// query site\nelse if (text.includes(\"site\")) {\n  mode = \"query_site\";\n}\n\n// \u0e04\u0e37\u0e19\u0e04\u0e48\u0e32\u0e41\u0e1a\u0e1a merge \u0e01\u0e31\u0e1a input \u0e40\u0e14\u0e34\u0e21 (\u0e2a\u0e33\u0e04\u0e31\u0e0d\u0e21\u0e32\u0e01\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a production)\nreturn {\n  ...$json,\n  text,\n  mode,\n  replyToken: $json.replyToken,\n  userId: $json.source?.userId\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -32,
        -128
      ],
      "id": "42a76e62-0f1f-40b4-8572-8091bdb039a0",
      "name": "Detect Mode"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "f72d226e-bd76-4673-9541-7541e5d9de3c",
              "leftValue": "={{$json.mode}}",
              "rightValue": "=query_ticket",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            },
            {
              "id": "6ed8fff0-82fc-4aa2-94a8-f2d10fd80543",
              "leftValue": "={{$json.mode}}",
              "rightValue": "=today_summary",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "bce04745-a77c-46b2-821f-90ea49f098d4",
              "leftValue": "={{$json.mode}}",
              "rightValue": "query_site",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        128,
        48
      ],
      "id": "da10125e-7268-414e-ba51-c96cb51c6f70",
      "name": "IF - Query Mode"
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      ...$json,\n      userId: $items(\"Detect Mode\")[0].json.userId,\n      finalMessage:\n        $json.output ||\n        $json.response ||\n        $json.result ||\n        $json\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        736,
        -128
      ],
      "id": "a169b4a5-c8fb-48fd-afbc-a21deb7cf5db",
      "name": "Merge User"
    },
    {
      "parameters": {
        "jsCode": "function safeParse(raw) {\n  if (!raw) return null;\n\n  // \u0e16\u0e49\u0e32\u0e40\u0e1b\u0e47\u0e19 object \u0e2d\u0e22\u0e39\u0e48\u0e41\u0e25\u0e49\u0e27\n  if (typeof raw === \"object\") return raw;\n\n  if (typeof raw !== \"string\") return null;\n\n  try {\n    const cleaned = raw\n      .replace(/^```json\\s*/i, '')\n      .replace(/```$/i, '')\n      .trim();\n\n    return JSON.parse(cleaned);\n  } catch (e) {\n    return null;\n  }\n}\n\nconst parsed = safeParse($json.finalMessage);\n\nconst requiredKeys = [\n  \"ticket_no\",\n  \"severity\",\n  \"fault_date\",\n  \"expected_date\",\n  \"owner\",\n  \"go_time\",\n  \"start_time\",\n  \"done_time\",\n  \"status\"\n];\n\nif (!parsed) {\n  return [{\n    json: {\n      error: true,\n      message: \"\u274c AI \u0e2a\u0e48\u0e07 JSON \u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07\"\n    }\n  }];\n}\n\n// \u0e15\u0e23\u0e27\u0e08 key \u0e04\u0e23\u0e1a\u0e44\u0e2b\u0e21\nfor (const key of requiredKeys) {\n  if (!(key in parsed)) {\n    return [{\n      json: {\n        error: true,\n        message: \"\u274c JSON structure \u0e44\u0e21\u0e48\u0e04\u0e23\u0e1a\"\n      }\n    }];\n  }\n}\n\nreturn [{\n  json: parsed\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        912,
        -128
      ],
      "id": "02af16c9-4598-4776-b246-bb0e2fa6c82f",
      "name": "Parse Final JSON"
    },
    {
      "parameters": {
        "content": "",
        "height": 288,
        "width": 608,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        704,
        240
      ],
      "id": "0b47736b-3d6d-4f72-af6e-c3fb89916263",
      "name": "Sticky Note10"
    },
    {
      "parameters": {
        "content": "       \u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e40\u0e02\u0e49\u0e32 node (\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e43\u0e0a\u0e49)",
        "height": 80,
        "width": 326,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        992,
        448
      ],
      "id": "80b25c79-9092-4770-9395-a415c5ee4ad4",
      "name": "Sticky Note11"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1SpkGa57uRLhoSbc0edGla0QX0gD586tjmrUFJ_xIFgU",
          "mode": "list",
          "cachedResultName": "testdataLAB",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SpkGa57uRLhoSbc0edGla0QX0gD586tjmrUFJ_xIFgU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2097907540,
          "mode": "list",
          "cachedResultName": "LABJob_System December 2025",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SpkGa57uRLhoSbc0edGla0QX0gD586tjmrUFJ_xIFgU/edit#gid=2097907540"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": [
            {
              "id": "Job Service",
              "displayName": "Job Service",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17\u0e23\u0e31\u0e1a\u0e40\u0e2b\u0e21\u0e32",
              "displayName": "\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17\u0e23\u0e31\u0e1a\u0e40\u0e2b\u0e21\u0e32",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07 (Go)",
              "displayName": "\u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07 (Go)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21 (Start)",
              "displayName": "\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21 (Start)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e01\u0e32\u0e23\u0e0b\u0e48\u0e2d\u0e21 (Recovery)",
              "displayName": "\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e01\u0e32\u0e23\u0e0b\u0e48\u0e2d\u0e21 (Recovery)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Serial Number",
              "displayName": "Serial Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "locationDefine": {
            "values": {}
          }
        }
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        768,
        320
      ],
      "id": "e3289f0d-918a-486a-9dbb-2b2d7a19481b",
      "name": "Get row(s) in Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1SpkGa57uRLhoSbc0edGla0QX0gD586tjmrUFJ_xIFgU",
          "mode": "list",
          "cachedResultName": "testdataLAB",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SpkGa57uRLhoSbc0edGla0QX0gD586tjmrUFJ_xIFgU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2097907540,
          "mode": "list",
          "cachedResultName": "LABJob_System December 2025",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SpkGa57uRLhoSbc0edGla0QX0gD586tjmrUFJ_xIFgU/edit#gid=2097907540"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {
            "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 Ticket \u0e40\u0e1b\u0e34\u0e14": "={{$json.open_ticket_date}}",
            "Serverity": "={{$json.severity}}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Region",
              "displayName": "Region",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TT No.",
              "displayName": "TT No.",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Serverity",
              "displayName": "Serverity",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21.)",
              "displayName": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21.)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "SLA/T",
              "displayName": "SLA/T",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TT : \u0e17\u0e35\u0e48\u0e40\u0e04\u0e25\u0e35\u0e22\u0e23\u0e4c\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "TT : \u0e17\u0e35\u0e48\u0e40\u0e04\u0e25\u0e35\u0e22\u0e23\u0e4c\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Source",
              "displayName": "Source",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": " Destination",
              "displayName": " Destination",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "displayName": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e34\u0e14 Ticket",
              "displayName": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e34\u0e14 Ticket",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 Ticket \u0e40\u0e1b\u0e34\u0e14",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e0a\u0e37\u0e48\u0e2d",
              "displayName": "\u0e0a\u0e37\u0e48\u0e2d",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e17\u0e35\u0e21",
              "displayName": "\u0e17\u0e35\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e02\u0e19\u0e32\u0e14\u0e17\u0e35\u0e21\n(\u0e08.\u0e19.\u0e04\u0e19)",
              "displayName": "\u0e02\u0e19\u0e32\u0e14\u0e17\u0e35\u0e21\n(\u0e08.\u0e19.\u0e04\u0e19)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
              "displayName": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32",
              "displayName": "\u0e40\u0e27\u0e25\u0e32",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 \u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 \u0e2d\u0e2d\u0e01\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "displayName": "\u0e2a\u0e16\u0e32\u0e19\u0e30",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e0b\u0e48\u0e2d\u0e21\u0e40\u0e2a\u0e23\u0e47\u0e08",
              "displayName": "\u0e27\u0e31\u0e19\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e0b\u0e48\u0e2d\u0e21\u0e40\u0e2a\u0e23\u0e47\u0e08",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Total Recovery Time (hh:mm)",
              "displayName": "Total Recovery Time (hh:mm)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "SLA (OK/NOK)",
              "displayName": "SLA (OK/NOK)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38",
              "displayName": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2b\u0e22\u0e38\u0e14, \u0e40\u0e25\u0e34\u0e01\u0e0b\u0e48\u0e2d\u0e21",
              "displayName": "\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e2b\u0e22\u0e38\u0e14, \u0e40\u0e25\u0e34\u0e01\u0e0b\u0e48\u0e2d\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e27\u0e34\u0e18\u0e35\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e2b\u0e15\u0e38\u0e40\u0e2a\u0e35\u0e22",
              "displayName": "\u0e27\u0e34\u0e18\u0e35\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e2b\u0e15\u0e38\u0e40\u0e2a\u0e35\u0e22",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38 Over SLA",
              "displayName": "\u0e2a\u0e32\u0e40\u0e2b\u0e15\u0e38 Over SLA",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e02\u0e2d\u0e07\u0e14\u0e35/\u0e40\u0e25\u0e02SAP",
              "displayName": "\u0e02\u0e2d\u0e07\u0e14\u0e35/\u0e40\u0e25\u0e02SAP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0e02\u0e2d\u0e07\u0e40\u0e2a\u0e35\u0e22/\u0e40\u0e25\u0e02SAP",
              "displayName": "\u0e02\u0e2d\u0e07\u0e40\u0e2a\u0e35\u0e22/\u0e40\u0e25\u0e02SAP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TT No. / PW No.ServeritySource",
              "displayName": "TT No. / PW No.ServeritySource",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "CM report",
              "displayName": "CM report",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Admin Name",
              "displayName": "Admin Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Admin Verify Date",
              "displayName": "Admin Verify Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TT No",
              "displayName": "TT No",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Severity",
              "displayName": "Severity",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21",
              "displayName": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "OpenTicketDate",
              "displayName": "OpenTicketDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "ExpectedDate",
              "displayName": "ExpectedDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "success",
              "displayName": "success",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "response",
              "displayName": "response",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21)",
              "displayName": "SLA/TM (\u0e2b\u0e19\u0e48\u0e27\u0e22 \u0e0a\u0e21)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "owner",
              "displayName": "owner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "go_time",
              "displayName": "go_time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "start_time",
              "displayName": "start_time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "done_time",
              "displayName": "done_time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "locationDefine": {
            "values": {}
          }
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

LineBot-SYS2//Success. Uses agent, memoryBufferWindow, @aotoki/n8n-nodes-line-messaging, lmChatGoogleGemini. Event-driven trigger; 39 nodes.

Source: https://github.com/kxma-blazi/system-innovationandsupply/blob/054bf199aacabe7933d5a99e1efc63a4375a71b5/N8N/LineBot-Ticket-Line.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

&gt; AI-powered nutrition assistant for Telegram — log meals, set goals, and get personalized daily reports with Google Sheets integration.

Telegram, Google Gemini, Google Gemini Chat +7
AI & RAG

This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.

OpenAI Chat, Memory Buffer Window, Output Parser Structured +11
AI & RAG

WhatsApp AI Assistant for Clinic Appointment Booking Automate your entire appointment lifecycle with an intelligent AI assistant that lives on WhatsApp. This workflow empowers any clinic or independen

Google Gemini Chat, WhatsApp Trigger, Memory Buffer Window +9
AI & RAG

Rizz AI is not just a chatbot; it's a full-featured, AI-powered CRM for your dating life.

Telegram, Google Gemini, Google Gemini Chat +5
AI & RAG

Tired of scrolling through messy notes and bookmarks to find your favorite recipes? Wish you had a personal chef's assistant to help you in the kitchen?

Telegram Trigger, Google Sheets, Telegram +6