Home/Videos/Automation

Google's Nano Banana with n8n | FREE TEMPLATE

By Ani BjörkströmPublished 25 September 20258 min videoAutomation

A five-step n8n workflow turns an uploaded product photo into a generated image of a chosen male or female model holding the product, using Google's Nano Ban…

Chapters

  1. 0:00 Intro: What we’ll build (AI product image with NanoBanana in n8n)
  2. 0:13 Live demo: Execute Workflow & open upload form
  3. 0:24 Upload product image & choose character model (female)
  4. 0:37 Behind the scenes: workflow sends request to NanoBanana
  5. 0:48 Result: Image generated & auto-downloaded (Cola Zero example)
  6. 1:03 Free template CTA (how to get it)
  7. 1:16 Step 1: Form Submission node (auth, title, description)
  8. 1:37 Field 1: Product image (file; allow PNG/JPG)
  9. 2:13 Field 2: Character model (male/female dropdown)
  10. 2:25 Step 2: Extract file → Base64 (why we convert)
  11. 3:07 Step 3: HTTP Request to Google (NanoBanana/Gemini endpoint)
  12. 3:18 OpenRouter vs direct API (cost & reliability)
  13. 3:40 API details: Generative Language endpoint + generateContent
  14. 4:09 Create API key in Google AI Studio
  15. 4:24 Billing & project setup (why it’s required)
  16. 5:22 Cost control: free credits & budget alerts
  17. 5:46 JSON body walkthrough (model, prompt, image, gender)
  18. 6:43 Step 4: Convert Base64 → File (get PNG result)
  19. 7:36 Step 5: Return file to user (Form Ending page)
  20. 7:48 Save & Execute: full run recap
  21. 8:04 How to get the free template (comment “n8n”)
  22. 8:15 Outro

Transcript

0:00 Hey, my name is Annie. I'm a tech consultant based in Stockholm. And in this video, I will show you how to create a picture using Google's Nano Banana from a product picture. And before we kick, let's watch a demo. I will click on execute workflow. And from here, we can choose a file. I will choose a coke zero picture. And then we will choose the model. In my case, it will be a female. And then we can click on submit button. Now what will happen? The workflow will consume the picture and will send a message to Nanobanana and will specify for Nano Banana what it needs to do.

0:45 And you can see that the picture was created and it was downloaded into my computer. So if I double click on the picture, we can see a woman drinking color zero p picture that I sent. Great. So if you want to get this template totally for free, wait until the end of this tutorial and I will show you how can you get it for free. So on the first step, we will create on form submission. So if I double click on that you can see that authentication can be none. Then you can have a title and description and after that you will create two fields.

1:30 The first field will be product image and this is where we will upload our image. So that's why element type will be file and we can even specify that file types should be PNG and GPG and because the pictures normally have those types that's why we are specifying PNG and GPG. Then after that if we scroll down we will add also character model because we want to define whether we want a male or a female to hold the product. So we specify male or female and that's basically it.

2:16 Then we can close this and we can go to the next module. Here we are using extract from file and move file to base string. So the why we do this is we do this because when we submit a file the file is uh in PNG format. You can see image PNG and we want to convert it into base 64 text coding format. And the reason that we do this because later on we need to send this picture to nano banana and nano banana will use this base 64 format.

3:07 In the next step if we doubleclick we are sending http request and here I'm using directly nonobanas api. I know that there are a lot of people that are using open router and couple of weeks ago nano bananas API was free on open router. So that was a great idea to use it. But right now nano bananas API is paid in open router and that is why the best option will be using directly geminis URL and you can see that I'm using generative language googleis.com. So this is then the API name and then I'm using the function that is generate content and um I'm using post method.

4:02 We also are using API key and I can show you how to create API key. So if you come to Google studio and then click on API keys here you can see my API keys and you can click on create API key and you can create your API key but keep in mind that Nano Banana's API is not free. So what you need to do you need to connect it with a project in Google's Google cloud. So here for example you can see that uh under credentials I created an API key.

4:59 It's this one. And this is even created or connected to a paid uh account. Otherwise it will not work. But if you are worrying for example about the cost. So when you create a Google cloud account you get some credit I think $250 for free and you can even create a budget limit where as soon as for example $5 limit is hit then you will get a notification. So you can do that if you want to use nano bananas API. And for the body content type I'm using JSON which means that we will write a JSON code.

5:44 And this is the code that I'm using. I will open it. I will also copy paste this in the description so you can easily use the same code. And here I just want to show you. So basically what is happening is that we are sending to nonobanas URL which is model Gemini 2.5 flash image preview. This is the URL we are sending to this URL this text that is saying create this image and so on and we are specifying the image of a and then we are specifying for example the gender because that was something that we choose and then we are even specifying our image that we submitted. So you can see it's uh this JSON data is a reference that is coming from extract from file that we converted from file to encoded 64 code.

6:48 Yes. And then once the image is created we will go to convert to file. And in convert to file what we will do we will now do the reverse engineering. So we will take base 64 file that was returned by nonobanas URL and we will convert it to just a file just a PNG file. So you can see that that's why here under base 64 we will just specify the data. So you will just drag and drop data from here to there and then yeah so this is the picture and you can see that's a excellent picture and in the last step what we need to do we need to upload this data into our computer so we will just choose form and then page type should be from ending and on nm form submission we will choose return binary file and completion title it can be anything that basically we like to call it and that's it.

7:52 Right? Uh and when we you will save it then you will click on execute workflow and the workflow will work as it did in the beginning of this video. If you feel like you want to use this template just comment N8N and I will send this template for free to you. Great. Have a great day.