{
  "updatedAt": "2025-01-03T07:01:57.000Z",
  "createdAt": "2025-01-03T06:36:11.546Z",
  "id": "OSRNZq4z8ndvBQM4",
  "name": "Template youtube video to youtube",
  "description": null,
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "content": "## Quote youtube\nkhoảng 6 video / ngày\n\nNhưng có thể tạo template trước"
      },
      "id": "a05595cc-5584-41f2-8a80-76f4bb4d9449",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2340,
        -160
      ]
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        40,
        -60
      ],
      "id": "418b883a-dd9a-4366-ad0e-8725f4a99343",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cd866b4a-5371-41ef-ba9e-0bea53f4d3b4",
              "name": "videoLink",
              "value": "https://video-previews.elements.envatousercontent.com/h264-video-previews/158113.mp4",
              "type": "string"
            },
            {
              "id": "20bf42d5-5af4-4ae8-b198-9a93e429c010",
              "name": "title",
              "value": "Video Demo",
              "type": "string"
            },
            {
              "id": "d88982a7-584d-4eb2-966e-d5fa1644b2cd",
              "name": "description",
              "value": "mô tả video",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        260,
        -60
      ],
      "id": "b073e9f5-1041-4dfb-b565-a4eb678fea44",
      "name": "videoLink"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://www.googleapis.com/upload/youtube/v3/videos?part=snippet,status&uploadType=resumable",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "youTubeOAuth2Api",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "X-Upload-Content-Type",
              "value": "video/webm"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "RAW/JSON",
        "body": "={\n  \"snippet\": {\n    \"title\": \"{{ $json.title }}\",\n    \"description\": \"{{ $json.description }}\",\n    \"tags\": \"\",\n    \"categoryId\": \"\",\n    \"defaultLanguage\": \"vi\",\n    \"defaultAudioLanguage\": \"vi\"\n  },\n  \"status\": {\n    \"privacyStatus\": \"unlisted\",\n    \"license\": \"youtube\",\n    \"embeddable\": true,\n    \"publicStatsViewable\": true,\n    \"madeForKids\": false\n  }\n}\n",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        }
      },
      "id": "ee55d912-ed49-4bef-9c69-e4e10363e1ca",
      "name": "tạo cấu trúc video",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        140,
        280
      ],
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "e1jiCdSuxe1ceu2C",
          "name": "YouTube DangNgocBinh"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $('videoLink').item.json.videoLink }}",
        "options": {}
      },
      "id": "02f219f6-5837-4f9d-a6af-e9ef20a827c7",
      "name": "tải video",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        460,
        -60
      ]
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "={{ $node[\"tạo cấu trúc video\"].json.headers.location }} ",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "youTubeOAuth2Api",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "video/webm"
            }
          ]
        },
        "sendBody": true,
        "contentType": "binaryData",
        "inputDataFieldName": "data",
        "options": {}
      },
      "id": "d10a6715-7c79-4d25-a126-746a56bacc37",
      "name": "upload youtube",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        340,
        280
      ],
      "notesInFlow": true,
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "e1jiCdSuxe1ceu2C",
          "name": "YouTube DangNgocBinh"
        }
      },
      "notes": "Sử dụng. Nếu node youtube kia không hoạt động được"
    },
    {
      "parameters": {
        "resource": "video",
        "operation": "upload",
        "title": "={{ $('videoLink').item.json.title }}",
        "regionCode": "VN",
        "categoryId": "27",
        "options": {
          "description": "={{ $('videoLink').item.json.description }}",
          "embeddable": true,
          "privacyStatus": "unlisted",
          "selfDeclaredMadeForKids": false
        }
      },
      "type": "n8n-nodes-base.youTube",
      "typeVersion": 1,
      "position": [
        660,
        -60
      ],
      "id": "6ff050a9-7137-4b00-be52-82ef8d265fe7",
      "name": "upload",
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "e1jiCdSuxe1ceu2C",
          "name": "YouTube DangNgocBinh"
        }
      }
    },
    {
      "parameters": {
        "content": "## Up bằng HTTP Node\nSử dụng khi Node Youtube bị lỗi",
        "height": 280,
        "width": 580
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        60,
        180
      ],
      "id": "b831727b-b9ca-4157-ab76-08697a93eabe",
      "name": "Sticky Note1"
    }
  ],
  "connections": {
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "videoLink",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "videoLink": {
      "main": [
        [
          {
            "node": "tải video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "tạo cấu trúc video": {
      "main": [
        [
          {
            "node": "upload youtube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "tải video": {
      "main": [
        [
          {
            "node": "upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "upload youtube": {
      "main": [
        []
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "pinData": {},
  "versionId": "47b2b2ee-0a7f-441f-b399-4f70f69d473e",
  "activeVersionId": null,
  "versionCounter": 1,
  "triggerCount": 1,
  "shared": [
    {
      "updatedAt": "2025-01-03T06:36:11.569Z",
      "createdAt": "2025-01-03T06:36:11.569Z",
      "role": "workflow:owner",
      "workflowId": "OSRNZq4z8ndvBQM4",
      "projectId": "Nlp7kXCVcAfb0cmG",
      "project": {
        "updatedAt": "2024-07-25T03:06:26.102Z",
        "createdAt": "2024-07-25T03:06:26.102Z",
        "id": "Nlp7kXCVcAfb0cmG",
        "name": "Bình Đặng <dangngocbinh.dnb@gmail.com>",
        "type": "personal",
        "icon": null,
        "description": null,
        "creatorId": "92f1ca82-c19e-4a7d-8458-93b65f67f4c7"
      }
    }
  ],
  "tags": [
    {
      "updatedAt": "2024-10-04T03:03:40.628Z",
      "createdAt": "2024-10-04T03:03:40.628Z",
      "id": "MW10UcI4NI01thiG",
      "name": "share"
    }
  ],
  "activeVersion": null
}