{
  "name": "FQA_GoogleSheet_Website103",
  "nodes": [
    {
      "parameters": {},
      "id": "start",
      "name": "Start",
      "type": "n8n-nodes-base.start"
    },
    {
      "parameters": {
        "fieldToMatch": "message",
        "options": {}
      },
      "id": "zaloInput",
      "name": "Zalo User Input",
      "type": "your-custom-node.zaloInput"
    },
    {
      "parameters": {
        "operation": "lookup",
        "sheetId": "your-google-sheet-id",
        "range": "FQA!A:B",
        "lookupColumn": "C\u00e2u h\u1ecfi",
        "lookupValue": "={{$json[\"message\"]}}"
      },
      "id": "googleSheetFQA",
      "name": "Google Sheet (FQA)",
      "type": "n8n-nodes-base.googleSheets"
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"Tr\u1ea3 l\u1eddi\"]}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "id": "ifFQA",
      "name": "IF (FQA)",
      "type": "n8n-nodes-base.if"
    },
    {
      "parameters": {
        "message": "={{$json[\"Tr\u1ea3 l\u1eddi\"]}}"
      },
      "id": "zaloSendFQA",
      "name": "Zalo Send (From FQA)",
      "type": "your-custom-node.zaloSend"
    },
    {
      "parameters": {
        "operation": "lookup",
        "sheetId": "your-google-sheet-id",
        "range": "Quytrinh!A:B",
        "lookupColumn": "T\u00ean th\u1ee7 t\u1ee5c",
        "lookupValue": "={{$json[\"message\"]}}"
      },
      "id": "googleSheetQuytrinh",
      "name": "Google Sheet (Quytrinh)",
      "type": "n8n-nodes-base.googleSheets"
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"M\u00f4 t\u1ea3 th\u1ee7 t\u1ee5c\"]}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "id": "ifQuytrinh",
      "name": "IF (Quytrinh)",
      "type": "n8n-nodes-base.if"
    },
    {
      "parameters": {
        "message": "={{$json[\"M\u00f4 t\u1ea3 th\u1ee7 t\u1ee5c\"]}}"
      },
      "id": "zaloSendQuytrinh",
      "name": "Zalo Send (From Quytrinh)",
      "type": "your-custom-node.zaloSend"
    },
    {
      "parameters": {
        "url": "https://benhvien103.vn/",
        "responseFormat": "string"
      },
      "id": "httpRequest",
      "name": "HTTP Request (Website)",
      "type": "n8n-nodes-base.httpRequest"
    },
    {
      "parameters": {
        "html": "={{$json[\"body\"]}}",
        "options": {
          "extractionValues": [
            {
              "key": "content",
              "cssSelector": ".entry-content"
            }
          ]
        }
      },
      "id": "htmlExtract",
      "name": "HTML Extract",
      "type": "n8n-nodes-base.htmlExtract"
    },
    {
      "parameters": {
        "prompt": "B\u1ea1n l\u00e0 tr\u1ee3 l\u00fd AI. D\u1ef1a tr\u00ean d\u1eef li\u1ec7u web b\u1ec7nh vi\u1ec7n 103, h\u00e3y tr\u1ea3 l\u1eddi ng\u1eafn g\u1ecdn, chuy\u00ean nghi\u1ec7p, l\u1ecbch s\u1ef1 cho c\u00e2u h\u1ecfi: \"{{$json[\"message\"]}}\" \nD\u1eef li\u1ec7u web: \n{{$json[\"content\"]}}\nN\u1ebfu kh\u00f4ng li\u00ean quan, tr\u1ea3 l\u1eddi xin l\u1ed7i v\u00e0 \u0111\u1ec1 xu\u1ea5t li\u00ean h\u1ec7 0967 811 616."
      },
      "id": "aiAgent",
      "name": "AI Agent Summarize",
      "type": "your-custom-node.aiAgent"
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"text\"]}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "id": "ifAI",
      "name": "IF (AI Content)",
      "type": "n8n-nodes-base.if"
    },
    {
      "parameters": {
        "message": "={{$json[\"text\"]}}"
      },
      "id": "zaloSendWeb",
      "name": "Zalo Send (From Website)",
      "type": "your-custom-node.zaloSend"
    },
    {
      "parameters": {
        "message": "Xin l\u1ed7i, t\u00f4i ch\u01b0a c\u00f3 th\u00f4ng tin cho c\u00e2u h\u1ecfi n\u00e0y. Vui l\u00f2ng li\u00ean h\u1ec7 s\u1ed1 0967 811 616 \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3 th\u00eam."
      },
      "id": "zaloSendFallback",
      "name": "Zalo Send (Fallback)",
      "type": "your-custom-node.zaloSend"
    }
  ],
  "connections": {
    "start": {
      "main": [
        [
          {
            "node": "zaloInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "zaloInput": {
      "main": [
        [
          {
            "node": "googleSheetFQA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "googleSheetFQA": {
      "main": [
        [
          {
            "node": "ifFQA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ifFQA": {
      "main": [
        [
          {
            "node": "zaloSendFQA",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "googleSheetQuytrinh",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "googleSheetQuytrinh": {
      "main": [
        [
          {
            "node": "ifQuytrinh",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ifQuytrinh": {
      "main": [
        [
          {
            "node": "zaloSendQuytrinh",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "httpRequest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "httpRequest": {
      "main": [
        [
          {
            "node": "htmlExtract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "htmlExtract": {
      "main": [
        [
          {
            "node": "aiAgent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aiAgent": {
      "main": [
        [
          {
            "node": "ifAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ifAI": {
      "main": [
        [
          {
            "node": "zaloSendWeb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "zaloSendFallback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}