Skip to main content

Invoice processor & validator with OCR, AI & Google Sheets

Workflow preview

Workflow preview
100%
Invoice processor & validator with OCR, AI & 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

Say goodbye to manual invoice checking! This smart workflow automates your entire invoice processing pipeline using AI , OCR , and Google Sheets . ️ What This Workflow Does: 1. Reads an invo...

Best for

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

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.splitout, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.readwritefile, n8n-nodes-base.extractfromfile, n8n-nodes-base.if

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Invoice processor & validator with OCR, AI & Google Sheets
Workflow name
Invoice processor & validator with OCR, AI & Google Sheets

📝 Say goodbye to manual invoice checking!

This smart workflow automates your entire invoice processing pipeline using AI, OCR, and Google Sheets.


⚙️ What This Workflow Does:

📥 1. Reads an invoice PDF — Select a local PDF invoice from your machine.

🔍 2. Extracts raw text using OCR — Converts scanned or digital PDFs into readable text.

🧠 3. AI Agent processes the text — Transforms messy raw text into clean JSON using natural language understanding.

🧱 4. Structures and refines the JSON — Converts AI output into a structured, usable format.

🔄 5. Splits item-wise data — Extracts individual invoice line items with all details.

🆔 6. Generates unique keys — Creates a unique identifier for each item for tracking.

📊 7. Updates Google Sheet — Adds extracted items to your designated sheet automatically.

📂 8. Fetches master item data — Loads your internal product master to validate against.

9. Validates item name & cost — Compares extracted items with your official records to verify accuracy.

📌 10. Updates results per item — Marks each item as Valid or Invalid in the sheet based on matching.


💼 Use Case:

Perfect for businesses, freelancers, or operations teams who receive invoices and want to automate validation, detect billing errors, and log everything seamlessly in Google Sheets — all using the power of AI + n8n.

> 🔁 Fast. Accurate. Zero manual work.


#OCR #AI #Invoices #Automation.

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 - When clicking ‘Test workflow’

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

Block 2 - OpenRouter Chat Model

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

Block 3 - Split Out

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

Block 4 - Post-Processing

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

Block 5 - Text Extractor

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

Block 6 - Read/Write Files from Disk

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

Block 7 - Extract from File

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

Block 8 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Send Raw Text Again

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Validation

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

Block 11 - Send Invoice Data

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

Block 12 - Fetch Master Data

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

Block 13 - Update Results

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

Block 14 - Generate Unique Key

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - Sticky Note

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

Block 16 - Sticky Note1

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

Block 17 - Sticky Note2

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

Block 18 - Sticky Note3

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

Block 19 - Sticky Note4

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

Block 20 - Sticky Note5

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

Block 21 - Sticky Note6

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

Block 22 - Sticky Note7

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

3. Summary Table

Workflow Invoice processor & validator with OCR, AI & Google Sheets
Complexity advanced
Nodes 22
Categories Invoice Processing, AI Summarization
Author Dhrumil Patel
Published 20 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4247/4247.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 Invoice processor & validator with OCR, AI & Google Sheets do?

Say goodbye to manual invoice checking! This smart workflow automates your entire invoice processing pipeline using AI , OCR , and Google Sheets . ️ What This Workflow Does: 1. Reads an invo...

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.