Skip to main content

Extract text from PDF and image using Vertex AI (Gemini) into CSV

Workflow preview

Workflow preview
100%
Extract text from PDF and image using Vertex AI (Gemini) into CSV preview
Open on n8n.io

Important notice

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

1. Workflow Overview

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 statem...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.switch, n8n-nodes-base.googledrive, n8n-nodes-base.extractfromfile, n8n-nodes-base.httprequest, n8n-nodes-base.converttofile, n8n-nodes-base.stickynote

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Extract text from PDF and image using Vertex AI (Gemini) into CSV
Workflow name
Extract text from PDF and image using Vertex AI (Gemini) into CSV

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 tutorial

What this workflow does

  • Upload your PDF or screenshots into Google Drive
  • It then passes the PDF/image to Vertex Gemini to do some A.I. image recognition
  • It then sends the transactions as CSV and stores it into another Google Drive folder

Setup

  1. Set up 2 google drive folders. 1 for uploading and 1 for the output.
  2. Input your Google Drive crendtials
  3. Input your Vertex Gemini credentials

How to adjust it to your needs

  • You can upload other types of documents for information extraction.
  • You can extract any text data from any image or PDF
  • You can adjust the A.I. prompt to do different things

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 - Google Gemini Chat Model

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

Block 2 - Get PDF or Images

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

Block 3 - Route based on PDF or Image

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 2

Block 4 - Download PDF

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

Block 5 - Download Image

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

Block 6 - Extract data from PDF

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

Block 7 - Send data to A.I.

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

Block 8 - Convert to CSV

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 9 - Upload to Google Drive

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

Block 10 - Convert to CSV2

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 11 - Upload to Google Drive1

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

Block 12 - Sticky Note

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

Block 13 - Sticky Note1

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

Block 14 - Sticky Note2

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

Block 15 - Sticky Note3

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

Block 16 - Vertex A.I. extract text

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.4

3. Summary Table

Workflow Extract text from PDF and image using Vertex AI (Gemini) into CSV
Complexity advanced
Nodes 16
Categories Document Extraction, AI Summarization
Author Keith Rumjahn
Published 08 Dec 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2614/2614.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 Extract text from PDF and image using Vertex AI (Gemini) into CSV do?

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 statem...

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, AI Summarization use case.