Category: Automations › E-commerce & Orders · Best for: Stores answering 'where is my order?' · Platform: n8n · Steps: 26
What it does
An AI answers customer questions about their WooCommerce orders.
The tracking code request is made through the most popular WooCommerce tracking plugin: "YITH WooCommerce Order & Shipment Tracking". The free version can be downloaded here
Works with: OpenAI, Memory Buffer Window, Tool Calculator, Tool Workflow, Embeddings OpenAI, Telegram, WooCommerce, Text Splitter Token Splitter, 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:
- WooCommerce REST API keys: how to connect (used by get_order, get_orders, get_user)
- API key sent as an HTTP header (see the node for which service): how to connect (used by Create collection, Refresh collection)
- Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Get folder, Download Files)
- Qdrant vector database: how to connect (used by Qdrant Vector Store1, Qdrant Vector Store)
- OpenAI API key: how to connect (used by Embeddings OpenAI1, Embeddings OpenAI, OpenAI Chat Model, GPT 4o-mini)
- Telegram bot token from @BotFather: how to connect (used by human_assistence)
- httpBasicAuth: how to connect (used by Get tracking)
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.
- Point these fields at your own sheets, chats and accounts:
- human_assistence →
chatId: choose your own
- human_assistence →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). When clicking ‘Test workflow’ 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 clicking ‘Test workflow’ starts the workflow (Manual).
- When chat message received starts the workflow (Chat).
- When Executed by Another Workflow starts the workflow (Execute Workflow).
- GPT 4o-mini uses AI (OpenAI).
- Simple Memory uses AI (Memory Buffer Window).
- Calculator uses AI (Tool Calculator).
- get_tracking uses AI (Tool Workflow).
- Embeddings OpenAI uses AI (Embeddings OpenAI).
- human_assistence uses Telegram.
- Embeddings OpenAI1 uses AI (Embeddings OpenAI).
- get_order uses WooCommerce to order get.
- Token Splitter uses AI (Text Splitter Token Splitter).
- OpenAI Chat Model uses AI (OpenAI).
- get_orders uses WooCommerce to order getAll.
- get_user uses WooCommerce to customer getAll.
- Create collection calls an external API (https://QDRANTURL/collections/COLLECTION).
- Refresh collection calls an external API (https://QDRANTURL/collections/COLLECTION/points/delete).
- Post-Sales Agent uses AI (Agent).
- Get tracking calls an external API (=https://URL/wp-json/wc/v3/orders/{{ $json.order_number }}).
- Qdrant Vector Store uses AI (Vector Store Qdrant).
- Qdrant Vector Store1 uses AI (Vector Store Qdrant).
- Default Data Loader uses AI (Document Default Data Loader).
- ToS uses AI (Tool Vector Store).
- Get folder uses Google Drive to fileFolder.
- Set tracking code reshapes the data for the next step.
- Download Files 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:
STEP 1
Create Qdrant Collection
Change:
- QDRANTURL
- COLLECTION
STEP 2
Documents vectorization with Qdrant and Google Drive
Change:
- QDRANTURL
- COLLECTION
STEP 3
- Add your Telegram CHAT_ID in the "human_assistance" tool
STEP 4
The tracking code request is made through the most popular WooCommerce tracking plugin: "YITH WooCommerce Order & Shipment Tracking". The free version can be downloaded here
- Create a new workflow and change URL in the node "Http Request" with your WooCommerce shop url
WooCommerce AI Chatbot Workflow for Post-Sales Support
This WooCommerce-integrated chatbot is designed to transform post-sales customer support by combining automation and artificial intelligence to deliver fast, secure, and personalized assistance. By connecting directly to the WooCommerce database, the chatbot retrieves real-time order information-including shipping details and tracking numbers-after verifying the customer's identity through a strict email-based authentication system. This ensures maximum data security, preventing leaks of sensitive information.
Beyond order management, the chatbot answers frequently asked questions about return policies, delivery times, and terms of service using a vector database that provides accurate, context-aware responses. If a request is too complex, the system seamlessly escalates it to a human operator via Telegram, guaranteeing no customer query goes unresolved.
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