
Category: Operational AI Automations / Sentiment RoutingCore Stack: n8n Cloud, Google Gemini (Advanced Chat Model), Google Workspace, Gmail APIArchitecture Style: Agentic Loop with Type-Safe Structured Parsing
A production-ready internal automation system built on n8n Cloud designed to ingest, process, categorize, and act upon customer feedback in real-time. By utilizing Google Gemini in an agentic node pattern combined with strict JSON schema parsing, the system autonomously evaluates incoming reviews, updates operational databases, and triggers targeted routing pipelines to specific department heads (Kitchen, Delivery, Service, or a general Fallback channel).
Google Sheets Trigger ➔ Extract Data)rowAdded trigger capturing raw review submissions.AI Agent ➔ Structured Output Parser)Structured Output Parser. This forces Gemini to output data matching a strict schema. The model doesn't just guess; it outputs a precise JSON object containing:
sentimentScore: A normalized rating.targetDepartment: Explicit categorization mapping (Kitchen, Delivery, Service, or Fallback).contextualSummary: A concise breakdown of the core complaint or praise.Set Values ➔ Update Feedback Row)Set Values modifier node.If ➔ Switch ➔ Gmail API)If node) to check system flags.Switch node governed by strict rules matching the targetDepartment output string.