{
  "name": "Nhận thông báo chăm sóc khách hàng từ email marketing",
  "nodes": [
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "52e972e0-610a-421b-8984-37a2332b07f3",
              "leftValue": "={{ $json.body.url }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -60,
        540
      ],
      "id": "02140599-1f3e-4bf0-81ac-52ebe5abbca5",
      "name": "IF_Open_Click"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1f3c5d26-b68f-4550-b988-9628b8d9bae6",
              "name": "url",
              "value": "={{ $json.body.url }}",
              "type": "string"
            },
            {
              "id": "209c1ce4-f881-46c4-847a-15dcdebcc164",
              "name": "ip",
              "value": "={{ $json.body.ip_address }}",
              "type": "string"
            },
            {
              "id": "33746568-467d-4155-8e1a-27bb0e877697",
              "name": "campaign",
              "value": "={{ $json.body.campaign.name }}",
              "type": "string"
            },
            {
              "id": "12ee0ffb-a230-48e4-93a5-4db066b1adb5",
              "name": "email",
              "value": "={{ $json.body.subscriber.email }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        200,
        240
      ],
      "id": "17a6b26d-f21e-4ab1-9195-ba33cf4ce536",
      "name": "Set_Click"
    },
    {
      "parameters": {
        "jsCode": "const clickData = $input.item.json;\nconst emailToFind = $('Set_Click').first().json.email\nconst currentUrl = $('Set_Click').first().json.url;\n\nconst sheetRows = $items(\"Data_Sheet1\");\nlet matchedRow = null;\nlet matchIndex = -1;\n\nfor (let i = 0; i < sheetRows.length; i++) {\n  const row = sheetRows[i].json;\n  const email = (row.Email || \"\").trim().toLowerCase();\n\n  if (email === emailToFind) {\n    matchedRow = row;\n    matchIndex = i;\n    break;\n  }\n}\n\nif (matchIndex === -1) {\n  throw new Error(\"Không tìm thấy email trong sheet.\");\n}\n\nlet url1 = matchedRow[\"URL1\"]?.trim() || \"\";\nlet url2 = matchedRow[\"URL2\"]?.trim() || \"\";\nlet url3 = matchedRow[\"URL3\"]?.trim() || \"\";\n\nconst clickCount = parseInt(matchedRow[\"Lượt nhấp\"]) || 0;\n\nconst urlAlreadyExists = [url1, url2, url3].includes(currentUrl);\n\nif (!urlAlreadyExists) {\n  if (!url1) {\n    url1 = currentUrl;\n  } else if (!url2) {\n    url2 = currentUrl;\n  } else if (!url3) {\n    url3 = currentUrl;\n  }\n\n}\n\nreturn [{\n  json: {\n    rowIndex: matchedRow.row_number,\n    LuotClick: clickCount + 1,\n    url1,\n    url2,\n    url3,\n    email: matchedRow.Email,\n    name: matchedRow[\"Họ Tên\"],\n    campaign: matchedRow[\"Campaign\"]\n  }\n}];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        580,
        240
      ],
      "id": "2af85486-fbea-433c-92bf-f0cb573aa5df",
      "name": "Code_Url_Click"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k",
          "mode": "list",
          "cachedResultName": "EMA auto",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Tháng 4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        400,
        240
      ],
      "id": "e688fce9-deda-494b-9d18-7f77d09f3666",
      "name": "Data_Sheet1",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cBXvSOFmflmdaYlF",
          "name": "Ngoc sheet "
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k",
          "mode": "list",
          "cachedResultName": "EMA auto",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Tháng 4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tKn5163_C0qDn3cxBIvI09syONO28jGQzNEeiBRrhxE/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $json.rowIndex }}",
            "Lượt nhấp": "={{ $json.LuotClick }}",
            "URL1": "={{ $json.url1 }}",
            "URL2": "={{ $json.url2 }}",
            "URL3": "={{ $json.url3 }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Họ Tên",
              "displayName": "Họ Tên",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Campaign",
              "displayName": "Campaign",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "IP1",
              "displayName": "IP1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lượt Mở",
              "displayName": "Lượt Mở",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Thông báo",
              "displayName": "Thông báo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lượt nhấp",
              "displayName": "Lượt nhấp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "IP Khác",
              "displayName": "IP Khác",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "URL1",
              "displayName": "URL1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "URL2",
              "displayName": "URL2",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "URL3",
              "displayName": "URL3",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Kết quả",
              "displayName": "Kết quả",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Note",
              "displayName": "Note",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        800,
        240
      ],
      "id": "0f4fba45-009a-41c0-844a-7bca766ff637",
      "name": "Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cBXvSOFmflmdaYlF",
          "name": "Ngoc sheet "
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "testngocc",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -500,
        540
      ],
      "id": "b5ab6ca6-75fd-409e-9f07-c8209836c36c",
      "name": "Webhook1",
      "webhookId": "d031cf55-2fcf-4f23-9c2a-f98153aa9c21"
    },
    {
      "parameters": {
        "content": "## - Bắt event từ hệ thống EMA (email marketing) của 1 chiến dịch cụ thể\n## - Phân loại lượt mở và lượt click",
        "height": 260,
        "width": 640
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        420
      ],
      "typeVersion": 1,
      "id": "7cba6a07-29a8-477a-95a9-bc8fa570de37",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Lượt click\n1. Lọc các trường cần lấy từ chiến dịch\n2. Đọc bảng sheets chuẩn bị form sẵn\n3. Cập nhập các chỉ số click và url vào sheets\n4. Gửi thông báo qua tele ",
        "height": 300,
        "width": 1200
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        100
      ],
      "typeVersion": 1,
      "id": "7d417bfe-bba2-4fdc-814d-7203c7b6d2e3",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "76809c48-6b7b-474b-a5c7-4977ac437664",
              "name": "campaign",
              "value": "={{ $json.body.campaign.name }}",
              "type": "string"
            },
            {
              "id": "b11afe7c-4475-4942-bfff-795a021b40ec",
              "name": "name",
              "value": "={{ $json.body.subscriber.name }}",
              "type": "string"
            },
            {
              "id": "26defdf4-06c5-4c45-ba77-582032954aec",
              "name": "email",
              "value": "={{ $json.body.subscriber.email }}",
              "type": "string"
            },
            {
              "id": "2fddd6b5-51f1-48c9-9704-97b4c1ff06b2",
              "name": "ip",
              "value": "={{ $json.body.ip_address }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        260,
        560
      ],
      "id": "4c1cd54c-723b-4101-ab53-e822095a5a78",
      "name": "SET_TT"
    },
    {
      "parameters": {
        "content": "## Kiểm tra khách hàng đã từng mở chưa và cập nhật thêm vào sheets",
        "height": 300,
        "width": 820
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        880,
        760
      ],
      "id": "c466a592-9466-4099-96ad-668f7007bfb6",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k",
          "mode": "list",
          "cachedResultName": "EMA auto",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Tháng 4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        460,
        560
      ],
      "id": "addfbf91-04f2-47ba-a269-caebc58bca0d",
      "name": "Data_Sheet",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cBXvSOFmflmdaYlF",
          "name": "Ngoc sheet "
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const emailToFind = $items(\"SET_TT\")[0].json.email.trim().toLowerCase();\n\nlet matchIndex = -1;\nlet matchedRow = null;\n\nconst sheetItems = $items(\"Data_Sheet\");\n\nfor (let i = 0; i < sheetItems.length; i++) {\n  const emailInRow = (sheetItems[i].json.Email || \"\").trim().toLowerCase();\n\n  if (emailInRow === emailToFind) {\n    matchIndex = i;\n    matchedRow = sheetItems[i].json;\n    break;\n  }\n}\n\nif (matchIndex !== -1) {\n  return [\n    {\n      json: {\n        found: true,\n        matchIndex,\n        row: matchedRow.row_number,\n        lm: matchedRow[\"Lượt Mở\"] || 0,\n        ln: matchedRow[\"Lượt nhấp\"] || 0,\n        ipopen: matchedRow[\"IP1\"] || \"\",\n        ipnew: matchedRow[\"IP Khác\"] || \"\",\n        name: $items(\"SET_TT\")[0].json.name,\n        email: emailToFind,\n        campaign: $items(\"SET_TT\")[0].json.campaign,\n      },\n    },\n  ];\n} else {\n  return [\n    {\n      json: {\n        found: false,\n        matchIndex: -1,\n        name: $items(\"SET_TT\")[0].json.name,\n        email: emailToFind,\n        campaign: $items(\"SET_TT\")[0].json.campaign,\n      },\n    },\n  ];\n}\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        920,
        860
      ],
      "id": "eaf02bf5-fc64-409d-a777-533b8c404e76",
      "name": "Code5"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d0c9f039-35d9-42bc-b3f1-0d8dfc919129",
              "leftValue": "={{ $json.found }}",
              "rightValue": -1,
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1120,
        860
      ],
      "id": "e9fadb1d-93c4-4844-b742-cd1c88fe22e2",
      "name": "If2"
    },
    {
      "parameters": {
        "jsCode": "//const count = parseInt($('Code5').first().json.lm) || 0;\n//return [{\n//  json: {\n//    rowIndex: $('Code5').first().json.row,\n//    LuotMo: count + 1\n//  }\n//}];\n///////////////////\nconst data = $('Code5').first().json;\nconst ipCurrent = $items(\"SET_TT\")[0].json.ip?.trim() || \"\";\nconst ipOpen = data.ipopen?.trim() || \"\";\nconst ipOtherCount = parseInt(data.ipnew) || 0;\n\nconst isNewIp = ipCurrent && ipCurrent !== ipOpen;\nconst newIpCount = isNewIp ? ipOtherCount + 1 : ipOtherCount;\n\nconst openCount = parseInt(data.lm) || 0;\n\nreturn [{\n  json: {\n    rowIndex: data.row,\n    LuotMo: openCount + 1,\n    IpKhac: newIpCount,\n    ip1: ipOpen || ipCurrent,\n    email: data.email,\n    name: data.name,\n    campaign: data.campaign,\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        840
      ],
      "id": "96fb8b11-aca2-412c-ac34-f1f7d0d9f3ce",
      "name": "Code6"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k",
          "mode": "list",
          "cachedResultName": "EMA auto",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Tháng 4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{$items('SET_TT').first().json.email}}",
            "Họ Tên": "={{$items('SET_TT').first().json.name}}",
            "Campaign": "={{$items('SET_TT').first().json.campaign}}",
            "IP1": "={{$items('SET_TT').first().json.ip}}",
            "Lượt Mở": "1"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Họ Tên",
              "displayName": "Họ Tên",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Campaign",
              "displayName": "Campaign",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "IP1",
              "displayName": "IP1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Lượt Mở",
              "displayName": "Lượt Mở",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Thông báo",
              "displayName": "Thông báo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lượt nhấp",
              "displayName": "Lượt nhấp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "IP Khác",
              "displayName": "IP Khác",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "URL1",
              "displayName": "URL1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "URL2",
              "displayName": "URL2",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "URL3",
              "displayName": "URL3",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Kết quả",
              "displayName": "Kết quả",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Note",
              "displayName": "Note",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1040,
        540
      ],
      "id": "0bf104ed-4038-4c6b-8222-905e09136bc6",
      "name": "Thêm Mới KH Mở Mail1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cBXvSOFmflmdaYlF",
          "name": "Ngoc sheet "
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "1539e672-e088-454d-996a-019f1fc9f454",
              "leftValue": "={{ $json['Lượt nhấp'] }}",
              "rightValue": 1,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1000,
        240
      ],
      "id": "176a28f3-2a93-417a-9747-51c8b4034e7d",
      "name": "If"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "f271dbfc-8df3-4f9b-a0eb-c780bd4cda21",
              "leftValue": "={{ $json.hasData }}",
              "rightValue": "false",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        840,
        560
      ],
      "id": "8cd1d09b-91da-44d7-9458-e36da7e9fa7b",
      "name": "IF_Empty"
    },
    {
      "parameters": {
        "jsCode": "const firstRow = items[0]?.json || {};\nconst isEmpty = Object.keys(firstRow).length === 0;\n\nreturn [\n  {\n    json: {\n      hasData: !isEmpty\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        640,
        560
      ],
      "id": "16dd45ca-11bc-4030-bb61-a881745a31e9",
      "name": "Check_Sheet_Empty"
    },
    {
      "parameters": {
        "chatId": "-1002663080485",
        "text": "=Có Khách Hàng Nhấp Link. Thông tin:\n-Chiến dịch: {{ $('Code_Url_Click').item.json.campaign }}\n-Email: {{ $('Code_Url_Click').item.json.email }}\n-Họ Tên: {{ $('Code_Url_Click').item.json.name }}\nVui lòng cập nhật kết quả chăm sóc khách hàng vào sheets.\nLink sheets: ..",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1200,
        140
      ],
      "id": "1c03f833-ca8d-47d3-8be6-ef315015e69e",
      "name": "Telegram1",
      "webhookId": "12841e79-689a-48cf-8c0b-a878e23830a0",
      "credentials": {
        "telegramApi": {
          "id": "YgmWgzlP60XiVcFQ",
          "name": "Bot Ngọc MKT"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k",
          "mode": "list",
          "cachedResultName": "EMA auto",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F2qb5bLz5o8Esui12PFi3Y-gPT2S6oDTF-KylsBLn9k/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Tháng 4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tKn5163_C0qDn3cxBIvI09syONO28jGQzNEeiBRrhxE/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $json.rowIndex }}",
            "Lượt Mở": "={{ $json.LuotMo }}",
            "IP Khác": "={{ $json.IPKhac }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Họ Tên",
              "displayName": "Họ Tên",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Campaign",
              "displayName": "Campaign",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "IP1",
              "displayName": "IP1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lượt Mở",
              "displayName": "Lượt Mở",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Thông báo",
              "displayName": "Thông báo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lượt nhấp",
              "displayName": "Lượt nhấp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "IP Khác",
              "displayName": "IP Khác",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "URL1",
              "displayName": "URL1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "URL2",
              "displayName": "URL2",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "URL3",
              "displayName": "URL3",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Kết quả",
              "displayName": "Kết quả",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Note",
              "displayName": "Note",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1520,
        840
      ],
      "id": "e3fb96b6-c127-4ea3-b3bb-b6a674a48398",
      "name": "Cập Nhật+1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cBXvSOFmflmdaYlF",
          "name": "Ngoc sheet "
        }
      }
    },
    {
      "parameters": {
        "content": "## Lượt mở\n1. Lọc các trường cần lấy từ chiến dịch \n2. Đọc bảng sheets chuẩn bị form sẵn\n3. Xác định bảng sheets đã có dữ liệu hay chưa và đã mở email lần nào chưa\n4. Cập nhật vào sheets số lượt mở. Mỗi lần khách hàng mở +1",
        "height": 280,
        "width": 1200
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        440
      ],
      "typeVersion": 1,
      "id": "568b44ea-e78b-4bcb-9d77-6d7f2c300d32",
      "name": "Sticky Note3"
    }
  ],
  "pinData": {
    "Webhook1": [
      {
        "json": {
          "headers": {
            "host": "n8n.quan.io.vn",
            "x-real-ip": "103.216.117.90",
            "x-forwarded-for": "103.216.117.90",
            "x-forwarded-proto": "https",
            "connection": "close",
            "content-length": "18134",
            "user-agent": "GuzzleHttp/7",
            "content-type": "application/json"
          },
          "params": {},
          "query": {},
          "body": {
            "message_id": "1749719459687736.684a99a370eb0@tenmieninet.vn",
            "user_agent": "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)",
            "ip_address": "66.249.84.102",
            "trackingLog": {
              "_id": "684a99a373480cfa280e0b86",
              "campaign_id": 31776,
              "message_id": "1749719459687736.684a99a370eb0@tenmieninet.vn",
              "subscriber_id": 38842494,
              "sending_server_id": 31,
              "customer_id": 67,
              "mail_list_id": 17462,
              "subject": "Xin thông báo",
              "runtime_message_id": "0101019763682c53-adcf31ed-fd4a-40fd-afc3-e29b08cb2d1f-000000",
              "created_at": "2025-06-12T09:10:59.000000Z",
              "updated_at": "2025-06-12T09:10:59.000000Z",
              "customer": {
                "id": 67,
                "uid": "5e3d26f018564",
                "admin_id": 20,
                "contact_id": 15484,
                "language_id": 5,
                "timezone": "Asia/Ho_Chi_Minh",
                "channel": "onemail",
                "status": "active",
                "color_scheme": "white",
                "quota": null,
                "created_at": "2020-02-07T08:59:28.000000Z",
                "updated_at": "2025-06-12T08:56:08.000000Z",
                "dc": "s1",
                "text_direction": "ltr",
                "payment_method": null,
                "auto_billing_data": null,
                "menu_layout": "left",
                "theme_mode": "dark",
                "org_id": 1284,
                "org_email": "hoabd@zozo.vn",
                "org_name": "Sale HN - HoaBD",
                "first_name": "Minh",
                "last_name": "Quân",
                "user": {
                  "id": 67,
                  "uid": "5e3d26f017df0",
                  "api_token": "4oNQxVZae75DluK94Fq1QV6pb5gABzfVL9FdlyTANnsSEVROjPlu3METlGnw",
                  "creator_id": null,
                  "email": "quanlm@inet.vn",
                  "status": null,
                  "created_at": "2020-02-07T08:59:28.000000Z",
                  "updated_at": "2025-04-03T01:53:31.000000Z",
                  "quota": null,
                  "phone": null,
                  "activated": 1,
                  "dc": null,
                  "one_time_api_token": null,
                  "customer_id": 67,
                  "first_name": "Minh",
                  "last_name": "Quân",
                  "google_id": null,
                  "google_token": null,
                  "google_refresh_token": null,
                  "facebook_id": null,
                  "facebook_token": null,
                  "facebook_refresh_token": null
                }
              },
              "campaign": {
                "id": 31776,
                "uid": "684a80ca5464a",
                "customer_id": 67,
                "type": "regular",
                "name": "Email marketing",
                "subject": "Xin thông báo",
                "from_email": "contact@tenmieninet.vn",
                "from_name": "Ngọc từ iNET",
                "reply_to": "contact@tenmieninet.vn",
                "status": "sending",
                "sign_dkim": 1,
                "track_open": 1,
                "track_click": 1,
                "resend": null,
                "run_at": "2025-06-12T09:00:00.000000Z",
                "delivery_at": "2025-06-12T09:10:54.000000Z",
                "created_at": "2025-06-12T07:24:58.000000Z",
                "updated_at": "2025-06-12T09:10:54.000000Z",
                "template_source": null,
                "last_error": null,
                "is_auto": 0,
                "image": null,
                "default_mail_list_id": 17462,
                "cache": "{\"ActiveSubscriberCount\":7,\"SubscriberCount\":8,\"DeliveredCount\":0,\"DeliveredRate\":0,\"FailedDeliveredCount\":0,\"FailedDeliveredRate\":0,\"NotDeliveredCount\":7,\"NotDeliveredRate\":1,\"UniqOpenCount\":0,\"ClickedRate\":0,\"ClickCount\":0,\"OpenCount\":0,\"UniqOpenRate\":0,\"NotOpenCount\":0,\"NotOpenRate\":1}",
                "tracking_domain_id": null,
                "use_default_sending_server_from_email": 0,
                "preheader": null,
                "sending_servers_id": null,
                "running_pid": 8843,
                "statistical_campaign": 0,
                "interactive_history": "default",
                "delay_seconds": null,
                "template_id": 42754,
                "need_check": "no_need_check",
                "warmup_plan_id": null,
                "tracking_domain": null
              },
              "sendingServer": {
                "id": 31,
                "uid": "6785cbcbc6441",
                "admin_id": 21,
                "customer_id": null,
                "bounce_handler_id": null,
                "feedback_loop_handler_id": null,
                "name": "Amazon SMTP iNET",
                "type": "amazon-smtp",
                "host": "email-smtp.us-west-2.amazonaws.com",
                "aws_access_key_id": "AKIA3Q57MJZDGGS3IPNY",
                "aws_secret_access_key": "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",
                "aws_region": "us-west-2",
                "domain": null,
                "api_key": null,
                "smtp_username": "AKIA3Q57MJZDJFRJAZHE",
                "smtp_password": "BFx6uGdiGZ/z/tMaTMpZeki07R82OMwtCnvXdHdSll3x",
                "smtp_port": 465,
                "smtp_protocol": "ssl",
                "sendmail_path": null,
                "quota_value": -1,
                "quota_base": -1,
                "quota_unit": "day",
                "status": "active",
                "created_at": "2025-01-14T02:28:27.000000Z",
                "updated_at": "2025-04-09T05:03:54.000000Z",
                "api_secret_key": null,
                "quota": null,
                "default_from_email": "contact@inet.net.vn",
                "options": "{\"domains\":[\"zozo.net.vn\",\"inet.name.vn\",\"tenmieninet.vn\",\"cloudfly.vn\",\"tenmieninet.com\",\"inet.vn\",\"inet.org.vn\",\"tuvantenmien.com.vn\",\"nhadangkytenmien.vn\",\"dotvn.vn\",\"zozo.vn\",\"inet.net.vn\"],\"emails\":[\"thildph07746@fpt.edu.vn\",\"contact@inet.net.vn\",\"contact@myzozo.net\",\"noreply@exdomain.net\",\"contact@zozo.net.vn\",\"thanhthuynguyen283802@gmail.com\",\"websitemonitoringinet@gmail.com\",\"tieudv@zozo.vn\",\"contact@tenmieninet.com\",\"noreply@dotvn.vn\",\"alma@vinalotus.vn\",\"tuantd@pantrading.vn\",\"lptuananh2611@gmail.com\",\"hautx@inet.vn\",\"noreply@inet.vn\",\"ema@zozo.vn\",\"contact@tenmieninet.vn\",\"lechuhuuha@gmail.com\",\"support@zozo.vn\",\"tranngq@inet.vn\",\"hotriit@gmail.com\",\"bounced@zozo.vn\",\"tieudv89@gmail.com\",\"ledinhthi2909@gmail.com\",\"email-01@inet.name.vn\",\"newsletter@inet.vn\",\"phuongpm@zozo.vn\",\"contact@tuvantenmien.com.vn\",\"thienvvzozo@gmail.com\",\"newsletter@myzozo.net\",\"maintt@zozo.vn\",\"contact@zozo.vn\",\"phucnh@zozo.vn\",\"newsletter@tuvantenmien.com.vn\",\"ngocdanggk@gmail.com\",\"support@inet.vn\",\"ngocdtk@inet.vn\",\"thuynguyenotaku28@gmail.com\",\"tuyetmai17092000@gmail.com\"],\"allow_unverified_from_email\":\"no\",\"allow_verify_domain_remotely\":\"yes\",\"allow_verify_email_remotely\":\"yes\",\"not_allow_free_email_services\":\"no\",\"sending_limit\":\"unlimited\",\"identities\":{\"zozo.net.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"4ZwRtymy2fhZgz8jr9Tddq1G7a5KZqK\\/YhFsdgrOdwY=\"},\"thildph07746@fpt.edu.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"contact@inet.net.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":694,\"UserName\":\"L\\u00ea H\\u1eadu\"},\"binhthuongthoi146@gmail.com\":{\"Selected\":false,\"VerificationStatus\":\"Pending\",\"UserId\":null,\"UserName\":null},\"contact@myzozo.net\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"noreply@exdomain.net\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"inet.name.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"goNGP+8u8o0DauA3PUtEFMhNoiOBkP+AboVx0YPJRqg=\"},\"contact@zozo.net.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"thanhthuynguyen283802@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"tenmieninet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"An+TIhHTT6KAxQu9IdnR5wU81UQAc1AIh2RwyMlGKJ4=\"},\"websitemonitoringinet@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"tieudv@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"contact@tenmieninet.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"cloudfly.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"pTgGdpVUWYvHsfAvf0IZ+Ak2Otl3OJwgBINRlaMnj38=\"},\"noreply@dotvn.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"alma@vinalotus.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"tuantd@pantrading.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"lptuananh2611@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"hautx@inet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"noreply@inet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"tenmieninet.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"Xv8gU+Tf3TsYlKrh+aciwlZC5Xpq2j+D0HYeuPVSnjw=\"},\"ema@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"contact@tenmieninet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"zozo.com.vn\":{\"Selected\":false,\"VerificationStatus\":\"Pending\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"nuGkkEi\\/CAO+XVarHssz3mMNfTsedIM05IYt0n7C7t4=\"},\"inet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"B01tAmuac1JgPeOy0QRzvWLZwgViMWF5OHNUhz1ZhMs=\"},\"lechuhuuha@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"support@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":2762,\"UserName\":\"Zozo Customer Care\"},\"tranngq@inet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"inet.org.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"XRKQ4da8MUwu1IZSARXL\\/RN4ykA9mXWGr8W3yP\\/0Kd8=\"},\"hotriit@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"bounced@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"tieudv89@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"ledinhthi2909@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"email-01@inet.name.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"tuvantenmien.com.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"Mp48W5O6Y8xM2xELpsYmQZ6CxLB6Bjlrg5wMIJMZ\\/PY=\"},\"contact@nhadangkytenmien.vn\":{\"Selected\":true,\"VerificationStatus\":\"Pending\",\"UserId\":6,\"UserName\":\"H\\u1ed3 \\u0110\\u1ee9c Tr\\u00ed\"},\"lovemyseft28@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":2779,\"UserName\":\"Nguy\\u1ec5n Th\\u1ecb Thanh Th\\u00fay\"},\"newsletter@inet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":6,\"UserName\":\"H\\u1ed3 \\u0110\\u1ee9c Tr\\u00ed\"},\"phuongpm@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"contact@tuvantenmien.com.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"nhadangkytenmien.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"fuADotWlkND3wdD9T4o4oWDkSt\\/tlBtDBZkwCdg3838=\"},\"info@inet.org.vn\":{\"Selected\":true,\"VerificationStatus\":\"Pending\",\"UserId\":1976,\"UserName\":\"Nguy\\u1ec5n Minh H\\u1ea3i\"},\"thienvvzozo@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"newsletter@myzozo.net\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"maintt@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"contact@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":2762,\"UserName\":\"Zozo Customer Care\"},\"phucnh@zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"newsletter@tuvantenmien.com.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"dotvn.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"+SyLOpbkoRk8lZiHljjsPZIq5voZlz3TMRBC9nffKtw=\"},\"ngocdanggk@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"support@inet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":1976,\"UserName\":\"Nguy\\u1ec5n Minh H\\u1ea3i\"},\"zozo.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"zPhkLeqiAOWFXshxRGaNVQ1i6OAeMb8wcLgjYg5HhJY=\"},\"ngocdtk@inet.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"thuynguyenotaku28@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"tuyetmai17092000@gmail.com\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null},\"inet.net.vn\":{\"Selected\":true,\"VerificationStatus\":\"Success\",\"UserId\":null,\"UserName\":null,\"VerificationToken\":\"U0wwInJeNZ7Z885GdW0pU5zwPFauprtOdMaGn9+IxS8=\"}}}"
              },
              "subscriber": {
                "id": 38842494,
                "uid": "67f364d1a8b06",
                "mail_list_id": 17462,
                "email": "tuantuannhaday@gmail.com",
                "status": "subscribed",
                "from": "added",
                "ip": "103.56.162.9",
                "created_at": "2025-04-07T05:38:25.000000Z",
                "updated_at": "2025-04-07T05:38:26.000000Z",
                "subscription_type": null,
                "tags": null,
                "mx": null,
                "verification_result": "deliverable",
                "score": 0,
                "name": "Tuân Tuấn",
                "verification_status": null,
                "last_verification_at": null,
                "last_verification_by": null,
                "last_verification_result": null,
                "subscriber_fields": [
                  {
                    "id": 108625023,
                    "subscriber_id": 38842494,
                    "field_id": 75815,
                    "value": "tuantuannhaday@gmail.com",
                    "created_at": "2025-04-07T05:38:25.000000Z",
                    "updated_at": "2025-04-07T05:38:25.000000Z",
                    "field": {
                      "id": 75815,
                      "visible": 1,
                      "tag": "EMAIL"
                    }
                  },
                  {
                    "id": 108625024,
                    "subscriber_id": 38842494,
                    "field_id": 75816,
                    "value": "Tuân Tuấn",
                    "created_at": "2025-04-07T05:38:25.000000Z",
                    "updated_at": "2025-04-07T05:38:25.000000Z",
                    "field": {
                      "id": 75816,
                      "visible": 1,
                      "tag": "NAME"
                    }
                  },
                  {
                    "id": 109949611,
                    "subscriber_id": 38842494,
                    "field_id": 76082,
                    "value": "ngocptn",
                    "created_at": "2025-04-11T07:32:44.000000Z",
                    "updated_at": "2025-04-11T07:32:44.000000Z",
                    "field": {
                      "id": 76082,
                      "visible": 1,
                      "tag": "AFF"
                    }
                  },
                  {
                    "id": 109949612,
                    "subscriber_id": 38842494,
                    "field_id": 76083,
                    "value": "phamthinhungoc1912@gmail.com",
                    "created_at": "2025-04-11T07:32:44.000000Z",
                    "updated_at": "2025-04-11T07:32:44.000000Z",
                    "field": {
                      "id": 76083,
                      "visible": 1,
                      "tag": "ORGEMAIL"
                    }
                  }
                ]
              },
              "mailList": {
                "id": 17462,
                "uid": "67f363654b455",
                "customer_id": 67,
                "contact_id": 21470,
                "name": "test Ngọc",
                "default_subject": null,
                "from_email": null,
                "from_name": "Ngọc từ iNET",
                "remind_message": null,
                "email_subscribe": null,
                "email_unsubscribe": null,
                "email_daily": null,
                "send_welcome_email": 0,
                "unsubscribe_notification": 1,
                "status": null,
                "created_at": "2025-04-07T05:32:21.000000Z",
                "updated_at": "2025-06-12T08:55:55.000000Z",
                "subscribe_confirmation": 0,
                "all_sending_servers": 0,
                "type": null,
                "embedded_form_options": null,
                "enable_email_encryption": 0
              },
              "error": "",
              "status": "sent"
            },
            "updated_at": {
              "$date": {
                "$numberLong": "1750390679000"
              }
            },
            "_id": {
              "$oid": "6854d7977dbe9c8cda0e40c5"
            },
            "created_at": {
              "$date": {
                "$numberLong": "1750390679000"
              }
            },
            "campaign": {
              "id": 31776,
              "uid": "684a80ca5464a",
              "customer_id": 67,
              "type": "regular",
              "name": "Email marketing",
              "subject": "Xin thông báo",
              "plain": "https://helpdesk.inet.vn/blog/chao-he-sang-deal-ngap-tran?sale=HCMPemail05,{AFF}\nKính gửi: Quý Khách hàng {NAME},\n\nĐón chào mùa hè sôi động, iNET mang đến cho Quý khách loạt ưu đãi lên đến 60% cho các dịch vụ Hosting / Email tên miền / Cloud Server.\nThời gian diễn ra chương trình: 26/05/2025 - 31/05/2025\n\nĐây là thời điểm vàng để nâng cấp hạ tầng công nghệ, tối ưu hóa website và đảm bảo vận hành doanh nghiệp mượt mà.\n\n​​Trân trọng!\n\n[xem CHI TIẾt →](https://helpdesk.inet.vn/blog/chao-he-sang-deal-ngap-tran?sale=HCMPemail05,{AFF})\n\n[đĂNG KÝ NGAY →](https://inet.vn/hosting/cloud-hosting?sale=HCMPemail05,{AFF})\n\nNhà Đăng Ký Tên Miền iNET\n- Hotline: 19009250\n- Email: tenmien@inet.vn\n- iNET Telegram Channel: https://t.me/+Ss9pZoF-XjEyYjNl\n- Hà Nội: Số 247 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy\n- TP. Hồ Chí Minh: Số 40 Hoàng Việt, Phường 4, Quận Tân Bình\n\n/assets/YXBwL3VzZXJzLzVlM2QyNmYwMTdkZjAvaG9tZS9maWxlcw/inetcoupon\n\nhttps://www.facebook.com/inet.miennam\n\nBạn nhận được Email này vì bạn đã đăng ký nhận tin từ chúng tôi\nBạn có thể [cập nhật thông tin]({UPDATE_PROFILE_URL}) Hoặc [huỷ đăng ký nhận tin]({UNSUBSCRIBE_URL})",
              "from_email": "contact@tenmieninet.vn",
              "from_name": "Ngọc từ iNET",
              "reply_to": "contact@tenmieninet.vn",
              "status": "done",
              "sign_dkim": 1,
              "track_open": 1,
              "track_click": 1,
              "resend": null,
              "run_at": "2025-06-12 16:00:00",
              "delivery_at": "2025-06-12 16:10:54",
              "created_at": "2025-06-12 14:24:58",
              "updated_at": "2025-06-20 10:37:59",
              "template_source": null,
              "last_error": null,
              "is_auto": 0,
              "image": null,
              "default_mail_list_id": 17462,
              "cache": "{\"ActiveSubscriberCount\":8,\"SubscriberCount\":8,\"DeliveredCount\":8,\"DeliveredRate\":1,\"FailedDeliveredCount\":0,\"FailedDeliveredRate\":0,\"NotDeliveredCount\":0,\"NotDeliveredRate\":0,\"UniqOpenCount\":5,\"ClickedRate\":0.5,\"ClickCount\":27,\"OpenCount\":23,\"UniqOpenRate\":0.625,\"NotOpenCount\":3,\"NotOpenRate\":0.375}",
              "tracking_domain_id": null,
              "use_default_sending_server_from_email": 0,
              "preheader": null,
              "sending_servers_id": null,
              "running_pid": 8843,
              "statistical_campaign": 0,
              "interactive_history": "default",
              "delay_seconds": null,
              "template_id": 42754,
              "need_check": "no_need_check",
              "warmup_plan_id": null
            },
            "subscriber": {
              "id": 38842494,
              "uid": "67f364d1a8b06",
              "mail_list_id": 17462,
              "email": "tuantuannhaday@gmail.com",
              "status": "subscribed",
              "from": "added",
              "ip": "103.56.162.9",
              "created_at": "2025-04-07 12:38:25",
              "updated_at": "2025-04-07 12:38:26",
              "subscription_type": null,
              "tags": null,
              "mx": null,
              "verification_result": "deliverable",
              "score": 0,
              "name": "Tuân Tuấn",
              "verification_status": null,
              "last_verification_at": null,
              "last_verification_by": null,
              "last_verification_result": null
            }
          },
          "webhookUrl": "https://n8n.quan.io.vn/webhook/testngocc",
          "executionMode": "production"
        }
      }
    ]
  },
  "connections": {
    "IF_Open_Click": {
      "main": [
        [
          {
            "node": "Set_Click",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "SET_TT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set_Click": {
      "main": [
        [
          {
            "node": "Data_Sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code_Url_Click": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data_Sheet1": {
      "main": [
        [
          {
            "node": "Code_Url_Click",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "IF_Open_Click",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SET_TT": {
      "main": [
        [
          {
            "node": "Data_Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data_Sheet": {
      "main": [
        [
          {
            "node": "Check_Sheet_Empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code5": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Code6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Thêm Mới KH Mở Mail1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code6": {
      "main": [
        [
          {
            "node": "Cập Nhật+1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Telegram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF_Empty": {
      "main": [
        [
          {
            "node": "Thêm Mới KH Mở Mail1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check_Sheet_Empty": {
      "main": [
        [
          {
            "node": "IF_Empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "68a88caa-1ff4-4d72-99f1-f1ee15dad2c8",
  "meta": {
    "instanceId": "26d4932d441ca34892bd491418334feee4abea83c904852aefca49ce530634e0"
  },
  "id": "QE422YGBQtEftL8p",
  "tags": []
}