One To Many Merge Node

Hi everyone, hope all is well!

I have a workflow that automates editing product photos. The goal is:

  1. Get a list of product image URLs from a Google Sheet.

  2. Download all of those product images (this creates a list of multiple items, e.g., 9 images).

  3. Separately, download a single, static “mask” image from my Google Drive (this creates a list with only 1 item). This mask tells an AI where a logo is located.

  4. For every single product image, I need to pair it with that one mask image.

  5. Finally, I will send each pair (product image + mask) to a Stable Diffusion API to remove the logo.

What The Problem Is:

My main problem is correctly combining my two sets of data: the list of 9 product images and the single mask image.

I need to find a way to “stamp” a copy of the single mask’s binary data onto every one of the 9 product image items. The final result should be a list of 9 items where each item contains both its original product image data AND the mask image data.

I have tried using the Merge node, but I can’t find a configuration that works. It either only outputs one item or it doesn’t add the mask data at all. What is the correct n8n method to solve this “one-to-many” data combination problem?

Hello @Nick_B ,
If you want to enrich multiple items by combining them with a single item, you can use Combine By > All Possible Combinations.
You might have a conflicting binary name, such as ‘data’, so you may need to rename it, for example by using a Code node.
Here is an example:

2 Likes

Perfect, thank you mk! I fixed it with your help! :slight_smile: