Back to Catalog

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

Harsh ManiyaHarsh Maniya
3000 views
2/3/2026
Official Page

🤖 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 🔗

  • Triggers:
    • Chat Trigger: Starts the workflow when a chat message is received.
  • AI & Agents:
    • AI Agent: Four separate agents for Routing, Shopify, WooCommerce, and General Queries.
    • OpenAI Chat Model: Uses GPT-4o-mini for the Router and General Queries agent.
    • Google Gemini Chat Model: Uses Google Gemini for the Shopify and WooCommerce agents.
  • Tools & Data:
    • Shopify Tool: To get products and order information from Shopify.
    • WooCommerce Tool: To get products and order information from WooCommerce.
    • GraphQL Tool: For advanced, custom queries to the Shopify API.
    • Pinecone Vector Store: To retrieve context for the RAG agent.
    • AWS Bedrock Embeddings: To create vector embeddings for Pinecone.
  • Logic & Memory:
    • IF Node: To conditionally route the workflow.
    • Merge Node: To consolidate the different branches before ending.
    • Window Buffer Memory: Four nodes to provide conversational memory to each agent.

Setup Guide 🛠️

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

1. AI Model Credentials

  • OpenAI: Create an API key in your OpenAI Platform dashboard. Add this credential to the Router Model and GPT-4o-mini nodes.
  • Google Gemini: Create an API key in your Google AI Studio dashboard. Add this credential to the Shopify Chat Model and WooCommerce Chat Model nodes.

2. E-Commerce Platform Credentials

  • Shopify: You will need a Shopify Access Token. Follow the n8n documentation to generate one. Add the credential to the Fetch All Products and Get Order info nodes.
  • WooCommerce: Create API credentials from your WordPress dashboard. Add the credential to the Fetch All Products2 and Fetch Order Details nodes.

3. RAG System Credentials (Pinecone & AWS)

  • Pinecone:
    • Sign up for a Pinecone account and create an API key.
    • Add your Pinecone credentials in n8n.
    • In the Pinecone Vector Store node, set the pineconeIndex to the name of your index. You must have a pre-existing index with data for the RAG to work.
  • AWS:
    • Create an AWS account and an IAM user with programmatic access to Amazon Bedrock.
    • Add your AWS credentials in n8n.
    • Select your AWS credentials in the AWS Bedrock Embeddings node.

4. GraphQL Node Configuration

  • In the GraphQL node, you must update the endpoint URL. Replace the placeholder https://{subdomain}.myshopify.com/admin/api/2025-04/graphql.json with your own Shopify store's GraphQL API endpoint.

n8n E-commerce Assistant with AI and RAG

This n8n workflow creates an intelligent e-commerce assistant that can answer customer questions about products using a combination of AI models (OpenAI GPT-4o or Google Gemini) and a Pinecone vector store for Retrieval Augmented Generation (RAG). It provides a conversational interface for customers to get quick and accurate information.

What it does

  1. Listens for Chat Messages: The workflow is triggered whenever a new chat message is received, acting as the customer's query.
  2. Initializes AI Agent: It sets up an AI Agent with a simple memory to maintain conversation context.
  3. Configures AI Model: It allows you to choose between an OpenAI Chat Model (like GPT-4o) or a Google Gemini Chat Model to power the assistant's responses.
  4. Configures Embeddings: It uses AWS Bedrock for generating embeddings, which are crucial for searching the vector store.
  5. Connects to Pinecone Vector Store: The workflow integrates with a Pinecone vector store to retrieve relevant product information based on the customer's query (RAG).
  6. Processes AI Responses: The AI Agent uses the selected language model and the information from the Pinecone vector store to formulate a comprehensive answer.
  7. Routes Responses: It includes an If node, suggesting potential for conditional logic based on the AI's output or other factors, though its current connections are not explicitly defined in the provided JSON.
  8. Merges Data: A Merge node is present, indicating that data from different branches or steps might be combined before a final output.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • OpenAI API Key (if using OpenAI Chat Model): For accessing GPT-4o or other OpenAI models.
  • Google Gemini API Key (if using Google Gemini Chat Model): For accessing Google's Gemini models.
  • AWS Bedrock Credentials: For generating embeddings.
  • Pinecone Account and API Key: For your vector database, which should contain your e-commerce product data.
  • Chat Trigger Integration: The platform from which chat messages are received (e.g., a custom chat widget, a messaging app integrated with n8n's Chat Trigger).

Setup/Usage

  1. Import the Workflow: Download the workflow JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your OpenAI or Google Gemini credentials in n8n.
    • Configure your AWS Bedrock credentials.
    • Set up your Pinecone credentials, including your API key, environment, and index name.
  3. Configure AI Agent:
    • Select your preferred Language Model (OpenAI Chat Model or Google Gemini Chat Model) within the "AI Agent" node.
    • Ensure the "Embeddings AWS Bedrock" and "Pinecone Vector Store" nodes are correctly linked to the AI Agent as tools.
  4. Activate the Chat Trigger: Configure the "When chat message received" trigger to connect to your desired chat platform.
  5. Activate the Workflow: Save and activate the workflow.

Once activated, your e-commerce assistant will start responding to incoming chat messages, leveraging your product data stored in Pinecone and the chosen AI model to provide intelligent answers.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

Synchronizing WooCommerce inventory and creating products with Google Gemini AI and BrowserAct

Synchronize WooCommerce Inventory & Create Products with Gemini AI & BrowserAct This sophisticated n8n template automates WooCommerce inventory management by scraping supplier data, updating existing products, and intelligently creating new ones with AI-formatted descriptions. This workflow is essential for e-commerce operators, dropshippers, and inventory managers who need to ensure their product pricing and stock levels are synchronized with multiple third-party suppliers, minimizing overselling and maximizing profit. --- Self-Hosted Only This Workflow uses a community contribution and is designed and tested for self-hosted n8n instances only. --- How it works The workflow is typically run by a Schedule Trigger (though a Manual Trigger is also shown) to check stock automatically. It reads a list of suppliers and their inventory page URLs from a central Google Sheet. The workflow loops through each supplier: A BrowserAct node scrapes the current stock and price data from the supplier's inventory page. A Code node parses this bulk data into individual product items. It then loops through each individual product found. The workflow checks WooCommerce to see if the product already exists based on its name. If the product exists: It proceeds to update the existing product's price and stock quantity. If the product DOES NOT exist: An If node checks if the missing product's category matches a predefined type (optional filtering). If it passes the filter, a second BrowserAct workflow scrapes detailed product attributes from a dedicated product page (e.g., DigiKey). An AI Agent (Gemini) transforms these attributes into a specific, styled HTML table for the product description. Finally, the product is created in WooCommerce with all scraped details and the AI-generated description. Error Handling: Multiple Slack nodes are configured to alert your team immediately if any scraping task fails or if the product update/creation process encounters an issue. Note: This workflow does not support image uploads for new products. To enable this functionality, you must modify both the n8n and BrowserAct workflows. --- Requirements BrowserAct API account for web scraping BrowserAct n8n Community Node -> (n8n Nodes BrowserAct) BrowserAct templates named “WooCommerce Inventory & Stock Synchronization” and “WooCommerce Product Data Reconciliation” Google Sheets credentials for the supplier list WooCommerce credentials for product management Google Gemini account for the AI Agent Slack credentials for error alerts --- Need Help? How to Find Your BrowseAct API Key & Workflow ID How to Connect n8n to Browseract How to Use & Customize BrowserAct Templates How to Use the BrowserAct N8N Community Node --- Workflow Guidance and Showcase STOP Overselling! Auto-Sync WooCommerce Inventory from ANY Supplier

Madame AI Team | KaiBy Madame AI Team | Kai
600