How to get my http request node to recognise the binary data in previous node?

Hi all,

I am building a workflow that generates images on leonardo ai and then my openai agent analyzes the image to generate a title and description. In my final node I have everything connected. I keep getting the error that binary data can not be found and I am sure the solution is something simple yet I have ran myself into the ground with this one. Can someone help?

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,

Can you please post your workflow. Without it, it’s hard to help

Reg,
J.

1 Like

this is my first time posting I dont know how to share the workflow

When you create your question it is described. But in short, you can just select your flow in your GUI and copy paste (ctrl c / ctrl v) and past it directly

1 Like

Hi, don’t you need to set ā€œinclude other input fieldsā€ (on the set node) ? If not you will drop previous data and keep only what you have set. Another option is to create a manual mapping for the same but I don’t think there is a use

I don’t understand which node you are referring to I am still quite new to this.

Given it a go but it comes back with ’
error
This operation expects the node’s input data to contain a binary file ā€˜https://cdn.leonardo.ai/users/6ec1c754-c6a0-4651-bfa2-3f424d8b7928/generations/b9ebbbac-cbb5-4af8-893d-d039d48e20f9/Leonardo_Lightning_XL_object_Object_Stunning_images_of_cats_w_0.jpg’, but none was found [item 0]’

Hi, And you ran the full workflow, not only the last step? These cdn links might time out. Have you tried to manually download the link with the URL? Also does the get request produce actually binary file. You should be able to view it even I. The gui

Another test would be to write the image to a file. Just to make sure it’s there. Have you tried $binary already?


The last one seems weird. You say, n8n binary file as type and you provide it with the URL string. Try to look up the doc/shortcut for $binary. It will also have linked templates for examples

This might also help:

I am still pretty lost with this guys, can someone explain this to me as a new user as I am not familiar with the technical terms as well as i’d like.

I have disabled some things for testing and made others static, but the idea is that it works. just fiddle a bit with it. you should see a cat somewhere uploaded… :slight_smile:

changes i have made

  1. i am sending the picture directly from the HTTP1 to openAI as binary data
  2. i merge the output of hTTP request 1 and openAI text output in order to have access to the binary data (picture) to be able to upload it

I made some manual entry which can be reverted to the original but i forgot already.

Hope it does what you want now. please mark a solution if it does. thanks