{
  "name": "Create hours-long wave music videos with Suno, ffmpeg-api and YouTube",
  "nodes": [
    {
      "id": "33d618d5-4a8a-4755-85e5-7c62001ace19",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 832,
        "height": 256,
        "content": "## Input Data & Directory Initialization\nCollect user input from the form and initialize a working directory using ffmpeg-api. This directory will be used to store videos, audio files, and intermediat"
      }
    },
    {
      "id": "65f3273d-849d-4159-9747-c9d8c63eb174",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        256
      ],
      "parameters": {
        "width": 1184,
        "height": 320,
        "content": "## Download Background Video\nGenerate a storage path, download the background video from the provided URL, upload it to ffmpeg-api storage, and retrieve the processed video reference for later merging"
      }
    },
    {
      "id": "e159a727-f664-4d03-90ab-c8c78e820d9f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        576
      ],
      "parameters": {
        "width": 1968,
        "height": 368,
        "content": "## AI Music Generation (Suno)\nUse an AI agent to convert the user’s music theme into structured Suno prompts, generate multiple songs, poll for completion, and log song metadata for downstream process"
      }
    },
    {
      "id": "0cac5fe9-94ad-4455-90ff-eb9054867131",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        944
      ],
      "parameters": {
        "width": 1968,
        "height": 272,
        "content": "## Download Songs & Merge Audio + Video\nDownload generated songs, upload them to ffmpeg-api storage, concatenate multiple tracks into a long-form audio file, and merge the final audio with the backgro"
      }
    },
    {
      "id": "ac2af494-38c3-442e-ba2a-2f21e97e9b2c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1216
      ],
      "parameters": {
        "width": 1968,
        "height": 448,
        "content": "## Auto Upload to YouTube"
      }
    },
    {
      "id": "35dbd224-ad12-4f0e-9d53-a8c60b5978f8",
      "name": "Suno Wave Music Input Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        416,
        80
      ]
    },
    {
      "id": "31d465a6-ea5e-4764-97d1-79f3d0dc4087",
      "name": "Create Working Directory (ffmpeg-api)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        80
      ]
    },
    {
      "id": "2563f1c6-8e41-444b-9019-d58caf54a581",
      "name": "Prepare Video Path (ffmpeg-api)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        432,
        368
      ]
    },
    {
      "id": "e0996abe-671f-4df9-86bf-dbf2cd709138",
      "name": "Download Background Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        624,
        368
      ]
    },
    {
      "id": "34f89d6f-af12-406d-a867-eda612cbe80d",
      "name": "Upload Video to Workspace (ffmpeg-api)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        368
      ]
    },
    {
      "id": "a2c526ad-f434-4f66-b525-b6b001f0cf30",
      "name": "Retrieve Uploaded Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        992,
        368
      ]
    },
    {
      "id": "497703e7-8b5d-4f40-b71a-d1d4135425a3",
      "name": "Generate Music Prompts (AI Agent)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        384,
        688
      ]
    },
    {
      "id": "9304490a-eafb-417f-b9c8-76858901f232",
      "name": "Gemini LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        288,
        784
      ]
    },
    {
      "id": "525a92b0-8fae-45cf-8c06-487a93b546a4",
      "name": "Music Prompt Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        560,
        816
      ]
    },
    {
      "id": "ec9cd4fd-54fd-4303-89bd-ab799732b0a1",
      "name": "Split Music Requests",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        704,
        688
      ]
    },
    {
      "id": "f7cf0234-12bb-4f22-9cde-b58594a6cafb",
      "name": "Create Song (Suno API)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        688
      ]
    },
    {
      "id": "96b93ccc-2d63-443c-8640-9fa95102dea0",
      "name": "Wait for Song Rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        1120,
        688
      ]
    },
    {
      "id": "a5506c2c-f559-40f5-a20f-b7efa0df227e",
      "name": "Get Generated Song",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1312,
        688
      ]
    },
    {
      "id": "3e511dad-cd05-4dec-ab95-e4d22b6701c6",
      "name": "Check Song Status",
      "type": "n8n-nodes-base.if",
      "position": [
        1488,
        688
      ]
    },
    {
      "id": "d2ed0a72-11e7-44f8-896a-9eaf4f837ee9",
      "name": "Log Song Metadata",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1696,
        688
      ]
    },
    {
      "id": "a4eaeee0-ac3a-4e8b-8af2-e6705f279772",
      "name": "Prepare Audio Path (ffmpeg-api)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        560,
        1040
      ]
    },
    {
      "id": "2d9a9cf9-a8e2-46b1-8ab1-99c21eb7dac1",
      "name": "Download Song Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        752,
        1040
      ]
    },
    {
      "id": "9cffa6cc-0626-457a-b538-fc531bd33399",
      "name": "Upload Song to Workspace (ffmpeg-api)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        928,
        1040
      ]
    },
    {
      "id": "f499745e-345a-446f-bb3e-62136db269af",
      "name": "Retrieve Uploaded Song",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1088,
        1040
      ]
    },
    {
      "id": "899ccfb9-757a-4823-9a67-af37b2baccf4",
      "name": "Aggregate Audio Tracks",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1312,
        1040
      ]
    },
    {
      "id": "3b36abd8-ad09-4561-aa2a-d47afb8ecae5",
      "name": "Concatenate Audio Tracks",
      "type": "n8n-nodes-base.code",
      "position": [
        1504,
        1040
      ]
    },
    {
      "id": "19aeff49-8eb7-4735-bd8d-788a84f2aaee",
      "name": "Merge Audio with Video (ffmpeg-api)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1696,
        1040
      ]
    },
    {
      "id": "ef34a12b-91db-4361-a854-8ffd0df86492",
      "name": "Generate SEO Title & Description",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        784,
        1296
      ]
    },
    {
      "id": "0f9fbac0-2f0c-4ba7-85d4-3bc96fa4f2cc",
      "name": "Gemini LLM1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        704,
        1456
      ]
    },
    {
      "id": "139d3a66-81e9-4ab4-96f0-323c6c293195",
      "name": "YouTube Metadata Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        960,
        1472
      ]
    },
    {
      "id": "6b6c6c16-d6d7-432c-848d-fba7467a8796",
      "name": "Publish YouTube Video",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1120,
        1296
      ]
    },
    {
      "id": "e4270d03-5681-4c9c-ace6-272b6f439ff4",
      "name": "Upload Media On Blotato",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        544,
        1296
      ]
    },
    {
      "id": "2f5591c0-9b4c-45c1-8fea-e5dea8c9cdaf",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        0
      ],
      "parameters": {
        "width": 576,
        "height": 1152,
        "content": "# 🛠️ Workflow Setup Guide\n\nAuthor: [GiangxAI](https://www.youtube.com/@giangxai.official)\n\n## How it works \n- Music themes, background video URLs, and track counts are submitted via an input form  \n- "
      }
    }
  ],
  "connections": {
    "Gemini LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Music Prompts (AI Agent)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gemini LLM1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate SEO Title & Description",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Song Status": {
      "main": [
        [
          {
            "node": "Log Song Metadata",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Song Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Song Metadata": {
      "main": [
        [
          {
            "node": "Prepare Audio Path (ffmpeg-api)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Generated Song": {
      "main": [
        [
          {
            "node": "Check Song Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Song Audio": {
      "main": [
        [
          {
            "node": "Upload Song to Workspace (ffmpeg-api)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Music Requests": {
      "main": [
        [
          {
            "node": "Create Song (Suno API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Audio Tracks": {
      "main": [
        [
          {
            "node": "Concatenate Audio Tracks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Song (Suno API)": {
      "main": [
        [
          {
            "node": "Wait for Song Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Uploaded Song": {
      "main": [
        [
          {
            "node": "Aggregate Audio Tracks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Uploaded Video": {
      "main": [
        [
          {
            "node": "Generate Music Prompts (AI Agent)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Media On Blotato": {
      "main": [
        [
          {
            "node": "Generate SEO Title & Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Song Rendering": {
      "main": [
        [
          {
            "node": "Get Generated Song",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YouTube Metadata Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate SEO Title & Description",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Concatenate Audio Tracks": {
      "main": [
        [
          {
            "node": "Merge Audio with Video (ffmpeg-api)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Background Video": {
      "main": [
        [
          {
            "node": "Upload Video to Workspace (ffmpeg-api)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Music Prompt Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Music Prompts (AI Agent)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Suno Wave Music Input Form": {
      "main": [
        [
          {
            "node": "Create Working Directory (ffmpeg-api)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Audio Path (ffmpeg-api)": {
      "main": [
        [
          {
            "node": "Download Song Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Video Path (ffmpeg-api)": {
      "main": [
        [
          {
            "node": "Download Background Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate SEO Title & Description": {
      "main": [
        [
          {
            "node": "Publish YouTube Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Music Prompts (AI Agent)": {
      "main": [
        [
          {
            "node": "Split Music Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Audio with Video (ffmpeg-api)": {
      "main": [
        [
          {
            "node": "Upload Media On Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Working Directory (ffmpeg-api)": {
      "main": [
        [
          {
            "node": "Prepare Video Path (ffmpeg-api)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Song to Workspace (ffmpeg-api)": {
      "main": [
        [
          {
            "node": "Retrieve Uploaded Song",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video to Workspace (ffmpeg-api)": {
      "main": [
        [
          {
            "node": "Retrieve Uploaded Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}