Google Drive PDF and image extraction into CSV via Gemini
This AI-assisted n8n workflow triggers when PDFs or images appear in Google Drive and branches by file type. Text PDFs extract locally before calling an AI endpoint over HTTP, while images run through a Gemini model chain. Extracted data converts into clean CSV files uploaded straight to Drive.
- Catalogue ID
- #1978
- Functional nodes
- 12
- Connections
- 11
- Trigger
- googleDriveTrigger
- AI layer
- AI-assisted
Business problem solved
Shared Drive folders accumulate digital PDFs alongside photographed documents that require different extraction tools. Retyping mixed files into spreadsheets introduces formatting drift and slows operations.
Trigger
The Google Drive trigger activates whenever a new PDF or image lands in the monitored folder.
Connected systems
- Google Drive
- Google Gemini
- HTTP AI endpoint
- File and CSV converter
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow architecture
- 1. Google Gemini Chat Model (AI layer) (connects to Vertex A.I. extract text)
- 2. Get PDF or Images (Trigger) (connects to Route based on PDF or Image)
- 3. Route based on PDF or Image (Logic and routing) (connects to Download PDF, Download Image)
- 4. Download PDF (Service and data) (connects to Extract data from PDF)
- 5. Download Image (Service and data) (connects to Vertex A.I. extract text)
- 6. Extract data from PDF (Service and data) (connects to Send data to A.I.)
- 7. Send data to A.I. (Service and data) (connects to Convert to CSV)
- 8. Convert to CSV (Service and data) (connects to Upload to Google Drive)
- 9. Upload to Google Drive (Service and data)
- 10. Convert to CSV2 (Service and data) (connects to Upload to Google Drive1)
- 11. Upload to Google Drive1 (Service and data)
- 12. Vertex A.I. extract text (AI layer) (connects to Convert to CSV2)
- Trigger
- AI layer
- Logic and routing
- Service and data
Node positions and directed links are generated from the verified catalogue record.
Workflow steps
- 01
File-type switch routing
A switch node inspects incoming Drive files and splits PDFs and image uploads onto separate processing paths.
- 02
PDF extraction and HTTP AI parsing
PDF files extract raw text first and pass structured prompts over HTTP to parse target columns.
- 03
Gemini image text recognition
Image files fetch from Drive into a Gemini LLM chain to read printed or scanned table fields.
- 04
CSV conversion and Drive upload
Outputs from both branches convert into standard CSV files and upload back to your target Google Drive folder.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow contains zero node-level error flags across its 12 functional nodes and 11 connections.
Production layer added by ALTAI
During live deployment, ALTAI adds low-clarity scan review queues, processed-file archiving rules, token credential vaults and a run audit log.
PDF and image to CSV extraction with Gemini Frequently asked questions
Digital PDFs extract text deterministically before parsing, whereas scanned images require multimodal Gemini vision processing.
Yes. Extraction prompts and CSV field names are configured during set-up to mirror your destination system headers.
The file-type switch skips unsupported extensions safely and logs an alert in production setups.
Related n8n workflows
Google Drive MCP document search and reader server
Exposes an MCP trigger for Google Drive search and sub-workflow file reading across PDF, CSV, image and audio documents using extractors and OpenAI.
Gmail invoice attachments to Drive and Sheets
Filters Gmail messages with invoice attachments, uploads and renames PDFs inside Google Drive, parses structured fields with OpenAI and appends reconciliation rows.
Multi-source spreadsheet transform to OneDrive and SFTP
Reads spreadsheets from local storage, HTTP, Google Drive or Microsoft OneDrive, transforms fields, rebuilds files and uploads to SFTP and cloud folders.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms