Build an intelligent n8n workflow agent connecting Google Gemini to a PostgreSQL database for real-time product queries, quoting, and expert hardware store advice. Use advanced n8n templates.
Download this n8n workflow template and start using it instantly.
E-commerce managers needing automated product information retrieval.
Businesses utilizing complex n8n templates for advanced customer support.
Developers looking to build custom AI agents with external database connections via an n8n node.
Users seeking a practical example of the n8n Micro-Content Provider (MCP) pattern.
This robust n8n workflow solves the challenge of providing real-time, accurate product information and complex project advice within a conversational interface. This n8n automation utilizes Google Gemini (via the dedicated n8n node) and connects it directly to a live PostgreSQL database containing detailed product inventory. The architecture leverages the n8n Micro-Content Provider (MCP) pattern, where the AI agent intelligently decides to use a custom database tool (defined by a dedicated n8n trigger and several PostgresTool n8n nodes) to fetch prices, stock, and descriptions.
This powerful n8n workflow transforms customer service by enabling instant quotes and expert product recommendations, making it one of the most valuable n8n templates for retail and construction supply businesses. Every part of the logic is managed within this single, efficient n8n instance.
The entire process is initiated by the Chat Trigger n8n node when a user sends a query (e.g., "I need drywall supplies").
Chat Trigger n8n trigger passes the user input to the main AI Agent n8n node.AI Agent utilizes the Language Model (Google Gemini) and the Chat Memory n8n node to maintain conversation context. Based on the detailed system prompt, the AI determines if external data is needed.DB Tools Client n8n node.Database Tools Trigger (the MCP endpoint), which then routes the execution to the appropriate PostgresTool n8n node (Query Product by Name, Query Product by Category, etc.). These specialized n8n nodes dynamically receive parameters parsed by the AI.AI Agent.Chat Trigger n8n node. This integrated n8n workflow ensures specialized expertise and accurate data.PostgresTool n8n nodes.Language Model (Google Gemini) n8n node.DB Tools Client n8n node matches the public endpoint of your n8n instance and the path defined in the Database Tools Trigger (/mcp/servidorbasesdedatos). This is essential for the AI Agent to communicate with the internal data retrieval n8n nodes.Chat Trigger n8n trigger endpoint live. You can now test this advanced n8n template. Chat Trigger: The main n8n trigger for the agent, exposing a public web interface for user interaction.
AI Agent: The core orchestration n8n node. It manages the conversation flow, memory, LLM connection, and tool-use decisions based on a detailed prompt optimized for hardware sales.
Language Model (Google Gemini): Provides the intelligence for reasoning and conversation generation, leveraging the specialized n8n node for Gemini.
Chat Memory: An n8n node implementing Buffer Window Memory, crucial for maintaining conversation context and allowing follow-up questions within the n8n workflow.
DB Tools Client: This n8n node acts as the mechanism through which the AI agent calls the external tool defined by the Micro-Content Provider (MCP) n8n trigger.
Database Tools Trigger: This special n8n trigger defines the entry point for the MCP tool endpoint. It accepts requests from the DB Tools Client when the AI decides to perform a database query.
SELECT query on the productos table, dynamically filtering results based on the parameters extracted by the AI, forming the data retrieval backbone of this n8n workflow.Use this advanced n8n workflow to streamline job applications. Automatically extract data from PDF CVs using AI, validate documents, pre-fill forms, and sync candidate information to an Airtable ATS using specialized n8n templates.

Use this n8n workflow template to automatically handle Twitter webhook Challenge Response Checks (CRC) using the Crypto n8n node, ensuring secure and instant verification.

Automate WhatsApp customer support using this advanced n8n workflow. Classify intent, route simple queries to fast static responses, and leverage the Google Gemini AI agent for deep conversational context and complex problem solving.

Use this powerful n8n workflow to schedule automated website health checks. Manage monitored URLs in Google Sheets and receive instant failure alerts via a Telegram n8n node.

Deploy a powerful n8n workflow for automated health monitoring using OpenRouter (Grok-3) analysis. Send conditional alerts to family and doctors instantly via email.








































