Extract & Process Invoices with Gemini AI, Google Sheets & Gmail Notifications — n8n Workflow

Hoch Komplexität Auslöser16 Knoten🏷️ Invoice Processingvon Yashraj singh sisodiya

Übersicht

AI-Powered Invoice Extraction & Automation System Workflow

Aim

The aim of the Invoice Data Automation workflow is to streamline invoice processing by extracting, validating, and storing invoice details automatically. It uses AI to read invoices (from images/PDFs), structures the data in JSON, checks for missing or duplicate entries, and records the information in a Google Sheet while also uploading the original invoice to Google Drive. Additionally, it sends email notifications for successful

Verwendete Knoten

Google SheetsGoogle DriveGmailCodeAI AgentGoogle Gemini Chat ModelGoogle Gemini

Workflow-Vorschau

Node 1: When chat message received
This is a *trigger node* that starts the workflow whene
It supports file uploads, meaning users can directly se
Node 3: AI Agent1
This node acts as an AI processing step that takes the
It applies a *system message* that defines cle
Node 2: Analyze image1
This node uses *Google Gemini (PaLM API)* to analyze th
It takes the binary file (`data0`) and processes it thr
Node 4: Google Gemini Chat Model1
This node provides the language model backend for the A
It connects to Google Gemini (PaLM API) and powers the
Node 6: Get data
This node connects to a Google Sheet that acts as the *
It performs a lookup using the `Entry_ID` column and co
Node 5: Make data in JSON structure format
This node is a Set node that organizes the AI Agent’s o
It assigns the extracted invoice data to a single field
Node 8: New data add using payload
This node is a Code node that ensures proper handling o
It first checks if the Google Sheets lookup returned an
Node 9: Check Mandatory fields
This is a Code node that validates the invoice data.
It checks if all *mandatory fields* (`invoice_id`, `sho
Node 10: If – check missing field
This is an If node that decides the workflow path based
It checks the `status` field returned by the *Check Man
Node 11: no missing field – new data add usin
This is a Code node that passes forward only the valid
It retrieves the structured payload
Node 12: Append data to sheet
This node writes the validated invoice data into the Go
It uses the *append* operation to add a new row with ma
Node 13: Send successful email
This node sends a confirmation email via Gmail once a n
The email includes key details like *Invoice ID, Compan
Node 7: check if Data exist or not in table
This is an If node that checks whether the invoice alre
It does this by verifying if the `Get data` node return
Node 8.1: Duplicate entry send mail
This node sends an email notification via Gmail when an
The email is formatted in *HTML* and includes details l
Node 11.1: Send missing field error on mail
This node sends an error notification email via Gmail w
The email subject highlights the error
Node 2.1: Upload invoice to drive
This node uploads the original invoice file to Google D
It takes the uploaded file (`data0`) and saves it
model
W
When chat message received
Analyze image1
AI Agent1
Google Gemini Chat Model1
Get data
M
Make data in json struct…
C
check if Data exist or n…
Upload invoice to drive
no missing field - new d…
I
If - check missing field
Send missing field error…
Duplicate entry send mail
New data add using payload
Append data to sheet
Check Mandatory fields
Send successful email
16 nodes15 edges

So funktioniert es

  1. 1

    Auslöser

    Der Workflow startet mit einem auslöser-Auslöser.

  2. 2

    Verarbeitung

    Die Daten fließen durch 16 Knoten, connecting agent, chattrigger, code.

  3. 3

    Ausgabe

    Der Workflow schließt seine Automatisierung ab und liefert das Ergebnis an das konfigurierte Ziel.

Knotendetails (16)

GO

Google Sheets

googleSheets

#1
GO

Google Drive

googleDrive

#2
GM

Gmail

gmail

#3
CO

Code

code

#4
AI

AI Agent

n8n-nodes-langchain.agent

#5
GO

Google Gemini Chat Model

n8n-nodes-langchain.lmChatGoogleGemini

#6
GO

Google Gemini

n8n-nodes-langchain.googleGemini

#7

So importieren Sie diesen Workflow

  1. 1Klicken Sie rechts auf die Schaltfläche JSON herunterladen, um die Workflow-Datei zu speichern.
  2. 2Öffnen Sie Ihre n8n-Instanz. Gehen Sie zu Workflows → Neu → Aus Datei importieren.
  3. 3Wählen Sie die heruntergeladene Datei extract-process-invoices-with-gemini-ai-google-sheets-gmail-notifications und klicken Sie auf Importieren.
  4. 4Richten Sie Anmeldedaten für jeden Dienstknoten ein (API-Schlüssel, OAuth usw.).
  5. 5Klicken Sie auf Workflow testen, um zu überprüfen, ob alles funktioniert, und aktivieren Sie es dann.

Oder direkt in n8n → Aus JSON importieren einfügen:

{ "name": "Extract & Process Invoices with Gemini AI, Google Sheets & Gmail Notifications", "nodes": [...], ...}

Integrationen

agentchattriggercodegmailgoogledrivegooglegeminigooglesheetsiflmchatgooglegeminiset

Diesen Workflow holen

Herunterladen und mit einem Klick importieren

JSON herunterladenAuf n8n.io ansehen
Knoten16
Komplexitäthigh
Auslösertrigger

Erstellt von

Yashraj singh sisodiya

Yashraj singh sisodiya

@theyashsisodiya

Tags

agentchattriggercodegmailgoogledrivegooglegeminigooglesheetsiflmchatgooglegeminiset

Neu bei n8n?

n8n ist ein kostenloses Open-Source-Workflow-Automatisierungstool. Selbst hosten oder die Cloud-Version nutzen.

n8n kostenlos holen →

Related Invoice Processing Workflows

COCOEMEX+5
medium

Automate Custom QuickBooks Invoice PDFs & Email with n8n

Standard accounting templates often fail to reflect a premium brand identity. This sophisticated n8n workflow bridges the gap between financial record-keeping and professional client presentation. By moving beyond the native limitations of QuickBooks Online, this automation enables businesses to generate high-end, multi-page PDF invoices that align perfectly with their corporate styling. The process begins the moment a new invoice is generated in QuickBooks, triggering a webhook that captures real-time billing data. The workflow then utilizes advanced HTML-to-File conversion and custom Code nodes to structure data into a polished, branded layout. It handles complex logic such as line-item merging and multi-page formatting automatically. Once the document is rendered, the system bypasses generic 'no-reply' senders by routing the finalized PDF through your preferred email provider. This ensures a seamless, white-labeled experience for your clients while eliminating the manual overhead of exporting, styling, and attaching files. Ideal for agencies and service providers, this flow guarantees that your most frequent touchpoint—the bill—is as professional as your work. **Common Use Cases:** - High-end creative agencies requiring bespoke, white-labeled billing documents for premium clients. - Automated recurring subscription billing where custom tax disclosures or localized branding are required. - Service-based businesses needing to attach dynamic project reports or terms of service directly to QuickBooks invoices.

🔗 Webhook·12 nodes