{
  "name": "YouTube Upload \u2192 Social Cross-Post",
  "nodes": [
    {
      "parameters": {
        "channelId": "",
        "events": [
          "videoUploaded"
        ]
      },
      "id": "youtube",
      "name": "YouTube Trigger",
      "type": "n8n-nodes-base.youTube",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const v=$input.first().json; return {title:v.title,url:v.url||'https://youtube.com/watch?v='+v.videoId,desc:v.description?.slice(0,200)};"
      },
      "id": "extract",
      "name": "Extract Video Info",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "text": "=\ud83c\udfa5 New video: {{ $json.title }} \u2014 {{ $json.url }}"
      },
      "id": "twitter",
      "name": "Post to X",
      "type": "n8n-nodes-base.twitter",
      "typeVersion": 1,
      "position": [
        650,
        200
      ]
    },
    {
      "parameters": {
        "text": "=\ud83c\udfa5 {{ $json.title }}\n{{ $json.url }}"
      },
      "id": "discord",
      "name": "Post to Discord",
      "type": "n8n-nodes-base.discord",
      "typeVersion": 1,
      "position": [
        650,
        400
      ]
    }
  ],
  "connections": {
    "YouTube Trigger": {
      "main": [
        [
          {
            "node": "Extract Video Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Video Info": {
      "main": [
        [
          {
            "node": "Post to X",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post to Discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}