Extract text from PDF and image using Vertex AI (Gemini) into CSV
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs on Google Drive events (file created). Along the way it connects Google Gemini Chat Model and Google Drive. It also calls openrouter.ai over HTTP.
How it runs
Trigger: On Google Drive events (file created).
- Route based on PDF or Image (Switch): routes items into 2 branches
- Download PDF (Google Drive): download
- Download Image (Google Drive): download
- Extract data from PDF (Extract from File): extracts data from a file (pdf)
- Vertex A.I. extract text (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model
- Send data to A.I. (HTTP Request): calls openrouter.ai (POST)
- Convert to CSV (Convert to File): converts data to a file
- Convert to CSV (Convert to File): converts data to a file
- Upload to Google Drive (Google Drive): uses Google Drive
- Upload to Google Drive (Google Drive): uses Google Drive
Services it uses
HTTP calls to: openrouter.ai
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Switch
n8n-nodes-base.switch - Google Drive
n8n-nodes-base.googleDrive - Extract from File
n8n-nodes-base.extractFromFile - HTTP Request
n8n-nodes-base.httpRequest - Convert to File
n8n-nodes-base.convertToFile - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
From the author
Case Study I'm too lazy to record every transaction for my expense tracking. Since all my expenses are digital, I just extract the transactions from bank PDF statements and screenshots into CSV to import into my budgeting software. Click here to watch Youtube…