Binary data not showing up in HTTP Request node

Describe the problem/error/question

I have a http request node, which is getting binary file as input under key: attachmentIt’s basically an image that I wanna process via gemini to get description about it.So, Http request nodes input in json view has: id, filename, mimetype and binary has attachmentin send body json, I have

Here, In data, If I just add data: “{{$item.binary.attachment.data}}" Then i see data: undefined.
Now, If I run the node, i see error. Apparently file system mv2 is not being replaced with the actual data. What to do?

My workflow::


Information on your n8n setup

  • n8n version: 1.94.1,
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**self-hosted
  • Operating system:Windows 11

Hello!

I see that you are using HTTPS to call Gemini via API. This means that you need to convert your image into a base64 encoded file first. Most APIs require images to be in base64 format as well. You could try adding a few nodes before your HTTPS node to convert the binary file you have into a base64 file then appending it to your request.

You can take inspiration from this template if you are unsure how to start!
5 Ways to Process Images & PDFs with Gemini AI in n8n | n8n workflow template

Hope it works, Cheers!

1 Like

Thank you, converting to base 64 before passing to gemini worked

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