Personalized Shopping Assistant using AI, Memory, and Google Sheets - n8n Workflow

Deploy a custom AI Shopping Assistant using this sophisticated n8n workflow. Integrate Zep memory, GPT-4, and Google Sheets to instantly handle inventory checks, order tracking, and return policies.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • E-commerce businesses needing 24/7 automated customer support.

  • Technical users looking for advanced n8n templates integrating LangChain agents.

  • Developers aiming to build conversational AI interfaces using external data sources.

  • Anyone seeking to implement a personalized shopping assistant that remembers user context via a dedicated n8n node.

Overview

Customer service inquiries—especially those regarding inventory, order status, and returns—are repetitive and time-consuming. This powerful n8n workflow solves this by deploying a specialized AI Agent capable of handling these common tasks instantly and professionally. Utilizing Google Sheets as the authoritative data source for inventory, orders, and policies, the agent provides accurate, real-time responses. The inclusion of the Zep memory n8n node ensures the conversation is personalized; for instance, the agent remembers a user's phone number after the first request, dramatically improving the flow for order tracking. This highly optimized n8n workflow reduces manual support load and provides an excellent customer experience, built entirely using versatile n8n templates and nodes.

How it Works

The entire process is initiated by the n8n trigger when a customer sends a message.


  1. Trigger Activation: The When chat message received n8n trigger starts the process upon receiving user input, making this an ideal template for interactive AI.

  2. Context Loading: The Zep memory n8n node loads previous conversation history and any stored variables (like a customer's phone number), providing context to the AI Agent.

  3. AI Analysis and Decision: The core AI Agent n8n node (powered by the OpenAI Chat Model configured for GPT-4) analyzes the user's request against a detailed system prompt.

  4. Tool Execution: Based on the prompt's instructions, the agent intelligently decides which of the three Google Sheets tools to use:

If the user asks about a product, it calls the GetInventory n8n node.
If the user asks to track an order, it calls the Get
Orders n8n node, first prompting for a phone number if not already stored in memory.
* If the user asks about returns, it calls the Get_ReturnPolicy n8n node.

  1. Response Generation: The agent receives the data back from the Google Sheets n8n node, synthesizes the information according to the strict system message rules (ensuring no markdown, politeness, and conciseness), and sends the final, helpful response back to the user via the AI Agent output. This complete n8n workflow manages the entire conversational lifecycle.

Installation Guide

To implement this n8n workflow and start using this set of n8n templates, follow these steps:


  1. Import: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. OpenAI Credentials: Configure the OpenAI Chat Model n8n node with your OpenAI API Key. Ensure the model selected supports the required functions (GPT-4 is recommended).

  3. Google Sheets Credentials: Create a Google Sheets credential and link it to the three Google Sheets Tool n8n nodes (GetOrders, GetInventory, Get_ReturnPolicy). You must ensure n8n has read access to your inventory and order tracking spreadsheets.

  4. Zep Memory Setup: Set up your Zep endpoint and API key in the Zep n8n node credentials. This is crucial for maintaining conversation history and storing customer details.

  5. Data Structure: Replicate the spreadsheet structure referenced in the n8n workflow or update the Document ID and Sheet Names within the Google Sheets Tool n8n nodes to point to your live data (Inventory, Order Tracking, Return Policy).

  6. Activate Trigger: Activate the When chat message received n8n trigger and integrate the exposed webhook into your desired chat platform (e.g., Slack, Telegram, custom frontend) to finalize the deployment of this functional n8n template.

Node Details

When chat message received (n8n trigger): The starting point of the n8n workflow. It monitors a specified endpoint for incoming user chats and passes the chatInput content to the agent.
AI Agent (LangChain Agent n8n node): The control center. It uses an extensive System Message to define behavior, manage conversational state, and decide whether to execute one of the external tools (Google Sheets n8n node).
OpenAI Chat Model: Configured as the Language Model for the agent, using gpt-4.1-mini. It processes the user input and the system prompt to generate responses or tool calls.
Zep (Memory n8n node): Provides long-term and short-term conversational memory, enabling the agent to remember previously provided information, like a phone number, within the context of the running n8n workflow.
GetInventory (Google Sheets Tool n8n node): Acts as a tool for the AI. It targets the 'Product Details' sheet to pull stock and description data upon agent request.
Get
Orders (Google Sheets Tool n8n node): Queries the 'Order Tracking' sheet, typically filtering by a customer phone number provided by the user and stored by the memory n8n node, to retrieve delivery status and ETA.


  • Get_ReturnPolicy (Google Sheets Tool n8n node): Fetches static data from the 'Return Policy' sheet, ensuring the assistant provides accurate and up-to-date policy information.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by

We are an AI Automation Agency focusing on various AI Automation Services like, workflow automation, shopify automation, chatbot developerment, custom ai agent development and more.

Featured*