💬 E-commerce assistant for Shopify & WooCommerce with GPT-4o, Gemini & RAG

3,435 views · 💬 Support Chatbots

Description

🤖 Universal E-Commerce AI Assistant (Shopify, WooCommerce & RAG)

This powerful n8n workflow deploys a sophisticated, multi-talented AI chatbot designed to streamline your e-commerce and customer support operations. The AI assistant can intelligently understand user queries and route them to the correct specialized agent, whether it’s for Shopify, WooCommerce, or general knowledge questions answered by a Retrieval-Augmented Generation (RAG) system.

This template automates responses to a wide range of inquiries, from checking Shopify order statuses with GraphQL to fetching product lists from WooCommerce, and even answering general questions by looking up information in a Pinecone vector database.

How It Works ⚙️

The workflow operates in a series of logical steps, starting from the moment a user sends a message.

  1. 💬 Chat Trigger: The workflow activates when a user sends a message in the n8n chat interface. It captures the user’s input and a unique session ID to track the conversation.

  2. 🧠 Intelligent Routing: The user’s query is first sent to a Router Agent powered by GPT-4o-mini. This agent’s sole purpose is to classify the intent of the message and output one of three keywords: SHOPIFY, WOOCOMMERCE, or None of them.

  3. 🔀 Conditional Branching: Based on the Router’s output, a series of IF nodes direct the conversation down one of three paths:

    • General Queries Path
    • Shopify Path
    • WooCommerce Path
  4. 📚 General Queries (RAG): If the query is not about e-commerce, it’s handled by a RAG agent.

    • Embedding: The user’s question is converted into a vector embedding using AWS Bedrock.
    • Retrieval: The workflow searches a Pinecone Vector Store to find the most relevant information from your knowledge base.
    • Generation: A GPT-4o-mini agent receives the context from Pinecone and generates a comprehensive, helpful answer.
  5. 🛍️ E-Commerce Specialists: If the query is about Shopify or WooCommerce, it’s passed to a dedicated agent.

    • Shopify Agent: This agent uses Google Gemini and has a suite of tools to manage Shopify tasks. It can Get Order info, Fetch All Products, or run complex queries using the powerful GraphQL tool.
    • WooCommerce Agent: This agent also uses Google Gemini and is equipped with tools to Fetch Order Details and Fetch All Products from a WooCommerce store.
  6. 🗣️ Conversation Memory: Each agent (Router, General, Shopify, WooCommerce) is connected to its own Memory node. This allows the chatbot to remember previous parts of the conversation for a more natural and context-aware interaction.

  7. 🏁 Merge & Respond: All three paths converge at a final Merge node. This ensures that no matter which agent handled the request, the final answer is streamlined into a single output and sent back to the user in the chat.

Nodes Used 🔗

Setup Guide 🛠️

To use this workflow, you’ll need to configure several nodes with your own credentials and settings.

1. AI Model Credentials

2. E-Commerce Platform Credentials

3. RAG System Credentials (Pinecone & AWS)

4. GraphQL Node Configuration

🔗 Nodes Used

AI Agent, OpenAI Chat Model, Simple Memory, Embeddings AWS Bedrock, Pinecone Vector Store, Chat Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup