AI Income LabJoin AI Income Lab ↗

n8n Suno music video workflow: KIE, Nano Banana, Creatomate

Jump to video chapters

Watch on YouTube ↗ Subscribe on YouTube ↗

By · · 17:17 · 926 views

Written guide: n8n Music Video Workflow: Suno, Nano Banana Pro, Creatomate

An n8n workflow that takes a music genre from a form, writes a Suno prompt with OpenAI, generates instrumental tracks and a Nano Banana Pro background image through the KIE API, then assembles a video in Creatomate and saves it to Google Drive. Everything works up to the Creatomate step, which errors in the demo and still needs debugging.

Video summary

The video covers 10 parts: Intro: Automating AI music videos for a synthwave YouTube channel., Step 1: Using an n8n Form Trigger to capture the music genre., Step 2: Prompt Engineering with OpenAI GPT-4 to generate Suno-specific instructions., Integrating Suno AI via the KIE API to generate instrumental tracks., Polling Workflow: How to wait until the AI music track is finished., Generating Background Images: Using Nano Banana Pro for 2K high-res visuals., Video Assembly: Using Creatomate to stitch audio and images into a final video., Rendering and Downloading: Handling the video export process., Storage and Distribution: Automatically uploading to Google Drive and YouTube., and Summary: How to get the n8n template and joining the Skool community..

What this video covers

What you build

An n8n workflow with a form trigger, OpenAI prompt steps, KIE API calls for Suno music and Nano Banana Pro images with polling loops, a Creatomate render and a Google Drive upload.

Tools used

Key steps

Not covered

Summary written from the video's transcript and chapters.

In this video

  1. 0:00 Intro: Automating AI music videos for a synthwave YouTube channel.
  2. 1:10 Step 1: Using an n8n Form Trigger to capture the music genre.
  3. 1:36 Step 2: Prompt Engineering with OpenAI GPT-4 to generate Suno-specific instructions.
  4. 3:15 Integrating Suno AI via the KIE API to generate instrumental tracks.
  5. 5:30 Polling Workflow: How to wait until the AI music track is finished.
  6. 7:05 Generating Background Images: Using Nano Banana Pro for 2K high-res visuals.
  7. 10:40 Video Assembly: Using Creatomate to stitch audio and images into a final video.
  8. 13:35 Rendering and Downloading: Handling the video export process.
  9. 15:08 Storage and Distribution: Automatically uploading to Google Drive and YouTube.
  10. 16:10 Summary: How to get the n8n template and joining the Skool community.

Questions and answers

Does the whole workflow run end to end?

Not in this video. The music and image steps run, but the video render step fails and needs debugging.

Why does the Suno prompt have a length limit?

Suno prompts must be under 500 characters or Suno will not generate the track, Mike says.

Is there a manual option?

Yes. Generate tracks in Suno and put them together in a video editor such as Kdenlive or CapCut, which Mike says is easier in the long run.

Transcript

Hey there, welcome to the channel. In this video, I'm going to share with you how to build a complete automation in N which will automatically generate AI music videos for you using Sunno and Nano Banana Pro to generate the image. So, if you're not already familiar with SNO, this is one of the latest and greatest tools for generating music, and I'm really amazed by what it can do. I've just recently decided to launch a third YouTube channel where I'm creating synthwave music videos.

And in order to make my job easier, I've just decided to automate the entire process using n8n. And in this tutorial, I'm going to show you step by step how to do this yourself. So without further ado, please subscribe to the channel and let's get into it. So first of all, if you want to start building this workflow, I highly recommend signing up for Hostinger. There's a link in the description below.

Read the rest of the transcript

This will allow you to self-host n8n, which is quite a bit cheaper than using the official cloud service. So, go ahead, check out the link in the description. And then you can run N on your own server through Hostinger. It's a virtual private server. So, the first step here, as you can see, this is already running. It's just a form submission. So, when we execute this, it's just going to pop up a form in n8n and it's going to ask us to enter a prompt.

In this case, it's just the genre of music that we want to create. I've recently launched a third YouTube channel and I want to automate the process of creating these music videos. So, this is exactly how I'm doing it through nin. The next step here is we're just going to be messaging an open AI node and I'm just using the uh latest 4.0 model right here. And this is the prompt that we're passing in.

Create a detailed prompt for Sunno based on the genre that we got from the form submission. Only include the prompt and no other information. The prompt must be less than 500 characters, otherwise it won't generate the music file through Sunno. Another option is you can do this manually through Sunno itself. There's a link in the description if you want to create your free account.

All you have to do is type in a simple text prompt and it will generate all of the music uh files for you. This is what it sounds like. >> >> So that's an example of a synth wave file that I've created through Sunno and I've been generating a lot of these music files which I can then repurpose and put up on my third YouTube channel which is just called synthwave music if you want to check it out.

The next step here is we're just passing in the music prompt that we got from ChatGPT, which in this case it just says synth wave cyberpunk track with pulsating retrofuturistic synths, dark neon atmospheres, driving electronic beats, and gritty dystopian textures. Evoke a futuristic cityscape at night with shimmering lights, chrome surfaces, and shadowy shadowy alley alleyways. That's a mouthful. So that's the prompt that we're generating. And then in the next step, we're calling Kie right here.

So in order to do this, you're just going to come over to KIE. And I'm just going to search for Sunno right here because Sunno is built directly into KIE, which we can use over here in N. So if you click on Sunno, you can access the API. And this gives you all of the features that you would get over here in addition to a lot more features as well. So if you want to generate the music file, you could just come over here.

And you can also test it by entering a t a title style music and then also lyrics. In this case, we just want to generate the music. And in order to see how to do that, we're going to click on API here. And this is all of the reference for the API that you need to know. So right here, uh, we're just going to pass in this URL, which we're getting from over here in KIE. As you can see, it's just API v1 generate.

So that's what we're doing here. That's the URL that we want to pull. And then we're just passing in our API key, authorization bearer, and then the API key. And also the JSON right here. So the prompt is just going to be what we've already gotten from ChatGPT. Make sure to add JSON.stringify because I've noticed that otherwise it might have an error. So just add JSON.stringify and then the prompt that you're getting from over here. And then here you can set the custom mode.

In this case, we're just generating instrumental music. So you just set this to false and then put instrumental as true. And then the model I'm just using V, V4, V5, but you could also put V5 here as well. So these are the options V4, V45, V45 all as well and V5. So that's the latest version is version five. And then the callback URL, you can just put something generic in here like like they have.

And then the style is going to be the genre that we got from the form submission. So you're just going to click and drag in the genre that you entered in to the form. And the title, I'm just using pseudo music track for now. You could set this to be whatever you want. And then a few other parameters here as well. And as you can see, this is what it looks like. So there's the prompt that we've generated using chatbt.

Here's the style that we got from the form submission. And then everything else you can just enter as is. So that's it. And then this is just going to continue looping and getting the music track. And this is just going to wait until it's finished. So, similar to what I've done in some of my other videos, you could just come on down to get music track details. You're just going to want to continue polling to see if the track is finished.

So, that's what we're doing here. And we're also passing in the task ID, which is coming from the create music node right here. So we're just passing in the task ID which it needs to get the track and that's all we're doing here. So it's just looping and it's waiting 10 seconds in between and then it's just checking the status code over here which is just JSON.data.status. So that's coming from get music right here. You can see JSON.data.status right here.

And then you just pass that in. And these are the different uh status descriptions. So it's either pending text success, first success, success, create task failed, generate audio failed, call back exception, or sensitive word error. So that's exactly what I have over here as you can see. And then once it succeeds, it will obviously just go on to the next step. Otherwise, it will continue looping until the track is finished. So that's all we're doing there.

And then in the second step here, I'm actually not creating a video. I'm creating an image using Nano Banana Pro which is built directly into KIE. So if you want to find Nano Banana Pro, you'll just come back to your market here and then you can click on Nano Banana Pro and then you can do the exact same thing for generating the image. I've also played around with generating uh video files as well, but they can only be up to 10 to 15 seconds long.

So essentially, you just have to continue looping it over and over again. And I just decided we'll just use an image, like a static image instead for the background on the music video. It's a little bit easier and it also uses less credits as well. So in order to get started with Nano Banana Pro in KIE, you'll just click on the API once again. And in this case, we're going to be running the create task URL.

So first we have to create the image prompt which I'm just using GPT41 mini to do. And all we're saying here is create a detailed prompt for an AI generated image using Nano Banana Pro based on the music track description. So that's just the music track that we've already created which is just the music prompt. So it's going to create an image based on the music track that we want to create.

And then it also says don't include a summary of the actions being taken only include the prompt itself. So this is going to create an image in Nano Banana Pro. And then it's just going to create an image prompt similar to what we did for the music prompt over here. We'll just pass that into uh edit fields right here. We're just going to call it prompt. So that's just passing in the prompt that we got from ChatGPT which is right here.

You're just going to click and drag that in. And then the next step is we're just going to create that image using kie nano banana. So here's the URL that we want to uh you know enter in here. So it's just going to be api.k.ai/apiv1/job/create task. That's what you're going to be using for creating the images. And then you're just going to pass in this JSON here as well. Make sure to enter your in your API key. same as before.

And then you'll you'll specify the model and also the prompt. Same as we did for the music generation. JSON.stringify JSON.prompt which is just coming from the prompt we've already created. Then you can also set the aspect ratio. In this case, obviously since it's a YouTube video, I want to make it 16x9. And you can set the resolution as well, which is either going to be 1K, 2K, or 4K. I would recommend using 2K otherwise the file is just going to be really large.

So just set 2K and then the output format is going to be PNG. And then very very similar to what we did for SUNO, we're just going to loop until the image is finished generating. So that's exactly what we're doing here. We're just querying the task right here. Running API v1 jobs record info. That's the URL we're passing in. And then once again, we're just going to pass in the task ID this time from create an image. So you'll click and drag that in.

Uh make sure to enter in your API key as usual. And that's all we're doing there. So it just takes a task ID. And then in this case, we're just looping until it's finished similar to as before, but uh they're different codes this time. So it's just either success, generating, queuing, waiting, or fail, right? And then obviously once it's finished it would be success. Otherwise it's just going to continue looping until the image is finished.

And then the next step is we're going to create this video and put all the pieces together using something called Creatom Mate. So this is a good tool for creating videos. And I will be honest, this part is not working 100% yet. It still uh needs a little bit of debugging. As you can see, it actually errored out in on this part right here. Uh, so it's not working 100%. But once it's working, uh, this will just create the video, the complete music video.

And then you can also automatically upload it to YouTube as well, just by entering in the YouTube node. And then you can say create or, you know, upload a video. Just drop in upload a video right here. you'll select your channel and then you can automatically upload the video as well using n8n. So this is going to save a lot of time doing this manually. Um so same as before we're just passing in the audio file urls that were generated using uh suno.

So we'll come down here and you can see get music. There's a URL right here. This is the source audio URL. And if you just go ahead and open this up, you can actually preview the sound file. So here it is. This is what it sounds like, right? So you can preview the sound file. And it's actually creating two uh audio files every time I run the pseudo node pseudo node. So you've got one and number one, number two.

So I've just got audio URL zero, audio URL one. And ultimately I would like to create many of these like you know five five to 10 tracks per music video but in this case I'm just creating two and then I can always create more later. And then here we're just basically getting the image URL. Uh this part's not working 100% yet. And then we're rendering the video using creatom mate.

So in order to get started with creatate you just create your free account and then you can access the API. So just come up here and then come on down to project settings and then you can access your public token right here. So you're just going to enter that in over here and then in this case I'm just using the URL api.creatmate.com/v2 renders. That's what we're going to be running in order to create the video. And you can access your projects right here.

So just come down to templates and here's my m music video template right here. In order to get the JSON, you just click on use template right here. And then you'll come on down to API integration right here. And you're just going to copy and paste this in. You have to make sure to use the right template ID because that's how it's accessing the the specific template. So that's what I have down here. And this part's a little bit complicated.

I've added a, you know, because I want to create audio with a certain duration. So that's going to be the first music track. And then I've also got the source here. So that's just the audio URL for the first one and then the second one. And then we're also passing in uh the image here as well. So that would actually be we need a source here as well. I don't see the source right off the bat. Oh, there it is.

So I haven't actually passed in the source for the image. We need to make sure to uh pass that in as well. Once we get the image, we want the source for that. So that would be this right here. Uh, actually that's why I was using the code node because I need to extract just this part right here which isn't working 100% yet. But eventually that'll just be the source for the image.

And what that's going to do is it's going to add that as the background image. And then it's going to overlay the audio files on top. And then essentially what we're going to do from there is we're just going to export this music video. So all we're doing is we're waiting 60 seconds in this case. U I've actually just put 80 seconds in here. It might take even longer than that.

So, I'm just going to set 120 seconds to wait until uh the video is finished generating. I'm not exactly sure how long it takes. So, we'll just put 120 just to be on the safe side. And then that's going to then download the video. So, all we're doing here is we're passing in the finished video. And if it fails, if there's an error, we can actually just remove that part because at that point, we don't have to do anything.

And then after that, we're going to upload the video to Google Drive. So in order to add a Google Drive node, we're just going to come up here, search for Drive, and then you would just search for upload file. So that's going to upload the music video to Google Drive as we're doing right here. And then last step is we can just automatically upload it to YouTube. Although I would not recommend that.

It's probably better to upload it manually because, you know, YouTube can detect if you're automatically uploading videos. So, it's better to just upload the music video to Google Drive and then post it manually to your YouTube channel. That's what I would recommend. So, that's the complete workflow. And by the way, if you want access to this, it's available in my Skool community over here, which is currently paid. It starts at $29 a month. And then you would need to be a premium member to get access.

So, that's $49 a month. Then, I also have a VIP plan for $890 a year over here as well. More than welcome to join the Skool community. We get people posting in here every single day. And you can also access the classroom where I provide all of the template templates, tutorials, courses, everything inside here. And I also offer a one-on-one coaching program for 6 weeks as well. So, you're welcome to check that out.

And um also, you can do this manually as well, just using Sunno and an image editor. Like I'm just using KD KDE and live because I'm on Linux. So I can show you what that looks like if you want to edit the v videos manually. It's probably going to be a lot easier in the long run rather than automating it.

So all you have to do is generate the tracks using suno and then you can uh create the videos using something like ken live or final cut or cap cut whatever you want to use and then you just create the videos you upload them to your YouTube channel. Hopefully you found this video helpful. Please subscribe to the channel if you haven't already. And again, please go ahead and check out my Skool community. I provide a lot of value in here every single day.

Would love to see you inside here. With that being said, thanks so much for watching. Signing off. Peace from Thailand. I will see you in the next one.

Not ready to join? Get the weekly build notes: new guides and tested builds in one short email.

You may also like