My question: Is there a native way to handle PDF binary files in the AI Agent node with Gemini, similar to how it handles images? Or is it necessary to convert the PDF to an image before passing it to the agent?
Describe the problem/error/question
I’m building a workflow that uses the AI Agent node with Google Gemini to perform OCR on documents sent via the Chat Trigger. The OCR works perfectly when I send a JPEG image, but when I send a PDF file, the agent completely ignores the document and does not extract any data.
What is the error message (if any)?
No error is thrown. The agent simply returns an empty or generic response, not extracting any content from the PDF.
Please share your workflow
Share the output returned by the last node
With JPEG: Works correctly — returns a JSON with all extracted fields from the document.
With PDF: The agent returns a generic response with no extracted data, as if it did not receive or process the file.
Information on your n8n setup
-
- n8n version: 1.121.3 (Self Hosted)
- Database: SQLite (default)
- n8n EXECUTIONS_PROCESS setting: default
- Running n8n via: Docker
- Operating system: Linux
