Automate data extraction from PDFs and images in Google Drive using this powerful n8n workflow. Leverage Vertex AI (Gemini) and custom LLMs to output categorized CSVs.
Download this n8n workflow template and start using it instantly.
Financial analysts and bookkeepers who handle numerous bank statements or receipts.
Businesses needing to digitize physical documents into structured data formats.
Technical users looking for advanced n8n templates integrating multimodal AI services.
Developers wanting to see a practical application of the LangChain n8n node with Vertex AI.
Manually extracting transaction data from unstructured documents like scanned bank statements or photographic receipts is time-consuming and error-prone. This specialized n8n workflow provides an autonomous solution, acting as a fully automated data pipeline. It starts with a crucial n8n trigger monitoring a specific Google Drive folder for new file uploads. By utilizing powerful n8n node capabilities, the automation intelligently routes files: PDFs are handled via OCR and a powerful external LLM (OpenRouter/Llama) for text extraction, while images are processed directly via Vertex AI (Gemini) multimodal analysis. This robust n8n template ensures that regardless of the input format, the resulting output is a clean, categorized CSV file saved back to Google Drive, dramatically minimizing manual data entry.
The process begins with the Google Drive Trigger n8n node, acting as the primary n8n trigger, which constantly monitors a specified Google Drive folder for file creation events. Once a new file is detected, the n8n workflow uses the Route based on PDF or Image Switch n8n node to inspect the file's MIME type.
PDF Path:
Image Path:
Finalization:
Both paths conclude by converting the raw AI-generated CSV string into a proper file using the Convert to CSV n8n node. Finally, the Upload to Google Drive n8n node saves the processed and categorized CSV file into the designated output folder.
Get PDF or Images n8n trigger and the Google Drive n8n node actions (Download/Upload).CSV Exports) in Google Drive. Configure the IDs in the respective n8n node parameters.Google Gemini Chat Model n8n node). Ensure Vertex AI is enabled on your Google Cloud project and the service account has the necessary permissions.Send data to A.I. HTTP Request n8n node. The Header Name must be 'Authorization' and the Value must be 'Bearer {Your OpenRouter API Key}'. Get PDF or Images (Google Drive Trigger): The initiating n8n trigger. Monitors a specific folder ID (1HOeRP5iwccg93UPUYmWYD7DyDmRREkhj) for the fileCreated event, ensuring the n8n workflow runs immediately upon upload.
Route based on PDF or Image (Switch): Core control-flow n8n node that uses the input item's mimeType ({{$json.mimeType}}) to route files to the PDF path (application/pdf) or the Image path (image/).
Extract data from PDF (Extract From File): A utility n8n node that uses the internal PDF processing operation to extract text content, preparing it for LLM analysis.
Send data to A.I. (HTTP Request): This n8n node sends the extracted PDF text to OpenRouter, prompting the meta-llama/llama-3.1-70b-instruct:free model to return transaction data formatted strictly as CSV.
Google Gemini Chat Model (LangChain LM): Provides the necessary API configuration for Vertex AI (Gemini). Used by the subsequent Vertex AI n8n node for multimodal processing.
Vertex A.I. extract text (LangChain Chain LLM): This advanced n8n node handles the image processing. It uses a multimodal prompt (messageType: imageBinary) to instruct Gemini 1.5 Pro to read transactions from the image and output the results as a categorized CSV.
Convert to CSV (Convert to File): An essential cleanup n8n node that takes the raw CSV text output by the AI models and converts it into a proper binary file ready for upload.
Upload to Google Drive (Google Drive): The final n8n node in the workflow, responsible for saving the generated CSV file (named by the current date {{$today}}) into the specified output folder (CSV Exports).
Use this n8n workflow to reliably extract structured personal data from unstructured chat messages using a self-hosted Mistral NeMo LLM powered by Ollama. Leverage advanced n8n templates for privacy-focused AI automation.

Use this powerful n8n workflow to automatically extract license plate numbers from uploaded images using the GPT-4o vision model via OpenRouter. This n8n template accelerates logistics and data capture.

Build a powerful n8n workflow using an AI agent to analyze YouTube comments, video transcripts, and thumbnails. Leverage OpenAI, Apify, and Google APIs for comprehensive content intelligence.

Use this robust n8n workflow to extract and clean video transcripts from any public YouTube Video ID using an external API. Essential for AI summarization pipelines.

Use this robust n8n workflow to scrape Amazon price drop data using Bright Data, perform structured extraction and sentiment analysis via Google Gemini, and log insights to Google Sheets. Find more powerful n8n templates here.

I create automations with A.I. for SEO content and other smart automations.







































