Validate procurement records and learn error patterns with Gemini and Data Tables
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Gemini Chat Model.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Configure Validation Rules (Edit Fields (Set)): sets 9 fields: cfg_default_currency, cfg_default_tax_rate, cfg_tax_tolerance…
- Normalize and Validate Procurement Record (Code): runs custom Python code
- Find Known Error Pattern (Data table): get
- Merge: merges the data from its input branches
- Is Trusted Pattern Known (If): checks a condition and branches into true / false
- Reuse Trusted Pattern Correction (Edit Fields (Set)): sets 4 fields: review_source, known_pattern_matched, historical_anomaly_detected…
- Analyze Procurement Anomalies (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model
- Merge: merges the data from its input branches
- Build Unified Error Decision (Edit Fields (Set)): sets 6 fields: known_pattern_matched, ai_anomaly_detected, has_detected_error…
- Are Errors Detected (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 (9)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Data table
n8n-nodes-base.dataTable - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Respond to Webhook
n8n-nodes-base.respondToWebhook - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
From the author
Quick Overview This workflow receives procurement line-item data via a webhook, validates and normalizes it, checks for known recurring error patterns in an n8n Data Table, and uses Google Gemini to detect semantic anomalies when needed, returning an…