demobook

Multi-image composition in n8n

n8nTry it →Watch full video →Kyle Friel | AI Software ·

Demo summary

A walkthrough of a complex n8n workflow that merges multiple images from Google Drive into a single cinematic composition using the Gemini API.

Step-by-step

  1. Download the source images from Google Drive using the Google Drive node
  2. Merge the downloaded files into a single list
  3. Extract the Base64 data from each binary file
  4. Aggregate the Base64 strings into an images array
  5. Define the prompt in an Edit Fields node
  6. Use a Code node to define the 'parts' array and stringify the request
  7. Pass the 'parts' array into an HTTP Request node to call the Gemini API
  8. Convert the API response to a file and upload it back to Google Drive

Options

  • Upload images directly via a form instead of downloading from Google Drive

Watch out for

  • The 'parts' array must contain both the text prompt and each image's Base64 data for the API request to function

Tips

  • Use a Code node to stringify the request to ensure the API receives the data in the correct format
  • If the AI doesn't understand the initial request, go back and revise the prompt for better results

Highlights

it's really insane that it was able to take me looking at a certain angle and put me looking down at a different angle... and incorporating me into the scene flawlessly

All demos from “This Is the Best Way to Generate AI Images in n8n (NEW Nano Banana Pro)

  1. 3:301:26Text-to-image generation in n8nA demonstration of using the 'Message a Model' node in n8n with the Imagen 3 model to generate a realistic image of Alaskan wildlife from a text prompt.n8nText to Image
  2. 8:211:58Multi-image composition in n8nCurrentA walkthrough of a complex n8n workflow that merges multiple images from Google Drive into a single cinematic composition using the Gemini API.n8nAI Image Combiner
  3. Watch “This Is the Best Way to Generate AI Images in n8n (NEW Nano Banana Pro)” →

AI Image Combiner

  1. 9:291:46Combining multiple images into one with Nano Banana ProThe demo shows an n8n automation that takes three separate product image URLs (shirt, watch, water bottle) and uses Nano Banana Pro to generate a single composite image of a man using all three items.Nate Herk | AI Automation
  2. 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.Leon van Zyl
  3. 8:211:58Multi-image composition in n8nCurrentA walkthrough of a complex n8n workflow that merges multiple images from Google Drive into a single cinematic composition using the Gemini API.Kyle Friel | AI Software