demobook

Edit images using n8n and Nano Banana Pro

n8nTry it →Watch full video →Leon van Zyl ·

Demo summary

The creator demonstrates how to convert an uploaded image to base64 and use it in an n8n workflow to perform image-to-image editing with a text prompt.

Step-by-step

  1. Add a Form element to the workflow and set the element type to File
  2. Insert an Extract from File node between the form and the image generation node
  3. Set the operation to Base64 to String and specify the binary field name
  4. Open the image generation node and edit the JSON body to include an inline_data property
  5. Map the Base64 string from the extraction node into the JSON body's image field
  6. Update the text prompt field in the JSON body to pull from the new form input
  7. Connect the output to a node that converts the API's Base64 response back into a file

Options

  • Limit the types of file formats allowed in the form upload
  • Allow single or multiple file uploads

Watch out for

  • You cannot send a binary image directly into the prompt; it must be converted to Base64 first
  • The API returns a Base64 string which must be converted back to a file to view the result

Tips

  • Keep the API URL and credentials the same as your standard generation nodes to save time
  • Use the 'Extract from File' node to perform the opposite action of the 'Create' node when handling incoming images

Highlights

Right. So how do we edit images? Well, it's really simple

All demos from “Build ANYTHING with Nano Banana Pro and n8n

  1. 6:031:22Basic image generation with n8n Gemini nodeThe video shows how to use the standard Google Gemini node in n8n to generate an image by manually entering the model ID for Nano Banana Pro.n8nText to Image
  2. 7:572:28Advanced image generation via HTTP RequestThe demo walks through configuring an HTTP Request node in n8n to send a JSON payload to the Google API, allowing for custom aspect ratios and resolutions (1k, 2k, 4k).n8nAI Image Generator
  3. 10:273:02Edit images using n8n and Nano Banana ProCurrentThe creator demonstrates how to convert an uploaded image to base64 and use it in an n8n workflow to perform image-to-image editing with a text prompt.n8nImage to Image
  4. 13:292:55Combine multiple images into one generationThe video shows how to pass multiple base64 encoded images into a single API call to blend elements, such as placing a specific hat from one image onto a character from another.n8nAI Image Combiner
  5. Watch “Build ANYTHING with Nano Banana Pro and n8n” →

Image to Image

  1. 7:042:25Image-to-image transformation using n8n and Nano Banana ProThis clip shows how to upload a personal photo to an n8n workflow and use Nano Banana Pro to transform it into a new scene, such as placing the subject on a beach while maintaining their likeness.Nate Herk | AI Automation
  2. 10:273:02Edit images using n8n and Nano Banana ProCurrentThe creator demonstrates how to convert an uploaded image to base64 and use it in an n8n workflow to perform image-to-image editing with a text prompt.Leon van Zyl