Reconcile and diagnose discrepancies between two CSV exports with Gemini
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs when someone submits an n8n form (“Reconcile two exports that should agree”). Along the way it connects Google Gemini Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Reconcile two exports that should agree”).
- Sort Out the Two Files (Code): runs custom JavaScript code
- Read the Source of Truth (Extract from File): extracts data from a file
- Read Your Records (Extract from File): extracts data from a file
- Reconcile the Two Sides (Compare Datasets): uses Compare Datasets
- Only in the Source (Edit Fields (Set)): sets 1 field: bucket
- Agrees (Edit Fields (Set)): sets 1 field: bucket
- Values Disagree (Edit Fields (Set)): sets 1 field: bucket
- Only in Your Records (Edit Fields (Set)): sets 1 field: bucket
- Assemble the Reconciliation (Code): runs custom JavaScript code
- Diagnose Why They Drifted (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini for Diagnosis; output parser: Diagnosis Schema
…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)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Code
n8n-nodes-base.code - Extract from File
n8n-nodes-base.extractFromFile - Compare Datasets
n8n-nodes-base.compareDatasets - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - n8n Form
n8n-nodes-base.form - Convert to File
n8n-nodes-base.convertToFile
From the author
Quick Overview This workflow collects two CSV exports via an n8n form, reconciles them by a user-specified key and amount column, and uses Google Gemini to diagnose likely systemic causes of any drift, returning either a “balances” confirmation or a…