Sora 2 in n8n: product ad video from a form and an image
Watch on YouTube ↗ Subscribe on YouTube ↗
Add OpenAI's Sora 2 video generation to an n8n workflow. Mike first updates a self-hosted n8n on a Hostinger VPS, because the Sora 2 option needs version 1.118.1, then builds a form that takes a prompt and product image and calls Sora 2 for an 8-second 1280 by 720 video. A bad request error turns out to be a negative OpenAI balance, fixed with a $6 top-up. The generated video does not match the product exactly.
Video summary
The video covers 10 parts: Sora2 Overview, Hostinger VPS Upgrade, Docker Update Commands, Verify N8N Version, Adding Sora2 Node, Sora2 Video Prompt, Form Submission Setup, OpenAI Billing Account, Automate UGC Workflow, and Sora2 Video Result.
What this video covers
What you build
An n8n workflow with a form trigger, an image resize step and an OpenAI video generation node using Sora 2 for a short UGC-style ad.
Tools used
Key steps
- 0:40 - Open the Hostinger terminal for the n8n VPS.
- 1:15 - Run docker compose pull and docker compose down, then restart to update n8n.
- 1:50 - Confirm the new version in profile settings.
- 2:30 - Add the OpenAI node and choose video generation with the Sora 2 model.
- 3:10 - Set an 8-second length and a 1280 by 720 size, with the prompt from the form.
- 3:50 - Upload a product photo through the form and resize it.
- 4:30 - Fix a bad request error by adding OpenAI credits.
- 6:10 - Review the finished video.
Not covered
- A faithful product video. The result does not look exactly like the uploaded bottle.
- Posting the video to social media, which is described as a next step.
- Cost per video, since only the account balance is checked.
- Disclosure of AI-generated ads or rules for using real people's likeness.
In this video
- 0:00 Sora2 Overview
- 0:40 Hostinger VPS Upgrade
- 1:15 Docker Update Commands
- 1:50 Verify N8N Version
- 2:30 Adding Sora2 Node
- 3:10 Sora2 Video Prompt
- 3:50 Form Submission Setup
- 4:30 OpenAI Billing Account
- 5:20 Automate UGC Workflow
- 6:10 Sora2 Video Result
Questions and answers
Which n8n version is needed?
Mike's instance showed 1.118.1 after the update, which gave access to the Sora 2 option.
Why did it return bad request?
The OpenAI balance was negative. After adding about $6 the run worked.
How long does Sora 2 take to generate a clip in n8n?
A couple of minutes for an 8-second clip.
Keep learning
Transcript
Hey there, welcome to the channel. In this video, I'm going to show you how to build a simple automation in nin. But before we get started, I actually need to upgrade my version of n8n. So, I'm logged into Hostinger right here. This is where I'm hosting it on its own virtual private server. As you can see, I've just got n running. If I click on manage, I can go ahead and update the latest version of n.
So, all you have to do is come on over to a terminal and type these commands. So, I've got the terminal already running over here. In order to access this, you just click on terminal in the upper right hand corner. And then I'm just going to run these commands in order to update to the latest version. So, we're just going to run docker compose pull. And then next we're going to run docker compose down the latest docker container. And then from there, we can update.
Read the rest of the transcript
So, it's just going to update to the latest version. So, I'm assuming that worked correctly, but I don't really know for sure. We'll see if it has updated correctly because I need this in order to add the Sora 2 node because it's currently not available here. You can see there's no way to generate videos using Sora 2. So, I'm just going to go ahead and exit out and open it back up again. So, we'll see if it's got the latest version now.
Hopefully everything went according to plan. If we come to the profile, can come on down to profile settings and boom, there we go. So now it's running 1.118.1. That's the version that you need uh in order to access Sora 2. So if we come back here, we should see the Sora 2 module available. So if I just type in Sora 2, looks like it didn't find it. If I select OpenAI, there we go.
So, as you can see, it now has video actions to generate a video in this particular case. So, all we had to do was upload upgrade to the latest version in Hostinger. And I've already created a tutorial on this channel showing how to get started with your own virtual private server because you can basically save money. It's only about $10 a month versus $30 or more through N Cloud. So, I highly recommend doing it this way.
And now all I have to do is connect up my OpenAI account which is already connected. Select video as my resource and then generate. Now from here I can select the model. So I'm just going to put in Sora 2. As you can see this is now built directly into N as long as you're on the latest version. Right. So in this particular case I want to give it the prompt that we've generated from over here. So, we've got the form submission.
And now we can actually just drag in the prompt right here. In this case, generate a video of someone using the product for a UGC ad in this case. And I'm just going to set 8 seconds for the video. And then we can also set the size. In this case, it's going to be 1280 by 720. Oh, actually 720 x 12. Yes, 1280 x 720. And we can also set the properties here as well, which we don't need to worry about for now.
And then in the previous steps, we're just doing an on form submission. So if I execute this, you'll see a form pops up and then we can describe the video that we want to create. And we can also upload an image. So I've just chosen this water bottle as a test product. Right now, if we click on submit, it's going to submit the form. And we can see over here, here's a picture of the water bottle that we want to use.
And you can also view this in JSON as well. And then there's the image that we upload in JPEG format. and the size as well. And then in the next step, we're just going to edit that image and we're going to set the dimensions here and resize it. And then for option, just choose ignore aspect ratio right here. And then if we run this, it should resize it. Although it looks a little funky. It's just stretched out. That's not ideal.
We would need to make sure to resize it so that it fits the dimensions. Um, let's just go ahead and run this all the way through and see if it can create the video using Sora 2, which is now built directly into n8n. So, we're just going to execute this workflow. I can just pin this for now. We're just going to click on pin. Oh, no, it's still running. So, let's stop this and then we're going to pin it.
Let's just go ahead and do this again. We're going to upload the image and then say product. We'll put person using this product. So click submit and then boom. So now it just ran sore 2, but it looks like it says bad request. Please check your parameters. So it's possible that I don't actually have access to sor 2 on my current plan or even more likely is because I've hit a billing hard limit once again.
So in order to fix this, I'm going to need to go over to platform.openai.com and basically all I have to do is fill up my billing account. So, I'm going to go to settings and then come on down to billing right here. And I need to add some credit here because it's currently negative. So, we're just going to add in this case more. So, we're just going to enter six and then click continue. And boom. So, now it's made the payment.
I should have more credits through OpenAI. This is absolutely essential. If you want to use any of their services, you need to increase your credit limit under billing um in platform.openai.com. openai.com. If I refresh this, it should show the reflected changes. So now I've got almost $6 in there, right? If I go back over and run this once again, it should run correctly as this time. I'm just going to click on execute step.
And it's going to take a few seconds, hopefully not too long, and then generate the video. We'll see what this looks like. It's pretty cool that you can now do this directly from within n. You could potentially automate your entire UGC ad creation using N and you just feed it the data from something like Airtable or Google Sheets and you just say what you want to create the videos of and it will create the videos and then you can always just post that on social media
automatically as well. While that's generating, I'm just going to show you the next here would be to add a Facebook graph API. And then you can connect this up and then you basically just automatically post it to Facebook. You can do the same thing for LinkedIn or Instagram. I think Instagram should be in here as well. So if I search for Instagram, but LinkedIn is available. So we can just click on create a post.
And then you will need to make sure to verify your account here, which is something that I'm actually still having issues with on LinkedIn. That's not going to work for now. But as long as we can create this video, which is taking quite a while to process here, we'll see what it looks like in a minute. Let me just check my balance again. Maybe it's using a lot of credits. We can check again. Yeah, still 591. So that's fine. We'll see this.
I should have made it a little bit shorter. It's currently 8 seconds. does take a while to actually create these Sora 2 videos. It doesn't look exactly like the water bottle that I uploaded. It It doesn't really look exactly the same, but it's still pretty impressive what it was able to generate in just a couple minutes. That's just a simple example showing how to create videos using Sora 2 directly from within N.
you will need to go ahead and upgrade to the latest version, which is very easy to do if you're running this on Hostinger. And then if you're just choosing to use n8n itself, the cloud platform, then it should already be the latest version. But if you're on Hostinger, you will need to upgrade it and that's just coming from GitHub. So yeah, hopefully you enjoyed this full tutorial showing how to create Sor 2 videos directly from within n.
If you wouldn't mind, please go ahead, subscribe to the channel. And with that being said, take care. I'll see you in the next tutorial.



