Category: Automations › E-commerce & Orders · Best for: Stores wanting AI product recommendations · Platform: n8n · Steps: 21
What it does
Customers tell the AI what they want, and it suggests products from your store.
Create a collectiopn on your Qdrant instance. Then create a basic RAG system with documents uploaded to Google Drive and embedded in the Qdrant vector database
Works with: OpenAI, Memory Buffer Window, Embeddings OpenAI, Tool Calculator, WooCommerce, Text Splitter Token Splitter, Information Extractor, Agent, Vector Store Qdrant, Document Default Data Loader, Tool Vector Store, Google Drive
What you get
- The n8n workflow file (
workflow.json), ready to import - This setup guide
- The list of fields to change for your own accounts (see Install below)
- Email support if you get stuck
Before you start
-
An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker:
docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678. -
Accounts and API keys for these services:
- OpenAI API key: how to connect (used by OpenAI Chat Model, Embeddings OpenAI, OpenAI Chat Model1, OpenAI Chat Model2, Embeddings OpenAI3)
- Qdrant vector database: how to connect (used by Qdrant Vector Store, Qdrant Vector Store1)
- WooCommerce REST API keys: how to connect (used by personal_shopper)
- Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Google Drive2, Google Drive1)
- API key sent as an HTTP header (see the node for which service): how to connect (used by HTTP Request)
Install
- In n8n, click Create workflow (top right).
- Click the ⋯ menu → Import from file and choose
workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V. - Open each node with a red warning triangle and pick or create the matching credential from the list above.
- Click Save.
Test it
- Click Test workflow (or Execute workflow). When chat message received starts it. Trigger it once with real sample data.
- Click each node to check its output. A green tick means the step worked.
- Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.
Go live
Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.
How it works, step by step
- When chat message received starts the workflow (Chat).
- When clicking ‘Test workflow’ starts the workflow (Manual).
- OpenAI Chat Model2 uses AI (OpenAI).
- OpenAI Chat Model uses AI (OpenAI).
- Window Buffer Memory uses AI (Memory Buffer Window).
- Embeddings OpenAI3 uses AI (Embeddings OpenAI).
- Calculator uses AI (Tool Calculator).
- Embeddings OpenAI uses AI (Embeddings OpenAI).
- personal_shopper uses WooCommerce to getAll.
- Token Splitter1 uses AI (Text Splitter Token Splitter).
- OpenAI Chat Model1 uses AI (OpenAI).
- Edit Fields reshapes the data for the next step.
- HTTP Request calls an external API (https://QDRANTURL/collections/NAME/points/delete).
- Information Extractor uses AI (Information Extractor).
- AI Agent uses AI (Agent).
- Qdrant Vector Store1 uses AI (Vector Store Qdrant).
- Qdrant Vector Store uses AI (Vector Store Qdrant).
- Default Data Loader2 uses AI (Document Default Data Loader).
- RAG uses AI (Tool Vector Store).
- Google Drive2 uses Google Drive to fileFolder.
- Google Drive1 uses Google Drive to download.
India & US notes
India: if you take payments with Razorpay, swap the Stripe node for an HTTP Request to the Razorpay API, or use a Razorpay webhook as the trigger. US: Stripe and Shopify Payments work out of the box.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Replace the URL and Collection name with your own
Step 1
Create a collectiopn on your Qdrant instance. Then create a basic RAG system with documents uploaded to Google Drive and embedded in the Qdrant vector database
Step 1
Create a basic RAG system with documents uploaded to Google Drive and embedded in the Qdrant vector database
Step 2
The Information Extractor tries to understand if the request is related to products and if so, it extracts the useful information to filter the products available on WooCommerce by calling the "personal_shopper". If it is a general question, the RAG system is called
Troubleshooting
- "Credentials not found": open the node and select your credential again.
- Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
- Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
- AI node errors: check your API key has billing enabled and the model name exists on your plan.
- Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.
Need help?
Reply to your Morning Method order email and we'll help you get it running.
© Morning Method