{
  "name": "VietlinhAI | Tự đăng video lên TikTok, Facebook, YouTube",
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.buffer.com/graphql",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "{\n  \"query\": \"query GetChannels($organizationId: OrganizationId!) { channels(input: { organizationId: $organizationId }) { id name displayName service type isDisconnected isLocked } }\",\n  \"variables\": {\n    \"organizationId\": \"YOUR_BUFFER_ORGANIZATION_ID\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        -1728,
        496
      ],
      "id": "cbb1c0f1-d7ac-45b0-a263-ca10d559c27d",
      "name": "Lấy ID kênh"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -2304,
        96
      ],
      "id": "71ae88e0-cc8e-47c4-bbdf-e9a782b74e17",
      "name": "Schedule Trigger chạy lúc 9h"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.buffer.com/graphql",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{\n{\n  query: \"mutation CreatePost($input: CreatePostInput!) { createPost(input: $input) { ... on PostActionSuccess { post { id text channelId status dueAt assets { id mimeType source } } } ... on MutationError { message } } }\",\n  variables: {\n    input: {\n      text: $('Sheet Auto Post').item.json['Caption + Hashtag Page'],\n      channelId: \"YOUR_FACEBOOK_CHANNEL_ID\",\n      schedulingType: \"automatic\",\n      mode: \"shareNow\",\n      metadata: {\n        facebook: {\n          type: \"reel\"\n        }\n      },\n      assets: [\n        {\n          video: {\n            url: $('Upload an asset from file data').item.json.secure_url\n          }\n        }\n      ]\n    }\n  }\n}\n}}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        -672,
        -160
      ],
      "id": "30fc0659-110a-42e7-bf64-83c8250b0538",
      "name": "Post Facebook",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.buffer.com/graphql",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{\n{\n  query: \"mutation CreatePost($input: CreatePostInput!) { createPost(input: $input) { ... on PostActionSuccess { post { id text channelId status dueAt assets { id mimeType source } } } ... on MutationError { message } } }\",\n  variables: {\n    input: {\n      text: $('Sheet Auto Post').item.json['Caption + Hashtag TikTok'],\n      channelId: \"YOUR_TIKTOK_CHANNEL_ID\",\n      schedulingType: \"automatic\",\n      mode: \"shareNow\",\n      assets: [\n        {\n          video: {\n            url: $('Upload an asset from file data').item.json.secure_url\n          }\n        }\n      ]\n    }\n  }\n}\n}}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        -672,
        96
      ],
      "id": "a906a14b-f852-466f-99d3-127f1ce13e03",
      "name": "Post TikTok",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.buffer.com/graphql",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{\n{\n  query: \"mutation CreatePost($input: CreatePostInput!) { createPost(input: $input) { ... on PostActionSuccess { post { id text channelId status dueAt assets { id mimeType source } } } ... on MutationError { message } } }\",\n  variables: {\n    input: {\n      text: String($items(\"Sheet Auto Post\")[0].json[\"Caption + Hashtag Youtube\"] || \"\").trim(),\n      channelId: \"YOUR_YOUTUBE_CHANNEL_ID\",\n      schedulingType: \"automatic\",\n      mode: \"shareNow\",\n      metadata: {\n        youtube: {\n          title: String($items(\"Sheet Auto Post\")[0].json[\"Youtube Title\"] || \"\").trim().slice(0, 100),\n          privacy: \"public\",\n          categoryId: \"26\",\n          madeForKids: false,\n          notifySubscribers: false,\n          embeddable: true\n        }\n      },\n      assets: [\n        {\n          video: {\n            url: $items(\"Upload an asset from file data\")[0].json.secure_url\n          }\n        }\n      ]\n    }\n  }\n}\n}}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        -672,
        368
      ],
      "id": "eca1afe2-8279-48de-961e-9336195cf795",
      "name": "Post YouTube",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json[\"Url\"] }}",
          "mode": "url"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -1712,
        96
      ],
      "id": "f7002ab6-e4d5-456b-914b-277c5dc62e88",
      "name": "Tải video Google drive"
    },
    {
      "parameters": {
        "operation": "uploadFile",
        "resource_type_file": "video",
        "additionalFieldsFile": {}
      },
      "type": "n8n-nodes-cloudinary.cloudinary",
      "typeVersion": 1,
      "position": [
        -1504,
        96
      ],
      "id": "7ad2ef1f-9e5e-4255-ad00-fc20e8af3846",
      "name": "Upload an asset from file data"
    },
    {
      "parameters": {
        "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": ""
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Status",
              "lookupValue": "Ready to Post"
            }
          ]
        },
        "combineFilters": "AND",
        "options": {
          "returnAllMatches": "returnFirstMatch"
        }
      },
      "id": "ce40ed0f-2160-4631-b5ba-8413f8715ac6",
      "name": "Sheet Auto Post",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.2,
      "position": [
        -2048,
        96
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "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": {
            "Title": "={{ $('Sheet Auto Post').first().json.Title }}",
            "Youtube Post Status": "Posted"
          },
          "matchingColumns": [
            "Title"
          ],
          "schema": [
            {
              "id": "Title",
              "displayName": "Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Caption + Hashtag TikTok",
              "displayName": "Caption + Hashtag TikTok",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Page",
              "displayName": "Caption + Hashtag Page",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Youtube",
              "displayName": "Caption + Hashtag Youtube",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Title",
              "displayName": "Youtube Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Page Post Status",
              "displayName": "Page Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Tiktok Post Status",
              "displayName": "Tiktok Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Post Status",
              "displayName": "Youtube Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Url",
              "displayName": "Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "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": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        176,
        352
      ],
      "id": "f3725358-ef56-42d5-a56d-38b292cce6c3",
      "name": "Cập nhật trạng thái Post YouTube"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "96ef961b-ca7a-47c3-97f8-e64e3fb40072",
              "leftValue": "={{ !!$json.data?.createPost?.post?.id }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -240,
        -160
      ],
      "id": "2077196a-8295-4964-96b5-70313239bc07",
      "name": "If"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "e4f3b4cc-c248-40e5-b09a-203ff5bd1f3b",
              "leftValue": "={{ !!$json.data?.createPost?.post?.id }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -240,
        96
      ],
      "id": "74a6501a-46ad-459d-8bac-29790b2dfc4f",
      "name": "If1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "50123d9e-7c8e-48a3-9e27-d7f5f8209f23",
              "leftValue": "={{ !!$json.data?.createPost?.post?.id }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -240,
        368
      ],
      "id": "a6935847-6038-43c2-8822-2ee8cc3d2140",
      "name": "If2"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        688,
        128
      ],
      "id": "d38ed8a3-d06d-4d46-a422-12f698a6b1b5",
      "name": "Merge"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        560,
        -48
      ],
      "id": "5d9f2d73-66c9-4ba0-af9b-15d5c062c512",
      "name": "Merge1"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -928,
        -160
      ],
      "id": "61ce5f49-0f6a-4770-b7d6-6683c3bee256",
      "name": "Wait",
      "webhookId": "21dbb1bc-211d-44da-a07f-1c27bc5b3523"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -928,
        96
      ],
      "id": "db7b9370-284d-4cda-b99d-b07c37a81e81",
      "name": "Wait1",
      "webhookId": "9c5c8700-0282-417a-8a3e-0e3b65dd8171"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -928,
        368
      ],
      "id": "375583d7-7759-4913-91ef-d9082c690046",
      "name": "Wait2",
      "webhookId": "bb52d788-1aa0-462a-8644-f98a16705019"
    },
    {
      "parameters": {
        "amount": 15
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -464,
        -160
      ],
      "id": "a9b77246-cfc4-49f2-b1a5-f4a31ec316d2",
      "name": "Wait3",
      "webhookId": "35e5f0d7-c94d-495e-b588-7f3a3e86d590"
    },
    {
      "parameters": {
        "amount": 15
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -464,
        96
      ],
      "id": "66b09461-d100-4139-a624-847666a5652c",
      "name": "Wait4",
      "webhookId": "060398a6-a7d0-4adb-a403-37d03af6fdda"
    },
    {
      "parameters": {
        "operation": "update",
        "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": {
            "Title": "={{ $('Sheet Auto Post').first().json.Title }}",
            "Page Post Status": "Posted"
          },
          "matchingColumns": [
            "Title"
          ],
          "schema": [
            {
              "id": "Title",
              "displayName": "Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Caption + Hashtag TikTok",
              "displayName": "Caption + Hashtag TikTok",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Page",
              "displayName": "Caption + Hashtag Page",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Youtube",
              "displayName": "Caption + Hashtag Youtube",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Title",
              "displayName": "Youtube Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Page Post Status",
              "displayName": "Page Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Tiktok Post Status",
              "displayName": "Tiktok Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Post Status",
              "displayName": "Youtube Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Url",
              "displayName": "Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "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": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        176,
        -176
      ],
      "id": "5e4e91ee-ce6f-4a5c-9e62-756fb7d6f2f6",
      "name": "Update Post Page"
    },
    {
      "parameters": {
        "operation": "update",
        "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": {
            "Title": "={{ $('Sheet Auto Post').first().json.Title }}",
            "Tiktok Post Status": "Posted"
          },
          "matchingColumns": [
            "Title"
          ],
          "schema": [
            {
              "id": "Title",
              "displayName": "Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Caption + Hashtag TikTok",
              "displayName": "Caption + Hashtag TikTok",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Page",
              "displayName": "Caption + Hashtag Page",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Youtube",
              "displayName": "Caption + Hashtag Youtube",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Title",
              "displayName": "Youtube Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Page Post Status",
              "displayName": "Page Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Tiktok Post Status",
              "displayName": "Tiktok Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Youtube Post Status",
              "displayName": "Youtube Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Url",
              "displayName": "Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "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": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        176,
        80
      ],
      "id": "6eb075c5-19f6-45da-939e-d2a47ac1a97d",
      "name": "Update Post TikTok"
    },
    {
      "parameters": {
        "amount": 15
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -464,
        368
      ],
      "id": "d5ec53ea-e148-4fe2-9e95-bc993264b53f",
      "name": "Wait5",
      "webhookId": "c9c44299-1b66-43aa-a818-502029a3221d"
    },
    {
      "parameters": {
        "operation": "update",
        "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": {
            "Title": "={{ $('Sheet Auto Post').first().json.Title }}",
            "Status": "Posted"
          },
          "matchingColumns": [
            "Title"
          ],
          "schema": [
            {
              "id": "Title",
              "displayName": "Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Caption + Hashtag TikTok",
              "displayName": "Caption + Hashtag TikTok",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Page",
              "displayName": "Caption + Hashtag Page",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Youtube",
              "displayName": "Caption + Hashtag Youtube",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Title",
              "displayName": "Youtube Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Page Post Status",
              "displayName": "Page Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Tiktok Post Status",
              "displayName": "Tiktok Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Post Status",
              "displayName": "Youtube Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Url",
              "displayName": "Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        944,
        128
      ],
      "id": "42d6944f-d7a3-4545-b87e-e3c4df823a1b",
      "name": "Update Content Auto Post"
    },
    {
      "parameters": {
        "operation": "update",
        "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": {
            "Title": "={{ $('Sheet Auto Post').first().json.Title }}",
            "Status": "Failed"
          },
          "matchingColumns": [
            "Title"
          ],
          "schema": [
            {
              "id": "Title",
              "displayName": "Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Caption + Hashtag TikTok",
              "displayName": "Caption + Hashtag TikTok",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Page",
              "displayName": "Caption + Hashtag Page",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption + Hashtag Youtube",
              "displayName": "Caption + Hashtag Youtube",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Title",
              "displayName": "Youtube Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Page Post Status",
              "displayName": "Page Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Tiktok Post Status",
              "displayName": "Tiktok Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Youtube Post Status",
              "displayName": "Youtube Post Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Url",
              "displayName": "Url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        944,
        432
      ],
      "id": "18b60306-5a4f-4b71-92ad-7923eba377ac",
      "name": "Update Failed"
    },
    {
      "parameters": {
        "content": "## LÊN LỊCH ĐĂNG VIDEO",
        "height": 544,
        "width": 480,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -2400,
        -96
      ],
      "id": "f45556fb-fda8-4657-b18b-d075858d1d89",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## POST VIDEO LÊN TIKTOK, FACEBOOK, YOUTUBE\n",
        "height": 864,
        "width": 1184,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1248,
        -256
      ],
      "id": "1d603d9a-fbe3-4fe2-b8dd-bc309eb69b40",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## LƯU VIDEO LÊN CLOUD\n",
        "height": 544,
        "width": 528,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1856,
        -96
      ],
      "id": "8951cd08-3b5d-4ddb-8d6c-60d921e0dfd5",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## CẬP NHẬT KẾT QUẢ\n",
        "height": 880,
        "width": 1184,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        48,
        -272
      ],
      "id": "3b4651d7-7b98-4403-9225-0741e9f36d5f",
      "name": "Sticky Note3"
    }
  ],
  "pinData": {},
  "connections": {
    "Lấy ID kênh": {
      "main": [
        []
      ]
    },
    "Schedule Trigger chạy lúc 9h": {
      "main": [
        [
          {
            "node": "Sheet Auto Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tải video Google drive": {
      "main": [
        [
          {
            "node": "Upload an asset from file data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload an asset from file data": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheet Auto Post": {
      "main": [
        [
          {
            "node": "Tải video Google drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Facebook": {
      "main": [
        [
          {
            "node": "Wait3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post TikTok": {
      "main": [
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post YouTube": {
      "main": [
        [
          {
            "node": "Wait5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Update Post Page",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Update Post TikTok",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cập nhật trạng thái Post YouTube": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Cập nhật trạng thái Post YouTube",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Update Content Auto Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Post Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Post TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Post YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait3": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Post Page": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Post TikTok": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Wait5": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "tags": []
}
