A robust n8n workflow for financial automation. Automatically extract invoice data using an OCR n8n node, clean it with AI, and sync structured data to Airtable. Ideal n8n templates for finance teams.
Download this n8n workflow template and start using it instantly.
Finance departments looking to automate accounts payable data entry.
Technical users wanting to leverage local or self-hosted AI models (like Ollama) within an n8n workflow.
Accountants who need reliable, structured invoice data synced directly into Airtable.
n8n users seeking advanced file processing n8n templates.
Manual entry of invoice data is time-consuming and error-prone. This powerful n8n workflow eliminates that burden by creating a seamless, AI-driven pipeline. It starts with an efficient n8n trigger monitoring a Google Drive folder for new files. Once a file is detected, the n8n automation uses specialized OCR models to extract raw text and table data. The subsequent step uses a sophisticated cleaning AI (like Command-R) implemented via an n8n node to enforce strict JSON formatting and crucial numeric standardization (e.g., removing currency symbols and thousands separators). Finally, the structured data is securely logged into Airtable. This n8n workflow demonstrates how to build resilient automation, including pathways to move successful and failed files, ensuring your financial data pipeline is both fast and reliable.
This comprehensive n8n workflow operates in several critical stages:
OCR folder n8n trigger (Google Drive Trigger), which actively monitors a specific folder for newly uploaded invoice files. The Loop Over Items n8n node then ensures that if multiple files arrive simultaneously, they are processed sequentially.file name & ID Set n8n node captures essential metadata (File ID, Original Filename) needed for tracking and later file movement. The Download file n8n node fetches the document's binary data from Google Drive.AI Agent-OCR n8n node utilizes the OpenAI Chat Model (configured for local models like Nanonets-OCR-s) to perform the high-accuracy Optical Character Recognition, returning structured text, HTML tables, and LaTeX equations.Data Cleaner n8n node, powered by another LLM (Command-R via an OpenAI n8n node), receives the raw OCR output. It executes a detailed system prompt to sanitize the data, ensure all monetary fields are strictly numeric, handle date conversions, and output a validated JSON object ready for Airtable.AirTable - Create a record1 n8n node inserts the finalized, structured financial data into the designated Airtable base and table. Date formats are converted during this step using n8n expressions.Move successful n8n node to a 'done' folder. If any AI step fails (due to error pathways defined in the n8n workflow), the file is routed to the Move failed n8n node for review.To deploy this powerful n8n workflow, follow these steps:
ollama pull benhaotang/Nanonets-OCR-s:F16 # For OCR
ollama pull command-r7b:7b-12-2024-q8_0 # For CleaningAI Agent-OCR and Data Cleaner). If using Ollama, your API base URL should point to your local endpoint (e.g., http://localhost:11434/v1).OCR folder n8n trigger to watch your desired input folder. Also, update the Move successful and Move failed n8n nodes to point to their respective clean-up folders.This n8n workflow utilizes several key n8n nodes to achieve its goal:
OCR folder (Google Drive Trigger n8n trigger):
Function: Initiates the n8n workflow whenever a new file is created in the designated 'finocr' Google Drive folder.
Key Configuration: Event set to fileCreated, Trigger On set to specificFolder.
Download file (Google Drive n8n node):
Function: Downloads the binary content of the newly created file, making it available for the downstream AI n8n node.
Key Configuration: Operation set to download, using the ID extracted from the initial n8n trigger data.
AI Agent-OCR (Langchain Agent n8n node):
Function: Orchestrates the initial extraction of text, tables, and structured elements from the document using the connected OCR model.
Key Configuration: Uses a specific prompt instructing extraction and formatting of tables in HTML and equations in LaTeX.
Data Cleaner (OpenAI n8n node):
Function: Takes the raw, unstructured OCR output and cleans it according to a strict financial schema, ensuring all numeric fields are standardized (no commas, no currency symbols). This is a vital step in this n8n automation.
Key Configuration: Model ID set to command-r7b:7b-12-2024-q80, JSON Output enabled, and a highly detailed system message defining the target JSON schema and cleaning rules.
AirTable - Create a record1 (Airtable n8n node):
Function: Creates a new record in the Airtable 'Invoices' table using the validated JSON output from the data cleaning n8n node.
Key Configuration: Mapping defines precise field assignments, including a date conversion expression (DateTime.fromFormat) for IssueDate. Typecast is enabled.
Move successful / Move failed (Google Drive n8n node):
* Function: Cleans up the input folder by moving the processed file to either a success or failure archive folder, maintaining the integrity of the n8n workflow’s input queue.
Use this powerful n8n workflow to automate invoice generation and client email delivery instantly upon project status update in Google Sheets. Leveraging the Google Sheets n8n trigger and specialized n8n node setup.

Use this advanced n8n workflow to automate invoice creation via Jotform and manage intelligent payment reminders using QuickBooks and Outlook, featuring AI-powered daily summary reports.

Automate inventory management using this n8n workflow. It daily checks stock levels in Google Sheets, calculates reorders, generates purchase orders, sends supplier emails via Gmail, and logs all PO data. Discover more n8n templates.

Use this robust n8n workflow to automatically scan, process, and extract structured financial data from Japanese invoices (PDFs/Images) using OCR.Space and GPT-4o-mini, logging results directly into Google Sheets.

Automate your billing cycle instantly. This advanced n8n workflow uses a Jotform webhook trigger to check Xero contacts, create professional invoices, leverage GPT-4o-mini for email content drafting, and notify your team via Slack. Get the n8n templates here.

Hi! 👋 I'm Ehsan , a BI & Data Analyst and AI Specialist with a passion for automation! 🤖 I use n8n , Python , and SQL to build powerful data pipelines and turn complex data into real-world insights.







































