Templates / Clean and validate inbound contact records with Gemini and Google Sheets

Clean and validate inbound contact records with Gemini and Google Sheets

Ready for 3.0

by Oka Hironobu ✓ · 0 views · created 2026-08-12 · Document Extraction, 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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.

  1. Set Schema and Rules (Edit Fields (Set)): sets 2 fields: targetSchema, rules
  2. First Pass Clean with Gemini (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Chat AI
  3. Run First Pass Validation (Code): runs custom JavaScript code
  4. Check First Validation Status (If): checks a condition and branches into true / false
  5. Append Clean Records to Sheets (Google Sheets): append or update
  6. Second Pass Clean with Gemini (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Repair AI
  7. Respond with Clean JSON (Respond to Webhook): sends the response back to the webhook caller
  8. Run Second Pass Validation (Code): runs custom JavaScript code
  9. Check Second Validation Status (If): checks a condition and branches into true / false
  10. Append Bad Records to Quarantine (Google Sheets): append

…plus 1 more step. See the full node list below.

Services it uses

Google Gemini Chat ModelGoogle Sheets

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)

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…

Excerpt from Oka Hironobu'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.