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

Wysoka złożoność Wyzwalacz16 węzłów🏷️ Invoice Processingautor: Yashraj singh sisodiya

Przegląd

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

Użyte węzły

Google SheetsGoogle DriveGmailCodeAI AgentGoogle Gemini Chat ModelGoogle Gemini

Podgląd workflow

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

Jak to działa

  1. 1

    Wyzwalacz

    Workflow uruchamia się wyzwalaczem wyzwalacz.

  2. 2

    Przetwarzanie

    Dane przepływają przez 16 węzłów, connecting agent, chattrigger, code.

  3. 3

    Wyjście

    Workflow kończy automatyzację i dostarcza wynik do skonfigurowanego miejsca docelowego.

Szczegóły węzłów (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

Jak zaimportować ten workflow

  1. 1Kliknij przycisk Pobierz JSON po prawej stronie, aby zapisać plik workflow.
  2. 2Otwórz swoją instancję n8n. Przejdź do Workflow → Nowy → Importuj z pliku.
  3. 3Wybierz pobrany plik extract-process-invoices-with-gemini-ai-google-sheets-gmail-notifications i kliknij Importuj.
  4. 4Skonfiguruj dane uwierzytelniające dla każdego węzła usługi (klucze API, OAuth itp.).
  5. 5Kliknij Testuj workflow, aby sprawdzić, czy wszystko działa, a następnie aktywuj go.

Lub wklej bezpośrednio w n8n → Importuj z JSON:

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

Integracje

agentchattriggercodegmailgoogledrivegooglegeminigooglesheetsiflmchatgooglegeminiset

Pobierz ten workflow

Pobierz i zaimportuj jednym kliknięciem

Pobierz JSONZobacz na n8n.io
Węzły16
Złożonośćhigh
Wyzwalacztrigger

Autor

Yashraj singh sisodiya

Yashraj singh sisodiya

@theyashsisodiya

Tagi

agentchattriggercodegmailgoogledrivegooglegeminigooglesheetsiflmchatgooglegeminiset

Nowy w n8n?

n8n to darmowe narzędzie open-source do automatyzacji workflow. Hostuj samodzielnie lub użyj wersji chmurowej.

Pobierz n8n za darmo →

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