Google Drive Module - Missing Data

Describe the problem/error/question

Hi Everyone,
I’m trying to create an image with Gemini 3.1 Flash (nano banana2) for my jewelery products. I’ve got two images (main product and mockup). I want to combine these photos and generate an image based on my instructions(prompt). But one of the modules (Google Drive download) doesn’t include my reference to the two images. Only the main product image is sent to the HTTP request, so the generated image doesn’t include my mockup images.
I’ve attached my workflow.
You can also see the problem node (Google Drive product image1). Can someone help me?

  • Is my workflow OK?
  • Is the node information OK?
  • Is there anything else I need to do?
    Thank you for the help in advance.

What is the error message (if any)?

Please share your workflow


Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi, The issue is that your two Google Drive nodes are outputting separate items, so only one image is making it to the HTTP Request node.

Fix: Add a Merge node before your HTTP Request node and set it to Combine → Merge by Position. This bundles both images into a single item.

Then in your HTTP Request node, reference both binary properties explicitly $binary.data for the first image and $binary.data_1 for the second.

That should get both images passing through to Gemini correctly.

Hi there,

I can see you are now using exactly the same pattern and nodes I shared with you in your previous question, and even though that reply wasn’t marked as the solution, I’m really happy to see it has been useful for you in your workflow.

However, when your reference image is coming in as base64 (binary in n8n) and you also want to pass multiple reference images at once, the JSON template from my earlier answer will no longer work as-is. In that case, you’ll need to switch to a template like this instead:

If you’d like, I can also help you adapt this template directly to your current Google Drive + Gemini setup. Remember to use Aggrigate node, It can help alot.

Dear @Ayomikun27 @nguyenthieutoan ,

I will try to use these solutions. I would like to ask you to let me use this automation to produce images of up to 500 per day. Could you suggest one that would be suitable for my request? I apologise for asking a lot of questions, but I have no experience. I will try to apply one of them tonight.

Thank you for your help.

For 500 images/day, the Aggregate approach scales better - it processes all images in a single batch item rather than merging pairs one by one. Structure it as: Google Drive (list files) → Loop Over Items (batch size ~10-20) → Google Drive Download → Aggregate → HTTP Request to Gemini. Keeping the batch size reasonable avoids hitting Gemini’s per-request limits and makes retries easier if one batch fails. Give it a try tonight and let me know if you hit any issues with the Aggregate output format!

Hey, I ran into almost the exact same thing when combining two Drive images into one Gemini request. Your download node is actually working fine. The issue is downstream in how both images get carried into the HTTP Request. n8n only sends what’s in the final item, so the second image gets dropped before it ever reaches Gemini.

A few things that fixed it for me:

1. Use different binary field names. Make sure each Google Drive download node writes to its own field, like productimage for one and modelimage (or mockupimage) for the other. If both use the same field name, the second one overwrites the first.

2. Merge both binaries into one item. Add a Merge node and set it to “Combine by position” so a single item carries both binary properties before it hits the HTTP Request. This is usually where the second image quietly disappears. The item reaching Gemini only ends up with one.

3. Send two separate inline_data parts in the body. Gemini’s generateContent needs each image as its own part. Your request body should look like this:

{
“contents”: [{
“parts”: [
{ “text”: “your prompt here” },
{ “inline_data”: { “mime_type”: “image/jpeg”, “data”: “{{ $json.productBase64 }}” } },
{ “inline_data”: { “mime_type”: “image/jpeg”, “data”: “{{ $json.mockupBase64 }}” } }
]
}]
}

If you only have one inline_data block, that’s why only the main product shows up.

Quick way to confirm where it’s breaking: click into the item that feeds your HTTP Request node and check the Binary/JSON tab. If only one image is there, the loss is in your merge step. If both are there but only one reaches Gemini, it’s the body structure.

Looking closely at your sidebar and the open node (Download Product Image1), your workflow is handling the two images sequentially or in entirely separate branches, but it never merges them back together into a single data bundle (item) before hitting the “Generate Image” or “HTTP Request” node.

How to Fix It

To make sure Gemini receives both the Product Image and the Mockup Image in the final HTTP request, you need to combine their binary data into a single item.

Step 1: Use the “Merge” Node

You need to add a Merge node right before your “Generate Image” or “HTTP Request” node.

  1. Drag a Merge node onto your canvas.

  2. Set the Mode to Combine (or Mix, depending on your n8n version, ensuring it matches by index or joins the data).

  3. Connect the output of your Product Image Download node to Input 1 of the Merge node.

  4. Connect the output of your Model/Mockup Image Download node to Input 2 of the Merge node.

Step 2: Ensure Unique Binary Property Names

Look at the Options section in your screenshot. Under Put Output File in Field, you have named it productimage.

  • Make sure your product image node puts the file in: productimage

  • Make sure your mockup/model image node puts the file in a different name, for example: mockupimage

If both nodes use the default name (usually data), one will overwrite the other when they merge. By giving them unique binary property names, the merged output will contain both binaries in a single item.

Step 3: Update your HTTP Request / Gemini Node

Once the Merge node passes a single item containing both productimage and mockupimage, you need to update your final API request to Gemini:

  • If you are sending a multipart/form-data request via the HTTP Request node, add two parameters under the body, both set to type Form-Data File.

  • For the first file, point it to productimage.

  • For the second file, point it to mockupimage.

Thankyou very much all! Finally It was solved thanks to you. @gulabautomationhub @shafeel_Ahamed @nguyenthieutoan @Ayomikun27

Next step is to improve my prompt :slight_smile:

You are great!

Best regards