Automate Invoice Data Extraction from Google Drive to Airtable using Nanonets OCR & Command-R

How it works This template creates a fully automated "hands-off" pipeline for processing financial documents. It's perfect for small businesses, freelancers, or operations teams who want to stop manually entering invoice and receipt data.

When you drop a new image/multiple images file into a specific Google Drive folder, this workflow automatically: Triggers and downloads the new file. Performs OCR on the file using a local AI model (Nanonets-OCR-s) to extract all the raw text. Cleans & Structures the raw text using a second local AI model (command-r7b). This step turns messy text into a clean, predictable JSON object. Saves the structured data (like InvoiceNumber, TotalAmount, IssueDate, etc.) to a new record in your Airtable base. Moves the original file to a "Done" or "Failed" folder to keep your inbox clean and organized.

Requirements Google Drive Account:** For triggering the workflow and storing files. Airtable Account:** To store the final, structured data. Ollama (Local AI):** This template is designed to run locally for free. You must have Ollama running and pull two models from your terminal: ollama pull benhaotang/Nanonets-OCR-s:F16 ollama pull command-r7b:7b-12-2024-q8_0

How to set up Setup should take about 10-15 minutes. The workflow contains 7 sticky notes that will guide you step-by-step.

Airtable: Use the link in the main sticky note ([1]) to duplicate the Airtable base to your own account. Ollama: Make sure you have pulled the two required models listed above. Credentials: You will need to add three credentials in n8n: Your Google Drive (OAuth2) credentials. Your Airtable (Personal Access Token) credentials. Your Ollama credentials. (To do this, create an "OpenAI API" credential, set the Base URL to your local server (e.g., http://localhost:11434/v1), and use ollama as the API Key). Follow the Notes: Click through the workflow and follow the numbered sticky notes ([1] to [6]) to connect your credentials and select your folders for each node.

How to customize the workflow Use Cloud AI:** This template is flexible! You can easily swap the local Ollama models for a cloud provider (like OpenAI's GPT-4o or Anthropic's Claude 3). Just change the credentials and model name in the two AI nodes (OpenAI Chat Model and Data Cleaner). Add More Fields:** To extract more data (e.g., SupplierVATNumber), simply add the new field to the prompt in the Data Cleaner node and map it in the AirTable - Create a record1 node.

0
Downloads
0
Views
8.03
Quality Score
beginner
Complexity
Created:11/5/2025
Updated:11/26/2025

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments