Using Binaries with AI Agents

Hi all, can’t figure out how to have binary data of an image being used by an AI Agent. I’d thought I could pass the binary to the agent from the HTTP Request, but that doesn’t seem to be working. Then thought about using the HTTP Request for Agents node, but that doesn’t support binary data.

Use case
Receive PDF’s - convert to jpegs (done by Stirling PDF) - send to AI (ChatGPT, Claude, Gemini etc) for OCR and evaluation through agent

The tool error is:
This operation expects the node’s input data to contain a binary file ‘data’, but none was found [item 0] Make sure that the previous node outputs a binary file The binary data is definitely there.

Any solutions?


It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Can anyone help with this please?

Hi @elliott

Thanks for posting here and welcome to the community! :tada:

Could you share your whole workflow so we can see your nodes configurations?
You can share your workflow here by pasting them as JSON in between two block quotes (```).

Thanks!

Hi @ria

Thanks for getting back to me :slight_smile:

Here’s the workflow JSON. I’ve removed the prompt and a specific URL. The main issue is I have no idea how to make the agent pass the image binary on to the call workflow tool.

I’ve tried:

  1. Adding a merge from the node that has the image
  2. Switching on “Automatically passthrough binary images” on the agent
  3. Making sure the agent prompt includes instructions to passthrough the binary image

Can’t find anything in the docs that goes over handling binary image data in Agents/Agent Tools either.

Tool JSON: