{
  "name": "Daily YouTube Short from your AI video generator, 9:16 + logo + loudness without ffmpeg",
  "nodes": [
    {
      "parameters": {
        "content": "## Replace this node\nThis Set node stands in for your video generator. Put the node that produces the clip here — Kling, Sora, Runway, HeyGen, an ElevenLabs voice-over step or an HTTP Request against your own render service — and make sure it hands the next node a public `video_url` plus a `title` and a `description`.",
        "height": 240,
        "width": 340,
        "color": 4
      },
      "id": "b2c3d4e5-1001-4000-8000-000000000011",
      "name": "Sticky: generator",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "content": "## Brand-Pipe\nHeader Auth credential named `Brand-Pipe API Key`: header name `X-API-Key`, value your key from https://www.brand-pipe.com. One call fits the clip to 9:16, puts your logo bottom-right and normalises loudness to −14 LUFS; the answer carries a signed download link that is valid for one hour. Failed jobs are refunded (except an encode that hits the time limit), and the lower branch stops the run with the message from the API.",
        "height": 280,
        "width": 380,
        "color": 4
      },
      "id": "b2c3d4e5-1002-4000-8000-000000000012",
      "name": "Sticky: brand-pipe",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        360,
        0
      ]
    },
    {
      "parameters": {
        "content": "## YouTube OAuth\nThe upload node is disabled so the workflow runs end to end without YouTube. To enable it: create a Google Cloud project, turn on the *YouTube Data API v3*, create an OAuth client of type *Web application* and paste n8n's OAuth redirect URL into it. Then add a **YouTube OAuth2 API** credential in n8n, connect the account that owns the channel, pick a category, set `privacyStatus` and enable the node. Uploads through the API start as private on unverified projects and the daily quota allows a handful of videos.",
        "height": 300,
        "width": 470,
        "color": 4
      },
      "id": "b2c3d4e5-1003-4000-8000-000000000013",
      "name": "Sticky: youtube",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        760,
        0
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "days",
              "triggerAtHour": 9,
              "triggerAtMinute": 0
            }
          ]
        }
      },
      "id": "b2c3d4e5-0001-4000-8000-000000000001",
      "name": "Every day at 09:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        40,
        380
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "g1",
              "name": "video_url",
              "value": "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4",
              "type": "string"
            },
            {
              "id": "g2",
              "name": "title",
              "value": "How a rabbit outsmarts three bullies",
              "type": "string"
            },
            {
              "id": "g3",
              "name": "description",
              "value": "A short clip, formatted and normalised with Brand-Pipe.",
              "type": "string"
            },
            {
              "id": "g4",
              "name": "logo_url",
              "value": "https://www.brand-pipe.com/logo.png",
              "type": "string"
            },
            {
              "id": "g5",
              "name": "format",
              "value": "vertical",
              "type": "string"
            },
            {
              "id": "g6",
              "name": "audio_normalize",
              "value": true,
              "type": "boolean"
            }
          ]
        },
        "options": {}
      },
      "id": "b2c3d4e5-0002-4000-8000-000000000002",
      "name": "Your video generator",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        260,
        380
      ],
      "notes": "Placeholder. Replace with your generator node; it must output video_url, title and description."
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.brand-pipe.com/v1/process",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ video_url: $json.video_url, logo_url: $json.logo_url, format: $json.format, audio_normalize: $json.audio_normalize }) }}",
        "options": {
          "timeout": 300000,
          "response": {
            "response": {
              "neverError": true
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $execution.id }}-{{ $itemIndex }}"
            }
          ]
        }
      },
      "id": "b2c3d4e5-0003-4000-8000-000000000003",
      "name": "Brand-Pipe process",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        500,
        380
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "Brand-Pipe API Key"
        }
      },
      "notes": "Credential: Header Auth, name X-API-Key, value your key."
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.success }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "id": "b2c3d4e5-0004-4000-8000-000000000004",
      "name": "Success?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        740,
        380
      ]
    },
    {
      "parameters": {
        "url": "={{ $json.data.result_url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "video"
            }
          }
        }
      },
      "id": "b2c3d4e5-0005-4000-8000-000000000005",
      "name": "Download result",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        960,
        300
      ],
      "notes": "Binary property 'video' holds the finished MP4."
    },
    {
      "parameters": {
        "errorMessage": "=Brand-Pipe error: {{ $json.error }}"
      },
      "id": "b2c3d4e5-0006-4000-8000-000000000006",
      "name": "Stop with error",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        960,
        480
      ]
    },
    {
      "parameters": {
        "resource": "video",
        "operation": "upload",
        "title": "={{ $('Your video generator').first().json.title }} #Shorts",
        "regionCode": "DE",
        "categoryId": "22",
        "binaryProperty": "video",
        "options": {
          "description": "={{ $('Your video generator').first().json.description }}",
          "privacyStatus": "private",
          "selfDeclaredMadeForKids": false,
          "notifySubscribers": false,
          "tags": "shorts"
        }
      },
      "id": "b2c3d4e5-0007-4000-8000-000000000007",
      "name": "Upload video",
      "type": "n8n-nodes-base.youTube",
      "typeVersion": 1,
      "position": [
        1180,
        300
      ],
      "disabled": true,
      "notes": "Enable after adding the YouTube OAuth2 credential. '#Shorts' in the title marks a vertical clip under 3 min as a Short."
    }
  ],
  "connections": {
    "Every day at 09:00": {
      "main": [
        [
          {
            "node": "Your video generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Your video generator": {
      "main": [
        [
          {
            "node": "Brand-Pipe process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Brand-Pipe process": {
      "main": [
        [
          {
            "node": "Success?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success?": {
      "main": [
        [
          {
            "node": "Download result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop with error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download result": {
      "main": [
        [
          {
            "node": "Upload video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
