Skip to main content

Automated invoice-PO matching with Google Gemini AI and email notifications

Workflow preview

Workflow preview
100%
Automated invoice-PO matching with Google Gemini AI and email notifications 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 AI Agent for n8n Overview The Automated Invoice Processing AI Agent in n8n is designed to streamline and optimize invoice management for finance teams and accounts paya...

Best for

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

Tools used

n8n-nodes-base.googledrivetrigger, n8n-nodes-base.googledrive, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.informationextractor, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.googlesheetstool

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Automated invoice-PO matching with Google Gemini AI and email notifications
Workflow name
Automated invoice-PO matching with Google Gemini AI and email notifications

Automated Invoice-Processing AI Agent for n8n

Overview The Automated Invoice-Processing AI Agent in n8n is designed to streamline and optimize invoice management for finance teams and accounts payable (AP) professionals. This solution addresses the common challenge of verifying invoice data manually, cross-checking it against purchase orders (POs), and ensuring compliance before releasing payments. By intelligently fetching invoices from Google Drive, extracting key details, validating them against PO records from Google Sheets, and automating the next actions, this system reduces human intervention, minimizes errors, and accelerates the payment process.

Target Audience

This automation primarily serves finance and AP teams responsible for managing large volumes of vendor invoices. It also supports finance managers, procurement departments, and auditors who require accuracy in payment reconciliation, ensuring that invoices align with approved POs before processing.

Business Problem Addressed

Organizations frequently struggle with time-consuming manual invoice verification and data entry. Discrepancies between invoices and purchase orders can lead to payment delays, compliance risks, or duplicate payments. This n8n-based AI agent automates that process—ensuring that every invoice is validated, exceptions are flagged to the finance team promptly, and payments of smaller value (under defined thresholds) are processed automatically.

Prerequisites

Active n8n account or self-hosted instance

Google Drive and Google Sheets connected via n8n credentials

LLM (AI node) configured for document extraction (optional but recommended)

A Google Sheet set up with existing PO data (including PO Number, Amount, and Date fields)

Setup Instructions

Connect Google Drive and Google Sheets integrations within n8n.

Configure the workflow trigger to monitor a designated "Invoices" folder.

Add a document-parsing node to extract invoice details such as PO Number, Invoice Date, and Amount.

Implement conditional logic:

If the invoice amount > 5000, the agent cross-references PO details from the Google Sheet.

If it matches, it updates the PO sheet status to “Process Payment.”

If not, an automated email notifies the finance team.

If the amount ≤ 5000, the workflow marks it for direct payment.

Test the workflow with sample invoices before full deployment.

Customization Options

Adjust the payment threshold value (e.g., 10,000 instead of 5,000).

Customize the email notification template and recipient list.

Integrate with accounting systems such as QuickBooks or SAP for end-to-end automation.

Add audit logging nodes to create traceability for every action taken.

This AI-driven automation brings speed, accuracy, and scalability to invoice verification—empowering finance professionals to focus on analytical and strategic tasks rather than repetitive manual work.

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 - Google Drive Trigger

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

Block 2 - Download file

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

Block 3 - Extract from File

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

Block 4 - Information Extractor

Type / Role
@n8n/n8n-nodes-langchain.informationExtractor - informationExtractor
Config choices
Version 1.2

Block 5 - Google Gemini Chat Model

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

Block 6 - Switch

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

Block 7 - AI Agent

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

Block 8 - Google Gemini Chat Model1

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

Block 9 - PO_DB

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 10 - Update_Row

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 11 - If

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

Block 12 - Append row in sheet

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

Block 13 - Send a message

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

Block 14 - Structured Output Parser

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

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

3. Summary Table

Workflow Automated invoice-PO matching with Google Gemini AI and email notifications
Complexity advanced
Nodes 19
Categories Invoice Processing, AI Summarization
Author Abdul Matheen
Published 24 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10123/10123.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 Automated invoice-PO matching with Google Gemini AI and email notifications do?

Automated Invoice Processing AI Agent for n8n Overview The Automated Invoice Processing AI Agent in n8n is designed to streamline and optimize invoice management for finance teams and accounts paya...

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.