Hotel receptionist with WhatsApp, Gemini model-switching, Redis & Google Sheets
Overview This project is an AI-powered hotel receptionist built using n8n, designed to handle guest queries automatically through WhatsApp. It integrates Google Gemini, Redis, MySQL, and Google Sheets via LangChain to...
Template notes
Overview This project is an AI-powered hotel receptionist built using n8n, designed to handle guest queries automatically through WhatsApp. It integrates Google Gemini, Redis, MySQL, and Google Sheets via LangChain to create an intelligent conversational system that understands and answers booking-related questions in real time.
A standout feature of this workflow is its AI model-switching system — it dynamically assigns users to different Gemini models, balancing traffic, improving performance, and reducing API costs.
---
How It Works
WhatsApp Trigger The workflow starts when a hotel guest sends a message through WhatsApp. The system captures the message text, contact details, and session information for further processing.
Redis-Based Model Management - The workflow checks Redis for a saved record of the user’s previously assigned AI model. - If no record exists, a Model Decider node assigns a new model (e.g., Gemini 1 or Gemini 2). - Redis then stores this model assignment for an hour, ensuring consistent routing and controlled traffic distribution.
Model Selector The Model Selector routes each user’s request to the correct Gemini instance, enabling parallel execution across multiple AI models for faster response times and cost optimization.
AI Agent Logic The LangChain AI Agent serves as the system’s reasoning core. It: - Interprets guest questions such as: - “Who checked in today?” - “Show me tomorrow’s bookings.” - “What’s the price for a deluxe suite for two nights?” - Generates safe, read-only SQL SELECT queries. - Fetches the requested data from the MySQL database. - Combines this with dynamic pricing or promotions from Google Sheets, if available.