{
  "name": "VietlinhAI | Thu thập dữ liệu 4 mạng xã hội về Google Sheets",
  "nodes": [
    {
      "parameters": {
        "content": "## TIKTOK DATA SCRAPE\n",
        "height": 288,
        "width": 1312,
        "color": "#070529"
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -16
      ],
      "id": "1de26e67-d1b8-4e40-8b5b-e0c55479d1d7",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## FACEBOOK DATA SCRAPE\n",
        "height": 592,
        "width": 1312,
        "color": "#070529"
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        336
      ],
      "id": "2bc0325f-09ad-49c6-81b9-667bb883217d",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## YOUTUBE DATA SCRAPE\n",
        "height": 288,
        "width": 1312,
        "color": "#070529"
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        976
      ],
      "id": "c7722fdc-6812-47d6-9b45-2ae87d67e32d",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "formTitle": "Nền tảng",
        "formDescription": "Chọn nền mạng xã hội bạn muốn thu thập dữ liệu",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Nền tảng",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "TikTok"
                  },
                  {
                    "option": "Facebook"
                  },
                  {
                    "option": "YouTube"
                  },
                  {
                    "option": "Instagram"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.5,
      "position": [
        -656,
        528
      ],
      "id": "f7799d91-4d65-4b77-ab97-4d9945ad4645",
      "name": "On form submission",
      "webhookId": "132fc01f-46ce-476d-a7b1-9f5873f7af30"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json['Nền tảng'] }}",
                    "rightValue": "TikTok",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "4bc64fc7-7941-4018-bef1-51e140014ee2"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "TikTok"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "5c63ceb0-4ef6-44e9-9fcf-081989085296",
                    "leftValue": "={{ $json['Nền tảng'] }}",
                    "rightValue": "Facebook",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Facebook"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "01815ba7-6576-4fa2-b7f0-ceb7d32acf8f",
                    "leftValue": "={{ $json['Nền tảng'] }}",
                    "rightValue": "YouTube",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "YouTube"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "b8d2065d-5c44-45b2-945c-f337f70022cb",
                    "leftValue": "={{ $json['Nền tảng'] }}",
                    "rightValue": "Instagram",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Instagram"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        -448,
        496
      ],
      "id": "e0b7fb4c-2919-4de6-a510-d979fd12e13c",
      "name": "Switch"
    },
    {
      "parameters": {
        "operation": "Run actor and get dataset",
        "actorSource": "store",
        "actorId": {
          "__rl": true,
          "value": "GdWCkxBtKWOsKjdch",
          "mode": "list",
          "cachedResultName": "TikTok Scraper (clockworks/tiktok-scraper)",
          "cachedResultUrl": "https://console.apify.com/actors/GdWCkxBtKWOsKjdch/input"
        },
        "customBody": "={\n    \"commentsPerPost\": 0,\n    \"excludePinnedPosts\": false,\n    \"hashtags\": [\n        \"vayxinh, thoitrangnu, dambody\"\n    ],\n    \"maxFollowersPerProfile\": 0,\n    \"maxFollowingPerProfile\": 0,\n    \"maxRepliesPerComment\": 0,\n    \"proxyCountryCode\": \"VN\",\n    \"resultsPerPage\": 10,\n    \"scrapeRelatedVideos\": false,\n    \"searchQueries\": [\n        \"thời trang nữ, váy xinh, vay xinh\"\n    ],\n    \"shouldDownloadAvatars\": false,\n    \"shouldDownloadCovers\": false,\n    \"shouldDownloadMusicCovers\": false,\n    \"shouldDownloadSlideshowImages\": false,\n    \"shouldDownloadVideos\": false,\n    \"topLevelCommentsPerPost\": 0\n}"
      },
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 1,
      "position": [
        416,
        80
      ],
      "id": "ffb95e43-ac0c-4f8c-bbd7-fd2db1ce5c21",
      "name": "Get Tiktok Data"
    },
    {
      "parameters": {
        "operation": "Run actor and get dataset",
        "actorSource": "store",
        "actorId": {
          "__rl": true,
          "value": "=WGDH2CpXr3qINa3E4",
          "mode": "id"
        },
        "customBody": "={\n    \"maxPages\": 100,\n    \"query\": \"Thời trang nữ\"\n}"
      },
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 1,
      "position": [
        416,
        480
      ],
      "id": "8f85d560-f79f-41bd-8e87-bdf9a775957b",
      "name": "Get Facebook Data"
    },
    {
      "parameters": {
        "operation": "Run actor and get dataset",
        "actorSource": "store",
        "actorId": {
          "__rl": true,
          "value": "h7sDV53CddomktSi5",
          "mode": "list",
          "cachedResultName": "YouTube Scraper (streamers/youtube-scraper)",
          "cachedResultUrl": "https://console.apify.com/actors/h7sDV53CddomktSi5/input"
        },
        "customBody": "={\n    \"downloadSubtitles\": false,\n    \"hasCC\": false,\n    \"hasLocation\": false,\n    \"hasSubtitles\": false,\n    \"is360\": false,\n    \"is3D\": false,\n    \"is4K\": false,\n    \"isBought\": false,\n    \"isHD\": false,\n    \"isHDR\": false,\n    \"isLive\": false,\n    \"isVR180\": false,\n    \"maxResultStreams\": 0,\n    \"maxResults\": 10,\n    \"maxResultsShorts\": 10,\n    \"preferAutoGeneratedSubtitles\": false,\n    \"saveSubsToKVS\": false,\n    \"searchQueries\": [\n        \"vayxinh\",\n        \"thoitrangnu\",\n        \"dambody\"\n    ]\n}",
        "timeout": {}
      },
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 1,
      "position": [
        416,
        1056
      ],
      "id": "7a7c4211-c97d-4c1d-9be2-5fae48a7a809",
      "name": "Get Youtube Data"
    },
    {
      "parameters": {
        "content": "## INSTAGRAM DATA SCRAPE\n",
        "height": 288,
        "width": 1312,
        "color": "#070529"
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        1312
      ],
      "id": "4e9c5616-2b66-4f6d-bd44-5728290809c2",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 3
          },
          "conditions": [
            {
              "id": "2cb3ca56-149a-4804-8d11-0458b4ce3b84",
              "leftValue": "={{ $json.error }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            },
            {
              "id": "842d9ef8-bde8-4fc6-82eb-f14a32257d83",
              "leftValue": "={{ $json.numberOfSubscribers }}",
              "rightValue": 100,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            },
            {
              "id": "f62b43ff-5f77-4cd7-b33f-bcf120ab97e7",
              "leftValue": "={{ $json.viewCount }}",
              "rightValue": 500,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        608,
        1056
      ],
      "id": "4e94f177-fa44-4b7b-9b47-6ba28448206c",
      "name": "Lọc kênh rác"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "dbcb49d0-6a0e-4b1e-a491-82618bc3cb7c",
              "leftValue": "={{ $json.profile_url }}",
              "rightValue": "people",
              "operator": {
                "type": "string",
                "operation": "notContains"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        608,
        480
      ],
      "id": "9fc771f0-e9e9-4c0c-90c4-2fc72ca71e46",
      "name": "Lọc Trang cá nhân"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "2cb3ca56-149a-4804-8d11-0458b4ce3b84",
              "leftValue": "={{ $json.error }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        608,
        80
      ],
      "id": "57bad175-d61d-44cb-9efa-63b45764b4b9",
      "name": "Lọc TikTok Clone"
    },
    {
      "parameters": {
        "jsCode": "// 1. Lấy toàn bộ URL từ các item truyền sang\nconst rawUrls = $input.all().map(item => item.json.url);\n\n// 2. Lọc bỏ các URL bị trùng lặp (Remove duplicates)\nconst uniqueUrls = [...new Set(rawUrls)];\n\n// 3. Ép sang định dạng Object chuẩn của Apify: [{ \"url\": \"link_1\" }]\nconst apifyStartUrls = uniqueUrls.map(link => {\n  return { \"url\": link };\n});\n\n// Trả kết quả về cho n8n\nreturn [{\n  json: {\n    formatted_urls: apifyStartUrls\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        800,
        480
      ],
      "id": "9ee04c8e-e2cf-4cee-a287-f799c9203109",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "operation": "Run actor and get dataset",
        "actorId": {
          "__rl": true,
          "value": "4Hv5RhChiaDk6iwad",
          "mode": "list",
          "cachedResultName": "Facebook Pages Scraper (apify/facebook-pages-scraper)",
          "cachedResultUrl": "https://console.apify.com/actors/4Hv5RhChiaDk6iwad/input"
        },
        "customBody": "={\n  \"startUrls\": {{ JSON.stringify($json.formatted_urls) }},\n  \"maxPosts\": 5,\n  \"scrapeServices\": false,\n  \"scrapeReviewScore\": false\n}"
      },
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 1,
      "position": [
        1008,
        480
      ],
      "id": "6fb36484-1c13-4ad5-83ce-fb2a6a984495",
      "name": "Lọc Data lần 2"
    },
    {
      "parameters": {
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "likes",
              "order": "descending"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.sort",
      "typeVersion": 1,
      "position": [
        416,
        704
      ],
      "id": "b67b5823-659b-407d-b55b-fc1c3a445cd4",
      "name": "Sort"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "66e9da73-d2d7-4618-acda-76260b6627fd",
              "name": "Tên Page",
              "value": "={{ $json.pageName }}",
              "type": "string"
            },
            {
              "id": "906dd94b-74dc-4cab-a43d-d1c810d111fb",
              "name": "Follower",
              "value": "={{ $json.followers }}",
              "type": "number"
            },
            {
              "id": "bad9f81b-6120-4759-b751-b4561172dc54",
              "name": "Likes",
              "value": "={{ $json.likes }}",
              "type": "number"
            },
            {
              "id": "1a15437e-26fd-4e29-949e-3a1b9c9290c2",
              "name": "Url",
              "value": "={{ $json.facebookUrl }}",
              "type": "string"
            },
            {
              "id": "4acfb2f3-3330-49d2-b20e-ff4571451c34",
              "name": "Thành lập",
              "value": "={{ $json.creation_date }}",
              "type": "string"
            },
            {
              "id": "e2a12708-e389-4e0d-994e-ad88ec27e6e5",
              "name": "Info",
              "value": "={{ $json.info[0] }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        608,
        704
      ],
      "id": "32a0f3f9-2766-47d0-a7ff-6edf04d671d3",
      "name": "Lấy thông tin FB"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "66e9da73-d2d7-4618-acda-76260b6627fd",
              "name": "Caption",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "906dd94b-74dc-4cab-a43d-d1c810d111fb",
              "name": "Ngày đăng",
              "value": "={{ $json.createTimeISO }}",
              "type": "string"
            },
            {
              "id": "bad9f81b-6120-4759-b751-b4561172dc54",
              "name": "Username",
              "value": "={{ $json.authorMeta.name }}",
              "type": "string"
            },
            {
              "id": "1a15437e-26fd-4e29-949e-3a1b9c9290c2",
              "name": "Userlink",
              "value": "={{ $json.authorMeta.profileUrl }}",
              "type": "string"
            },
            {
              "id": "7f274287-f654-47ae-856c-2569d2e9282a",
              "name": "Tiktok Url",
              "value": "={{ $json.webVideoUrl }}",
              "type": "string"
            },
            {
              "id": "03ae0630-544c-46e3-8b9b-338a19449c6a",
              "name": "Likes",
              "value": "={{ $json.diggCount }}",
              "type": "number"
            },
            {
              "id": "4acfb2f3-3330-49d2-b20e-ff4571451c34",
              "name": "Shares",
              "value": "={{ $json.shareCount }}",
              "type": "number"
            },
            {
              "id": "e2a12708-e389-4e0d-994e-ad88ec27e6e5",
              "name": "View",
              "value": "={{ $json.playCount }}",
              "type": "number"
            },
            {
              "id": "bf6b8cfe-5f3b-4632-b159-6477ee2874e0",
              "name": "Comment",
              "value": "={{ $json.commentCount }}",
              "type": "number"
            },
            {
              "id": "9ec08b0d-b327-4feb-a0e7-3c1ab77196be",
              "name": "Save",
              "value": "={{ $json.collectCount }}",
              "type": "number"
            },
            {
              "id": "caad9106-5e73-4057-83dd-38a100433968",
              "name": "Hashtag",
              "value": "={{ $json.hashtags }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        800,
        80
      ],
      "id": "d1428494-6779-4828-b195-01576a51415d",
      "name": "Lấy thông tin TikTok"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Tên Kênh": "={{ $json['Tên kênh'] }}",
            "Subscriber": "={{ $json['Số Sub'] }}",
            "Url": "={{ $json.Url }}",
            "Video Url": "={{ $json['Video Url'] }}",
            "Lượt xem": "={{ $json.Views }}",
            "Likes": "={{ $json.Likes }}",
            "Comment": "={{ $json.Comment }}",
            "Mô tả": "={{ $json['Mô tả'] }}",
            "Hashtag": "={{ $json.Hashtag }}",
            "Ngày đăng video": "={{ $json['Ngày đăng video'] }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Tên Kênh",
              "displayName": "Tên Kênh",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Subscriber",
              "displayName": "Subscriber",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Url",
              "displayName": "Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Video Url",
              "displayName": "Video Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Lượt xem",
              "displayName": "Lượt xem",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "displayName": "Likes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Comment",
              "displayName": "Comment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Mô tả",
              "displayName": "Mô tả",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Hashtag",
              "displayName": "Hashtag",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Ngày đăng video",
              "displayName": "Ngày đăng video",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1008,
        1056
      ],
      "id": "024ab37d-0b7d-42e9-ba81-9f2cd03589a5",
      "name": "Cập nhật Sheet YouTube"
    },
    {
      "parameters": {
        "operation": "Run actor and get dataset",
        "actorSource": "store",
        "actorId": {
          "__rl": true,
          "value": "shu8hvrXbJbY3Eb9W",
          "mode": "list",
          "cachedResultName": "Instagram Scraper (apify/instagram-scraper)",
          "cachedResultUrl": "https://console.apify.com/actors/shu8hvrXbJbY3Eb9W/input"
        },
        "customBody": "={\n    \"addParentData\": false,\n    \"directUrls\": [\n        \"https://www.instagram.com/explore/tags/thoitrangnu/\",\n        \"https://www.instagram.com/explore/tags/vayxinh/\",\n        \"https://www.instagram.com/explore/tags/dambody/\"\n    ],\n    \"resultsLimit\": 20,\n    \"resultsType\": \"posts\",\n    \"searchLimit\": 20\n}",
        "timeout": {}
      },
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 1,
      "position": [
        432,
        1392
      ],
      "id": "a741a287-6705-4938-8717-aa2ae8d25045",
      "name": "Get Instagram Data"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "66e9da73-d2d7-4618-acda-76260b6627fd",
              "name": "Tên kênh",
              "value": "={{ $json.channelName }}",
              "type": "string"
            },
            {
              "id": "906dd94b-74dc-4cab-a43d-d1c810d111fb",
              "name": "Số Sub",
              "value": "={{ $json.numberOfSubscribers }}",
              "type": "number"
            },
            {
              "id": "bad9f81b-6120-4759-b751-b4561172dc54",
              "name": "Url",
              "value": "={{ $json.channelUrl }}",
              "type": "string"
            },
            {
              "id": "1a15437e-26fd-4e29-949e-3a1b9c9290c2",
              "name": "Video Url",
              "value": "={{ $json.url }}",
              "type": "string"
            },
            {
              "id": "7f274287-f654-47ae-856c-2569d2e9282a",
              "name": "Views",
              "value": "={{ $json.viewCount }}",
              "type": "number"
            },
            {
              "id": "03ae0630-544c-46e3-8b9b-338a19449c6a",
              "name": "Likes",
              "value": "={{ $json.likes }}",
              "type": "number"
            },
            {
              "id": "4acfb2f3-3330-49d2-b20e-ff4571451c34",
              "name": "Comment",
              "value": "={{ $json.commentsCount }}",
              "type": "number"
            },
            {
              "id": "e2a12708-e389-4e0d-994e-ad88ec27e6e5",
              "name": "Mô tả",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "bf6b8cfe-5f3b-4632-b159-6477ee2874e0",
              "name": "Hashtag",
              "value": "={{ $json.hashtags }}",
              "type": "string"
            },
            {
              "id": "9ec08b0d-b327-4feb-a0e7-3c1ab77196be",
              "name": "Ngày đăng video",
              "value": "={{ $json.date }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        800,
        1056
      ],
      "id": "cef030bc-f612-4822-9ab7-e3b40296b14e",
      "name": "Lấy thông tin YouTube"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "66e9da73-d2d7-4618-acda-76260b6627fd",
              "name": "Tên kênh",
              "value": "={{ $json.ownerFullName }}",
              "type": "string"
            },
            {
              "id": "906dd94b-74dc-4cab-a43d-d1c810d111fb",
              "name": "Handle Kênh",
              "value": "={{ $json.ownerUsername }}",
              "type": "string"
            },
            {
              "id": "bad9f81b-6120-4759-b751-b4561172dc54",
              "name": "Id kênh",
              "value": "={{ $json.ownerId }}",
              "type": "number"
            },
            {
              "id": "1a15437e-26fd-4e29-949e-3a1b9c9290c2",
              "name": "Loại kênh",
              "value": "={{ $json.productType }}",
              "type": "string"
            },
            {
              "id": "7f274287-f654-47ae-856c-2569d2e9282a",
              "name": "Link video",
              "value": "={{ $json.url }}",
              "type": "string"
            },
            {
              "id": "03ae0630-544c-46e3-8b9b-338a19449c6a",
              "name": "Caption",
              "value": "={{ $json.caption }}",
              "type": "string"
            },
            {
              "id": "4acfb2f3-3330-49d2-b20e-ff4571451c34",
              "name": "Hashtag",
              "value": "={{ $json.hashtags }}",
              "type": "string"
            },
            {
              "id": "154ec6ab-f175-4531-9846-95edc609154d",
              "name": "Ngày đăng",
              "value": "={{ $json.timestamp }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        816,
        1392
      ],
      "id": "3b7c3e01-f728-40cb-a306-d91b6078a209",
      "name": "Lấy thông tin Instagram"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Caption": "={{ $json.Caption }}",
            "Ngày Đăng": "={{ $json['Ngày đăng'] }}",
            "Username": "={{ $json.Username }}",
            "Link user": "={{ $json.Userlink }}",
            "Link video": "={{ $json['Tiktok Url'] }}",
            "Likes": "={{ $json.Likes }}",
            "Shares": "={{ $json.Shares }}",
            "View": "={{ $json.View }}",
            "Lưu": "={{ $json.Save }}",
            "Comment": "={{ $json.Comment }}",
            "Hasgtag": "={{ $json.Hashtag.map(item => item.name).join(', ') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Caption",
              "displayName": "Caption",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Ngày Đăng",
              "displayName": "Ngày Đăng",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Username",
              "displayName": "Username",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Link user",
              "displayName": "Link user",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Link video",
              "displayName": "Link video",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "displayName": "Likes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Shares",
              "displayName": "Shares",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "View",
              "displayName": "View",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Lưu",
              "displayName": "Lưu",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Comment",
              "displayName": "Comment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Hasgtag",
              "displayName": "Hasgtag",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1008,
        80
      ],
      "id": "1300891d-407f-42a5-8ce9-ff737adf86f5",
      "name": "Cập nhật Sheet TikTok"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Tên Page": "={{ $json['Tên Page'] }}",
            "Follower": "={{ $json.Follower }}",
            "Likes": "={{ $json.Likes }}",
            "Url": "={{ $json.Url }}",
            "Thành lập": "={{ $json['Thành lập'] }}",
            "Thông tin": "={{ $json.Info }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Tên Page",
              "displayName": "Tên Page",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Follower",
              "displayName": "Follower",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "displayName": "Likes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Url",
              "displayName": "Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Thành lập",
              "displayName": "Thành lập",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Thông tin",
              "displayName": "Thông tin",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        800,
        704
      ],
      "id": "37afa1b8-02a9-4a84-9deb-0eca07f41d6b",
      "name": "Cập nhật Sheet FB"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "-- Chọn của bạn --",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Tên Kênh": "={{ $json['Tên kênh'] }}",
            "Handle Kênh": "={{ $json['Handle Kênh'] }}",
            "ID Kênh": "={{ $json['Id kênh'] }}",
            "Loại kênh": "={{ $json['Loại kênh'] }}",
            "Link Video": "={{ $json['Link video'] }}",
            "Caption": "={{ $json.Caption }}",
            "Hashtag": "={{ $json.Hashtag }}",
            "Ngày đăng video": "={{ $json['Ngày đăng'] }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Tên Kênh",
              "displayName": "Tên Kênh",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Handle Kênh",
              "displayName": "Handle Kênh",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ID Kênh",
              "displayName": "ID Kênh",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Loại kênh",
              "displayName": "Loại kênh",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Link Video",
              "displayName": "Link Video",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Caption",
              "displayName": "Caption",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Hashtag",
              "displayName": "Hashtag",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Mô tả",
              "displayName": "Mô tả",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Ngày đăng video",
              "displayName": "Ngày đăng video",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1024,
        1392
      ],
      "id": "946db922-daa2-4b70-ac39-50759f43d290",
      "name": "Cập nhật Sheet Instagram"
    },
    {
      "parameters": {
        "content": "## CHỌN NỀN TẢNG CÀO DỮ LIỆU",
        "height": 544,
        "width": 672,
        "color": "#083949"
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -768,
        304
      ],
      "id": "3c87a0bd-5196-41fd-88af-a72148d11356",
      "name": "Sticky Note4"
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Get Tiktok Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Facebook Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Youtube Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Instagram Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Tiktok Data": {
      "main": [
        [
          {
            "node": "Lọc TikTok Clone",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Facebook Data": {
      "main": [
        [
          {
            "node": "Lọc Trang cá nhân",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Youtube Data": {
      "main": [
        [
          {
            "node": "Lọc kênh rác",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lọc kênh rác": {
      "main": [
        [
          {
            "node": "Lấy thông tin YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lọc Trang cá nhân": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lọc TikTok Clone": {
      "main": [
        [
          {
            "node": "Lấy thông tin TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Lọc Data lần 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lọc Data lần 2": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort": {
      "main": [
        [
          {
            "node": "Lấy thông tin FB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lấy thông tin FB": {
      "main": [
        [
          {
            "node": "Cập nhật Sheet FB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lấy thông tin TikTok": {
      "main": [
        [
          {
            "node": "Cập nhật Sheet TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Instagram Data": {
      "main": [
        [
          {
            "node": "Lấy thông tin Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lấy thông tin YouTube": {
      "main": [
        [
          {
            "node": "Cập nhật Sheet YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lấy thông tin Instagram": {
      "main": [
        [
          {
            "node": "Cập nhật Sheet Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "nodeGroups": [],
  "tags": []
}
