How to Compare Two Images with OpenAI Analyze Image Node in n8n?

Hello,

I’d like to compare two images using the OpenAI - Analyze Image node in n8n.
However, it looks like this node only allows uploading a single image (there’s just one field for the image).

:backhand_index_pointing_right: Is there a way to upload two images so they can be compared directly within this node?
:backhand_index_pointing_right: Or do I need to use another approach / node to handle the comparison?

Thanks in advance for your help!

Welcome to :n8n: community @Silvio_CACI,

I think it’s possible to attach more than one image according on the node:


image

So, If you’re using the binary files approach, just separate the binary names with a comma:

here is a working example:


:point_right: If this solves your problem, feel free to mark the reply as the solution :white_check_mark: it’ll help others with same issue, and it also helps me on the leaderboard :folded_hands:t2:

1 Like

Hi thanks for your reply.

How to assemble the two binary files? data and data2 come from two different nodes (download file(data) and download file2(data2)). I only have access to data2, which comes from the last node, but not to data, which comes from a previous node.

Thanks

Hi @Silvio_CACI

In the Google Drive node, rename the outputs to “data1” and “data2”:

Then, before the OpenAI node, use the Merge node to combine the binaries into a single output item.

Here’s an example:

Please do not forget to mark the answer as the solution, thanks

1 Like

Hi Mohamed thanks for the help.

@Silvio_CACI You’re very welcome!
I’d really appreciate it if you could mark my reply as the solution.
Thanks so much!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.