What This Workflow Does
This n8n workflow demonstrates five distinct methods for processing and analyzing images and PDF documents using Google’s Gemini AI. Each approach showcases different integration patterns and use cases, from simple single-image analysis to batch processing of multiple file types.
How It Works
The workflow is structured as a multi-branch system that activates when you click “Test workflow”:
- Branch 1 analyzes a single image with automatic binary data passthrough to Gemini
- Branch 2 processes multiple images while allowing custom prompt customization for each
- Branch 3 uses standard n8n item processing to send requests directly to the Gemini API
- Branch 4 extracts and analyzes content from PDF files via direct API integration
- Branch 5 processes image files through direct API calls with full control over parameters
The workflow uses conditional filtering, batch processing, and file extraction nodes to handle different media types and organize the analysis flow appropriately.
Use Cases
- Document Processing: Automatically extract and analyze text, tables, and data from PDF reports and forms
- Content Moderation: Screen multiple images quickly to identify inappropriate or non-compliant content
- Product Catalog Management: Generate descriptions and metadata for product images in bulk
- Receipt and Invoice Processing: Extract line items, totals, and vendor information from financial documents
- Visual Quality Assurance: Analyze screenshots and product photos to detect defects or quality issues
Nodes Used
- Manual Trigger: Initiates the workflow execution
- Google Gemini Chat: Sends image and document analysis requests to the Gemini AI model
- Agent: Orchestrates AI-powered decision making within the workflow
- HTTP Request: Makes direct API calls to external services and Gemini endpoints
- Split Out: Divides array data into individual items for processing
- Extract from File: Retrieves and parses content from uploaded files
- Split in Batches: Groups items into manageable batch sizes for processing
- Set: Defines and transforms data between workflow steps
- Sticky Note: Documents workflow logic and branch purposes
- Filter: Conditionally routes data based on specified criteria
Prerequisites
- Active n8n instance (self-hosted or cloud)
- Google Cloud account with Gemini API enabled
- Valid Google API credentials and authentication token
- Access to the files or images you want to analyze
- Basic understanding of n8n workflow structure and node configuration
Difficulty Level
Intermediate. This workflow requires familiarity with n8n node connections, API authentication, and JSON data handling. Users should understand how to configure the Google Gemini integration and customize prompts for their specific use cases. The multi-branch structure makes it more complex than beginner templates, but each branch can be used independently for simpler implementations.
This workflow template is shared under the n8n fair-code license. Free to use and modify.
Leave a Reply