Templates / Detect duplicate invoices with Google Sheets, Google Gemini and Slack

Detect duplicate invoices with Google Sheets, Google Gemini and Slack

Ready for 3.0

by WeblineIndia ✓ · 33 views · created 2026-08-20 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 17 nodes and runs on Google Sheets events (row added). Along the way it connects Google Gemini Chat Model, Google Sheets and Slack.

How it runs

Trigger: On Google Sheets events (row added).

  1. Retrieve Invoice History (Google Sheets): uses Google Sheets
  2. Prepare Incoming Invoices (Aggregate): combines items into one
  3. Prepare Historical Records (Aggregate): combines items into one
  4. Consolidate Invoice Data (Merge): merges the data from its input branches
  5. Duplicate Detection Engine (Code): runs custom JavaScript code
  6. AI Duplicate Risk Assessment (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model
  7. Combine Detection & AI Results (Merge): merges the data from its input branches
  8. Extract AI Investigation Results (Code): runs custom JavaScript code
  9. Prepare Investigation Record (Edit Fields (Set)): sets 9 fields: invoice_id, classification, confidence…
  10. Fraud Risk Decision Gateway (If): checks a condition and branches into true / false

…plus 5 more steps. See the full node list below.

Services it uses

Google Gemini Chat ModelGoogle SheetsSlack

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (11)

From the author

Quick Overview This workflow detects potential duplicate invoices when new rows are added in Google Sheets, scores matches against historical invoices, uses Google Gemini to classify risk, and then alerts Slack, calls an ERP hold API, and logs outcomes back…

Excerpt from WeblineIndia's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.