How to upload a PDF file to Google Gemini? (Like in Make.com)

Hi everyone,

I’m trying to upload a PDF file to Google Gemini and process it afterward.
In Make.com, there are built-in modules like “Upload a File” and “Process with Gemini”, but I can’t find a direct way to do this in n8n.

I’ve attempted to send the file using an HTTP Request Node to the media.upload API (https://generativelanguage.googleapis.com/upload/v1beta/files), but I’m unsure how to correctly pass the file as binary data and then use it in a Gemini request.

Has anyone successfully done this in n8n?
Any workflow examples or guidance would be highly appreciated.

Thanks in advance! :blush:

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:

@Justin_Kim if you can use custom nodes, check out this video. I built a custom node that can do this easily:

2 Likes

Hey @Justin_Kim - heres a working example with gemini:
Hope this helps!

2 Likes

Danke Felix, das ist sowas von nützlich!

thank you my friend, its work aswell

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