Skip to main content

Extract invoice data from PDFs with Gemini AI to Google Sheets đź“„

Workflow preview

Workflow preview
100%
Extract invoice data from PDFs with Gemini AI to Google Sheets đź“„ preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Automated Invoice Processing (n8n + AI + Google Workspace) This workflow automates the extraction and processing of invoice data from PDFs stored in a Google Drive folder. It leverages Google Dr...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.comparedatasets, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.googlesheets, n8n-nodes-base.code, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Extract invoice data from PDFs with Gemini AI to Google Sheets đź“„
Workflow name
Extract invoice data from PDFs with Gemini AI to Google Sheets đź“„

đź“„ Automated Invoice Processing (n8n + AI + Google Workspace)

This workflow automates the extraction and processing of invoice data from PDFs stored in a Google Drive folder. It leverages Google Drive, Google Sheets, and Gemini AI to streamline invoice management.

Key Features

  • Automatic Detection: Monitors a Google Drive folder for new invoices.
  • AI-Powered Extraction: Uses Gemini AI to extract structured data including Supplier, Buyer, Items, Total Amount, Tax, and Payment Terms.
  • Data Logging: Appends extracted invoice information to a Google Sheet and tracks processed documents to avoid duplicates.
  • Notifications: Sends email alerts once invoices are successfully processed.
  • Flexible & Extensible: Can be integrated with ERP/CRM systems, Slack/Telegram notifications, or OCR for scanned PDFs.

đź’ˇ Perfect for: Small to medium businesses, accountants, and operations teams looking to reduce manual invoice data entry and improve accuracy.

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 - Intro Sticky

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

Block 2 - Setup Sticky

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

Block 3 - AI Extraction Sticky

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

Block 4 - Data Split Sticky

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

Block 5 - Google Sheets Sticky

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

Block 6 - Gmail Sticky

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

Block 7 - Extend Sticky

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

Block 8 - Compare Datasets1

Type / Role
n8n-nodes-base.compareDatasets - compareDatasets
Config choices
Version 2.3

Block 9 - Extract from File1

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

Block 10 - Google Gemini Chat Model2

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

Block 11 - Log the processing of the doc1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 12 - Cleans output1

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

Block 13 - Get list of pdf files1

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

Block 14 - Read processed docs1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 15 - Sticky Note4

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

Block 16 - Sticky Note5

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

Block 17 - AI Agent - get targeted elements from text1

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 18 - Sticky Note7

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

Block 19 - Google Drive Trigger1

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

Block 20 - Download file1

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

Block 21 - Structured Output Parser1

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 22 - Google Gemini Chat Model3

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

Block 23 - Limit1

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

Block 24 - Send a message1

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Showing the first 24 of 28 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Extract invoice data from PDFs with Gemini AI to Google Sheets đź“„
Complexity advanced
Nodes 28
Categories Invoice Processing, AI Summarization
Author Louis
Published 04 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9261/9261.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 invoice data from PDFs with Gemini AI to Google Sheets đź“„ do?

Automated Invoice Processing (n8n + AI + Google Workspace) This workflow automates the extraction and processing of invoice data from PDFs stored in a Google Drive folder. It leverages Google Dr...

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