Skip to main content

5 ways to process images & PDFs with Gemini AI in n8n

Workflow preview

Workflow preview
100%
5 ways to process images & PDFs with Gemini AI in n8n preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workflow answers that question by demonstratin...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.httprequest, n8n-nodes-base.splitout, n8n-nodes-base.extractfromfile, n8n-nodes-base.splitinbatches, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Julian Kaiser.

Original n8n.io source

1.1 Workflow description

Title
5 ways to process images & PDFs with Gemini AI in n8n
Workflow name
5 ways to process images & PDFs with Gemini AI in n8n

How it works

Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workflow answers that question by demonstrating five different approaches:

  • Single image with auto binary passthrough - The simplest approach using AI Agent's automatic binary handling
  • Multiple images with predefined prompts - For customized analysis with different instructions per image
  • Native n8n item-by-item processing - For handling multiple items using n8n's standard workflow paradigm
  • PDF analysis via direct API - For document analysis and text extraction
  • Image analysis via direct API - For direct control over API parameters
  • Each method has advantages depending on your specific use case, data volume, and customization needs.

Set up steps

Setup time: ~5-10 minutes

You'll need:

  • A Google Gemini API key
  • n8n with HTTP Request and AI Agent nodes
  • Important: For the HTTP Request nodes making direct API calls to Gemini (Methods 3, 4, and 5), you'll need to set up Query Authentication with your Gemini API key. Add a parameter named "key" with your API key value in the Query Auth section of these nodes.

I'll updated this if I find better ways. Also let me know if you know other ways. Eager to learn :)

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 3 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 4 - Get image from unsplash2

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 6 - Get image from unsplash3

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Transform to base

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 8 - Call Gemini API1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 10 - AI Agent2

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 11 - Google Gemini Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 12 - Get image from unsplash4

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Get PDF file

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Get image from unsplash

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Call Gemini API with PDF

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Call Gemini API with Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Transform to base64 (image)

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 18 - Transform to base64 (pdf)

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 19 - Define Multiple Image URLs

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - Split Out to multiple items

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 21 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Define URLs And Prompts

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 23 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Filter (optional)

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Showing the first 24 of 28 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow 5 ways to process images & PDFs with Gemini AI in n8n
Complexity advanced
Nodes 28
Categories Document Extraction, Multimodal AI
Author Julian Kaiser
Published 04 Mar 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3078/3078.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does 5 ways to process images & PDFs with Gemini AI in n8n do?

How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workflow answers that question by demonstratin...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, Multimodal AI use case.