Skip to main content

Voice AI customer support for WooCommerce using VAPI, GPT-4o & Gemini with RAG

Workflow preview

Workflow preview
100%
Voice AI customer support for WooCommerce using VAPI, GPT-4o & Gemini with RAG preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow integrates a Retrieval Augmented Generation (RAG) system with a post sales AI agent for WooCommerce . It combines vector based search (Qdrant + OpenAI embeddings) with LLMs (Google Ge...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chainretrievalqa, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.retrievervectorstore, @n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.webhook, n8n-nodes-base.woocommercetool, @n8n/n8n-nodes-langchain.toolcalculator

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
Voice AI customer support for WooCommerce using VAPI, GPT-4o & Gemini with RAG
Workflow name
Voice AI customer support for WooCommerce using VAPI, GPT-4o & Gemini with RAG

This workflow integrates a Retrieval-Augmented Generation (RAG) system with a post-sales AI agent for WooCommerce. It combines vector-based search (Qdrant + OpenAI embeddings) with LLMs (Google Gemini and GPT-4o-mini) to provide accurate and contextual responses.

Both systems are connected to VAPI webhooks, making the workflow usable in a voice AI assistant via Twilio phone numbers.

The workflow receives JSON payloads from VAPI via webhooks, processes the request through the appropriate chain (Agent or RAG), and sends a structured response back to VAPI to be read out to the user.


Advantages

  • Unified AI Support System: Combines knowledge retrieval (RAG) with transactional support (WooCommerce).
  • Data Privacy & Security: Enforces strict email/order verification before sharing information.
  • Multi-Model Power: Leverages both Google Gemini and OpenAI GPT-4o-mini for optimal responses.
  • Scalable Knowledge Base: Qdrant vector database ensures fast and accurate context retrieval.
  • Customer Satisfaction: Provides real-time answers about orders, tracking, and store policies.
  • Flexible Integration: Easily connects with VAPI for voice assistants and phone-based customer support.
  • Reusable Components: The RAG part can be extended for FAQs, while the post-sales agent can scale with more WooCommerce tools.

How it Works

It has two main components:

  1. RAG System (Knowledge Retrieval & Q&A)

    • Uses OpenAI embeddings to store documents in Qdrant.
    • Retrieves relevant context with a Vector Store Retriever.
    • Sends the information to a Question & Answer Chain powered by Google Gemini.
    • Returns precise, context-based answers to user queries via webhook.
  2. Post-Sales Customer Support Agent

    • Acts as a WooCommerce virtual assistant to:

      • Retrieve customer orders (get_order, get_orders).
      • Get user profiles (get_user).
      • Provide shipment tracking (get_tracking) using YITH WooCommerce Order Tracking plugin.
    • Enforces strict verification rules: customer email must match the order before disclosing details.

    • Communicates professionally, providing clear and secure customer support.

    • Integrates with GPT-4o-mini for natural conversation flow.


Set Up Steps

To implement this workflow, follow these three main steps:

1. Infrastructure & Credentials Setup in n8n:

  • Ensure all required nodes have their credentials configured:
    • OpenAI API Key: For the GPT 4o-mini and Embeddings OpenAI nodes.
    • Google Gemini API Key: For the Google Gemini Chat Model node.
    • Qdrant Connection Details: For the Qdrant Vector Store1 node (points to a Hetzner server).
    • WooCommerce API Keys: For the get_order, get_orders, and get_user nodes (for magnanigioielli.com).
    • WordPress HTTP Auth Credentials: For the Get tracking node in the sub-workflow.
  • Pre-populate the Vector Database: The RAG system requires a pre-filled Qdrant collection with your store's knowledge base (e.g., policy documents, product info). The "Sticky Note2" provides a link to a guide on building this RAG system.

2. Workflow Activation in n8n:

  • Save this JSON workflow in your n8n instance.
  • Activate the workflow. This is crucial, as n8n only listens for webhook triggers when the workflow is active.
  • Note the unique public webhook URLs generated for the Webhook (post-sales agent) and rag (RAG system) nodes. You will need these URLs for the next step.

3. VAPI Configuration:

  • Create Two API Tools in VAPI:
    • Tool 1 (Post-Sales): Create an "API Request" tool. Connect it to the n8n Webhook URL. Configure the request body to send parameters email and n_order based on the conversation with the user.
    • Tool 2 (RAG): Create another "API Request" tool. Connect it to the n8n rag webhook URL. Configure the request body to send a search parameter containing the user's query.
  • Build the Assistant: Create a new assistant in VAPI. Write a system prompt that instructs the AI on when to use each of the two tools you created. In the "Tools" tab, add both tools.
  • Go Live: Add a phone number (e.g., from Twilio) to your VAPI assistant and set it to "Inbound" to receive customer calls.

Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Question and Answer Chain

Type / Role
@n8n/n8n-nodes-langchain.chainRetrievalQa - chainRetrievalQa
Config choices
Version 1.5

Block 2 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 3 - Vector Store Retriever

Type / Role
@n8n/n8n-nodes-langchain.retrieverVectorStore - retrieverVectorStore
Config choices
Version 1

Block 4 - Qdrant Vector Store1

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreQdrant - vectorStoreQdrant
Config choices
Version 1.1

Block 5 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 6 - rag

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 7 - get_order

Type / Role
n8n-nodes-base.wooCommerceTool - wooCommerceTool
Config choices
Version 1

Block 8 - get_orders

Type / Role
n8n-nodes-base.wooCommerceTool - wooCommerceTool
Config choices
Version 1

Block 9 - get_user

Type / Role
n8n-nodes-base.wooCommerceTool - wooCommerceTool
Config choices
Version 1

Block 10 - Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 11 - get_tracking

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 2.1

Block 12 - When Executed by Another Workflow

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 13 - Post-Sales Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Get tracking

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Set tracking code

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - GPT 4o-mini

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 18 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 19 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Set response

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 22 - Send response to VAPI

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 23 - Send RAG response to VAPI

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 24 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Voice AI customer support for WooCommerce using VAPI, GPT-4o & Gemini with RAG
Complexity advanced
Nodes 25
Categories Support Chatbot, AI RAG
Author Davide
Published 11 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8488/8488.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Voice AI customer support for WooCommerce using VAPI, GPT-4o & Gemini with RAG do?

This workflow integrates a Retrieval Augmented Generation (RAG) system with a post sales AI agent for WooCommerce . It combines vector based search (Qdrant + OpenAI embeddings) with LLMs (Google Ge...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI RAG use case.