Detect duplicate invoices with Google Sheets, Google Gemini and Slack
Ready for 3.0What 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).
- Retrieve Invoice History (Google Sheets): uses Google Sheets
- Prepare Incoming Invoices (Aggregate): combines items into one
- Prepare Historical Records (Aggregate): combines items into one
- Consolidate Invoice Data (Merge): merges the data from its input branches
- Duplicate Detection Engine (Code): runs custom JavaScript code
- AI Duplicate Risk Assessment (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model
- Combine Detection & AI Results (Merge): merges the data from its input branches
- Extract AI Investigation Results (Code): runs custom JavaScript code
- Prepare Investigation Record (Edit Fields (Set)): sets 9 fields: invoice_id, classification, confidence…
- 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
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)
- Code
n8n-nodes-base.code - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Google Sheets Trigger
n8n-nodes-base.googleSheetsTrigger - Aggregate
n8n-nodes-base.aggregate - Google Sheets
n8n-nodes-base.googleSheets - Merge
n8n-nodes-base.merge - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set
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…