AI E-commerce Chatbot for Support, Order Tracking, and Product Recommendations - n8n Workflow

Build a sophisticated AI chatbot using this advanced n8n workflow. Integrate GPT-4o-mini and Supabase for automated order status, ticket creation, and product recommendation capabilities. Perfect n8n templates for e-commerce.

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 workflow examples combining LangChain AI agents and database tools.
Developers who rely on Supabase for backend order and product data.
Automation specialists seeking high-value n8n templates for complex chat applications.

Overview

Managing customer queries efficiently is critical for e-commerce success. This powerful n8n workflow template solves the challenge of query volume by automatically classifying and resolving common issues. By leveraging multiple specialized AI Agents, the automation handles everything from checking order status and suggesting products to logging support tickets directly into a Supabase database.

This robust n8n workflow starts with a single n8n trigger and intelligently routes the request to the correct specialist agent (e.g., Order Agent or Support Agent). Each specialized agent is configured with the necessary tools—like Supabase nodes and internal Code execution—to provide accurate, contextual responses. This setup allows your business to offer expert, instant support, demonstrating the potential of integrating AI into core business operations using n8n.

How it Works

This automation begins when the Webhook n8n trigger receives a customer message (usually from a chat interface).


  1. Initial Classification: The incoming message is passed to the first AI Agent, powered by an OpenAI n8n node, which classifies the user's intent (orderstatus, supportticket, productrecommendation, or general). This classification is extracted and parsed via a Code n8n node.

  2. Intelligent Routing: A Switch n8n node then directs the execution flow based on the intent.

  3. Handling Order Status: If the intent is orderstatus, the query goes to the Order Queries agent. This agent utilizes the getOrderStatus Supabase n8n tool to look up tracking data from the Supabase orders table before responding.

  4. Handling Support Tickets: If the intent is supportticket, the query is sent to the AI Agent1. This agent is equipped with several tools: a Code Tool to generate a unique ticket ID, a createSupportTicket Supabase n8n tool to log the issue, a getTicketStatus Supabase n8n tool to check existing tickets, and a Send (Gmail) n8n node to notify the support team upon ticket creation.

  5. Handling Recommendations: If the intent is productrecommendation, the Recommendations agent takes over. This agent uses the getProductRecommendations and getCategoryRecommendations Supabase n8n tools to query the products table for suggestions.

  6. Final Response: Each specialized path concludes by sending a structured JSON response back to the originating chat platform using a dedicated Respond to Webhook n8n node, ensuring the customer receives a prompt and relevant answer.

Installation Guide

To utilize this complex n8n workflow, follow these setup steps:


  1. Import the n8n Workflow: Copy the provided JSON and import it directly into your n8n instance as a new n8n workflow.

  2. Setup Credentials: You will need three main credentials:

OpenAI API: Configure the API key for the three OpenAI Chat Model n8n nodes (ideally using gpt-4o-mini or similar low-latency model).
Supabase API: Configure the connection details (URL and Anon key) for all six SupabaseTool n8n node instances (getOrderStatus, createSupportTicket, etc.). Ensure your Supabase database has the necessary tables (orders, products, support_tickets).
* Gmail OAuth2: Set up the credentials for the Send n8n node (Gmail Tool) used to alert support staff.

  1. Webhook Configuration: The starting n8n trigger is a Webhook node. Activate the n8n workflow and copy the unique testing URL. This URL must be configured in your chatbot or application platform to send customer messages to n8n.

  2. Activate: Save the n8n workflow and set it to 'Active' to start processing customer queries.

Node Details

Webhook (n8n trigger): The entry point of the n8n workflow, configured to receive POST requests containing the user message and session ID.
AI Agent (Classification): Uses GPT-4o-mini to analyze the input message and strictly output a JSON object classifying the intent and extracting the product mentioned. It also uses a Simple Memory n8n node to maintain context.
Switch (Routing): A core logic n8n node that examines the intent extracted from the AI's output, directing the flow to one of four specialized branches.
Order Queries (AI Agent): Specialized agent configured to use the getOrderStatus Supabase n8n node tool to fetch real-time order data based on input parameters (order ID, product).
createSupportTicket (SupabaseTool n8n node): Inserts new support requests into the Supabase database. This tool is callable by the Support Ticket AI Agent.
Code Tool (LangChain): An internal LangChain n8n node tool executed by the Support Ticket agent to programmatically generate a unique, timestamped ticket_id (e.g., TKT-20250711-XXXX).
Gmail Tool (Send n8n node): Integrated into the support ticket path to automatically send an internal email alert to a specified support address when a new ticket is logged.
Recommendations (AI Agent): Uses two separate Supabase n8n node tools (getProductRecommendations and getCategoryRecommendations) to query the products table, providing relevant e-commerce suggestions to the user.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by
Sehar Nazeer
Sehar Nazeer

I design powerful n8n workflows that save businesses hours of work every week. From lead generation to AI-powered automation, I create plug-and-play solutions you can integrate in minutes. Let’s automate your success.

Featured*