Skip to main content

Extract Data from Invoices with OCR, Gemini AI, and Airtable

Workflow preview

Workflow preview
100%
Extract Data from Invoices with OCR, Gemini AI, and Airtable preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This workflow contains community nodes that are only compatible with the self hosted version of n8n. Extract Data from Invoices with OCR, Gemini AI, and Airtable This template automates the proc...

Best for

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

Tools used

n8n-nodes-base.localfiletrigger, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-tesseractjs.tesseractnode, n8n-nodes-base.switch, n8n-nodes-base.aggregate, n8n-nodes-pdf-page-extract.pdfpageextract, n8n-nodes-base.telegram, n8n-nodes-base.readwritefile

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Extract Data from Invoices with OCR, Gemini AI, and Airtable
Workflow name
Extract Data from Invoices with OCR, Gemini AI, and Airtable

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

πŸ“– Extract Data from Invoices with OCR, Gemini AI, and Airtable

This template automates the process of extracting key details from invoices (PDF, JPG, PNG) and storing them in Airtable using OCR + AI. It eliminates manual data entry by leveraging Tesseract OCR, Google Gemini AI, and Airtable, with optional Telegram notifications. The workflow is ideal for freelancers, small businesses, and finance teams who need a lightweight and automated solution for handling invoice data.

πŸ”‘ Features

  • βœ… Supports JPG, PNG, and PDF invoices
  • 🧠 Automatically extracts: Invoice Number, Invoice Date (standardized to YYYY-MM-DD), Subtotal, Tax, Total, Currency, Vendor Name, Email, Phone, and Ship-to Address
  • πŸ“€ Sends structured data into Airtable automatically
  • πŸ“¬ Sends a Telegram notification once data is processed (optional)
  • πŸ” Triggers automatically when new files are dropped into a folder

⚠️ Disclaimer

This workflow uses community nodes (n8n-nodes-tesseractjs, n8n-nodes-pdf-page-extract).
It works best on self-hosted n8n or n8n cloud instances where these nodes are available.
You must install and configure these nodes before importing the workflow.

βš™οΈ Setup & Configuration

  1. Install Docker with n8n.
  2. Mount your folder (e.g., ~/self-hosted-ai/ocr-bot:/shared) so invoices can be dropped into /shared/ocr/.
  3. Import the provided JSON workflow into n8n.
  4. Replace credentials:
    • Google Gemini API key
    • Airtable base + token
    • Telegram bot token (optional)
  5. Drop a sample invoice (PDF/JPG/PNG) into the configured folder.
  6. Check Airtable for structured data and Telegram (if enabled) for confirmation.

🧠 Customization

  • Modify the AI prompt to extract additional fields.
  • Replace Airtable with Google Sheets or another database if preferred.
  • Update the Telegram node with your own Chat ID for notifications.

πŸ’‘ Tip: Add a screenshot of the workflow in n8n to help users quickly understand the node structure.

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 - Local File Trigger

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

Block 2 - Google Gemini Chat Model

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

Block 3 - Tesseract

Type / Role
n8n-nodes-tesseractjs.tesseractNode - tesseractNode
Config choices
Version 1

Block 4 - Switch

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

Block 5 - Aggregate

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

Block 6 - PDF Page Extract

Type / Role
n8n-nodes-pdf-page-extract.pdfPageExtract - pdfPageExtract
Config choices
Version 1

Block 7 - Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 8 - Read File

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

Block 9 - Sticky Note

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

Block 10 - Sticky Note1

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

Block 11 - Sticky Note2

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

Block 12 - Sticky Note3

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

Block 13 - Sticky Note4

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

Block 14 - Sticky Note5

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

Block 15 - Sticky Note6

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

Block 16 - Extract Invoice Data (Gemini)

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

Block 17 - Check File Type

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

Block 18 - Save to Airtable

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

3. Summary Table

Workflow Extract Data from Invoices with OCR, Gemini AI, and Airtable
Complexity advanced
Nodes 18
Categories AI Summarization, Multimodal AI
Author Vinay
Published 20 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7634/7634.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 Data from Invoices with OCR, Gemini AI, and Airtable do?

This workflow contains community nodes that are only compatible with the self hosted version of n8n. Extract Data from Invoices with OCR, Gemini AI, and Airtable This template automates the proc...

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