Clean and validate inbound contact records with Gemini and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Gemini Chat Model and Google Sheets.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Set Schema and Rules (Edit Fields (Set)): sets 2 fields: targetSchema, rules
- First Pass Clean with Gemini (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Chat AI
- Run First Pass Validation (Code): runs custom JavaScript code
- Check First Validation Status (If): checks a condition and branches into true / false
- Append Clean Records to Sheets (Google Sheets): append or update
- Second Pass Clean with Gemini (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Repair AI
- Respond with Clean JSON (Respond to Webhook): sends the response back to the webhook caller
- Run Second Pass Validation (Code): runs custom JavaScript code
- Check Second Validation Status (If): checks a condition and branches into true / false
- Append Bad Records to Quarantine (Google Sheets): append
…plus 1 more step. See the full node list below.
Services it uses
Other Google Gemini + Google Sheets templates (819)
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 (8)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow exposes a POST webhook that cleans and normalizes messy inbound records with Google Gemini, validates the result against strict formatting rules, and then either upserts valid data into Google Sheets or quarantines failures and…