This workflow corresponds to n8n.io template #6100 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "cHCMSbq1XKT7vRDx",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Multi-Platform E-Commerce Assistant with GPT-4o, Gemini & RAG (Shopify, WooCommerce)",
"tags": [],
"nodes": [
{
"id": "531c38de-50c3-4441-93f1-a4144866aab0",
"name": "Fetch All Products",
"type": "n8n-nodes-base.shopifyTool",
"position": [
-368,
288
],
"parameters": {
"limit": "={{ 25 }}",
"resource": "product",
"operation": "getAll",
"returnAll": "={{ false }}",
"authentication": "accessToken",
"additionalFields": {}
},
"credentials": {
"shopifyAccessTokenApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "6faec98e-a74c-4fac-b52d-9930f0fb65c0",
"name": "Get Order info",
"type": "n8n-nodes-base.shopifyTool",
"position": [
-240,
288
],
"parameters": {
"options": {
"fields": ""
},
"orderId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Order_ID', ``, 'string') }}",
"operation": "get",
"authentication": "accessToken"
},
"credentials": {
"shopifyAccessTokenApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e937b209-f93e-4e93-9462-d3d0ded4534d",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-2320,
304
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "9abfe8ad-0f3a-4866-8a5b-bc9be1fe8e92",
"name": "General Queries",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1296,
816
],
"parameters": {
"text": "=You are a helpful Automation Assistant answer users queries\n\nYou have Following tools.\nRetrieval Tool: To retrieve relevant context\n\nUser query: {{$('When chat message received').item.json.chatInput }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "6fafd276-fe93-418e-91bf-2f5395719be5",
"name": "Route To Shopify or WooCommerce",
"type": "n8n-nodes-base.if",
"position": [
-1008,
160
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6f900415-42fa-462c-b217-8958afd0f7af",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Initial Query Router').item.json.output }}",
"rightValue": "SHOPIFY"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7c736e9e-0270-423f-b5f7-1d9e8b5d3fbc",
"name": "Shopify Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-624,
288
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "dcaeae2c-7f18-441d-992b-59d650b0fce9",
"name": "WooCommerce Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-624,
1072
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "82300cbf-74a9-4f29-8d16-e85cb9f5aa26",
"name": "Pinecone Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
-1168,
1328
],
"parameters": {
"mode": "retrieve-as-tool",
"topK": 5,
"options": {},
"toolName": "General_Knowledge_base",
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "example-01",
"cachedResultName": "example-01"
},
"toolDescription": "When some retrieval is needed"
},
"credentials": {
"pineconeApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "34e05f16-7c17-4afb-86a2-fc39f3fd8685",
"name": "Embeddings AWS Bedrock",
"type": "@n8n/n8n-nodes-langchain.embeddingsAwsBedrock",
"position": [
-1184,
1456
],
"parameters": {
"model": "amazon.titan-embed-text-v2:0"
},
"credentials": {
"aws": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "2df41ff0-12e9-41e7-a2b2-54c23237b8bb",
"name": "Check if Its General query",
"type": "n8n-nodes-base.if",
"position": [
-1392,
304
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "or",
"conditions": [
{
"id": "c754c276-1117-4037-88dd-fec90fd52308",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output }}",
"rightValue": "SHOPIFY"
},
{
"id": "f51b2e8e-1135-4c2a-beb0-466aa39e1f50",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output }}",
"rightValue": "WOOCOMMERCE"
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "fd957d18-8945-40b3-a05b-156fd16e749f",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
240,
464
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "b4b39c2a-e5c0-445e-a1eb-de5e3855164c",
"name": "Fetch All Products2",
"type": "n8n-nodes-base.wooCommerceTool",
"position": [
-352,
1072
],
"parameters": {
"options": {},
"operation": "getAll"
},
"credentials": {
"wooCommerceApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e8cb8ea2-dc2c-447b-b02f-dd1d1afc71c0",
"name": "Fetch Order Details",
"type": "n8n-nodes-base.wooCommerceTool",
"position": [
-208,
1072
],
"parameters": {
"orderId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Order_ID', ``, 'string') }}",
"resource": "order",
"operation": "get"
},
"credentials": {
"wooCommerceApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "4f78deac-74e3-4a1b-a217-93a8b77636a4",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-1904,
544
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "b542a382-5a0e-4449-9d82-97812dd5b681",
"name": "Memory RAG",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-1184,
976
],
"parameters": {
"sessionKey": "={{$('When chat message received').item.json.sessionId }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "b3bf80ca-3ce4-4c0d-9f61-7470b9c5b0a1",
"name": "WooCommerce Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-480,
1072
],
"parameters": {
"sessionKey": "={{ $('When chat message received').item.json.sessionId }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "570be1fd-6192-4fac-915b-7094eb77dd5a",
"name": "Shopify Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-496,
288
],
"parameters": {
"sessionKey": "={{$('When chat message received').item.json.sessionId }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "1ba7823f-4fe4-49eb-b296-06ff79c4ea84",
"name": "GraphQL",
"type": "n8n-nodes-base.graphqlTool",
"position": [
-112,
288
],
"parameters": {
"query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
"endpoint": "https://test-walkerballorg001.myshopify.com/admin/api/2025-04/graphql.json",
"variables": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Variables', ``, 'json') }}",
"operationName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Operation_Name', ``, 'string') }}",
"authentication": "headerAuth"
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "8df3b888-7e12-4e9d-895f-85efe4886864",
"name": "Router Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-2032,
544
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "99f9757c-193a-4db2-a7bd-a535173f9b97",
"name": "GPT-4o-mini",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-1360,
976
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "a3f28bd5-8326-4d5b-808f-7c180e5f9adb",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2432,
80
],
"parameters": {
"width": 320,
"height": 608,
"content": "## **Trigger**\n\n#### **When chat message received**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* **Action:** Activates the workflow at the start of a conversation.\n* **Source:** A new message sent by a user in the chat interface.\n* **Output:** The user's message (`chatInput`) and a unique `sessionId` for tracking the conversation.\n"
},
"typeVersion": 1
},
{
"id": "7bf372f7-adee-4006-9142-bd82260377f2",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2096,
80
],
"parameters": {
"color": 7,
"width": 544,
"height": 608,
"content": "## **Initial Routing**\n\n#### **Initial Query Router (Agent)**\n* **Action:** Analyzes the user's initial message to categorize their intent.\n* **Function:** Uses the `Router Model (GPT-4o-mini)` and a specific prompt to decide the query's topic.\n* **Output:** A single-word classification: `SHOPIFY`, `WOOCOMMERCE`, or `None of them`.\n\n"
},
"typeVersion": 1
},
{
"id": "bfdf2a57-ba72-4a52-9759-fd0080e6f912",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
80
],
"parameters": {
"color": 2,
"width": 384,
"height": 432,
"content": "#### **Check if Its General query (IF Node)**\n\n* **Action:** Routes the conversation based on the initial classification.\n* **Input:** Checks the single-word output from the `Router` node.\n* **Output:** Directs the workflow to the **General Queries** path if the input is not `SHOPIFY` or `WOOCOMMERCE`. Otherwise, continues to the next check.\n\n"
},
"typeVersion": 1
},
{
"id": "fb46041f-3b5a-43fe-b3d8-f3ae56b92a17",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
528
],
"parameters": {
"color": 6,
"width": 752,
"height": 576,
"content": "## **General Queries Agent & Tools (RAG)**\n\n#### **General Queries (Agent)**\n\n* **Action:** Answers general knowledge questions that are not related to e-commerce.\n* **Function:** Uses a Retrieval-Augmented Generation (RAG) approach, querying its knowledge base tool (`Pinecone`) to find relevant information.\n* **Output:** A helpful, informative answer based on the retrieved context.\n\n"
},
"typeVersion": 1
},
{
"id": "4d1f1af1-d698-4fd6-8278-b6fd16cf1a31",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
80
],
"parameters": {
"color": 3,
"width": 352,
"height": 432,
"content": "#### **Route To Shopify or WooCommerce (IF Node)**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* **Action:** Directs the e-commerce query to the correct specialist agent.\n* **Input:** Checks if the `Router` output is `SHOPIFY`.\n* **Output:** Sends the query to the **Shopify Assistant Agent** if true, or to the **WooCommerce Assistant Agent** if false.\n"
},
"typeVersion": 1
},
{
"id": "f0815345-af27-4330-9237-538290b55e60",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1280,
1120
],
"parameters": {
"color": 4,
"width": 496,
"height": 464,
"content": "#### **Pinecone Vector Store (Tool)**\n\n* **Action:** Searches the knowledge base for documents relevant to the user's question.\n* **Input:** A vector embedding of the user's query from the `Embeddings AWS Bedrock` node.\n* **Output:** The most relevant text chunks from the database, passed back to the agent as context.\n\n"
},
"typeVersion": 1
},
{
"id": "e6ee6a54-baac-4803-a983-701077137203",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
528
],
"parameters": {
"width": 832,
"height": 704,
"content": "## **WooCommerce Agent & Tools**\n\n### **WooCommerce Assistant**\n\n* **Action:** Manages the conversation for all WooCommerce-related tasks.\n* **Function:** Uses the `WooCommerce Chat Model` and its available tools (`Fetch Order Details`, `Fetch All Products2`) to answer user questions.\n* **Output:** A final text response for the user or a command to use one of its tools.\n"
},
"typeVersion": 1
},
{
"id": "cb9c7530-62b4-42e0-9dd1-80523d1cdbc4",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
-160
],
"parameters": {
"color": 7,
"width": 832,
"height": 672,
"content": "## **Shopify Agent & Tools**\n\n### **Shopify Assistant**\n* **Action:** Manages the conversation for all Shopify-related tasks.\n* **Function:** Uses the `Shopify Chat Model` and its available tools (`Get Order info`, `Fetch All Products`, `GraphQL`) to answer questions and perform actions.\n* **Output:** A final text response for the user or a command to use one of its tools.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
},
"typeVersion": 1
},
{
"id": "bf1a28dd-3225-4a49-9fcd-10531f934155",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
416
],
"parameters": {
"color": 5,
"width": 400,
"height": 416,
"content": "## **Merge**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* **Action:** Consolidates the workflow into a single path before it ends.\n* **Input:** The final text output from whichever agent was used (Shopify, WooCommerce, or General).\n* **Output:** A single data stream containing the final answer, ready to be displayed to the user."
},
"typeVersion": 1
},
{
"id": "34faad1f-4e0c-4fe0-affd-5a7ffdd4ce96",
"name": "Initial Query Router",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1968,
304
],
"parameters": {
"text": "=You are a routing agent based on user qquery route them to appropriate next agent\n\n**STRICT**\nIf user asks about shopify then Destination --> SHOPIFY\nIf user asks about WooCommerce then Destination --> WOOCOMMERCE\nIf user asks other queries --> None of them\n\n**IMPORTANT** \nReply Only with 1 word\n\nUser query: {{ $json.chatInput }}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "26fb2d15-7583-4f8b-89c1-5d2f390a87cb",
"name": "Shopify Assistant Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-496,
64
],
"parameters": {
"text": "=You are a Shopify assistant. When users mention an order ID (like \"order 12345\" or \"#67890\"), extract that ID and use it with the appropriate Shopify tools.\n\nAvailable tools:\n- Get Order info: Use this when users ask about order details(use it with user given order id)\n- Fetch all Products: Use this for product information\n-GraphQL: Use this when you need other informations. (Generate query first and then use this tool)\n\n**IMPORTANT**:\n- Never use Fetch All Products when you need only one product.\n- when you need a singular item use GraphQL.\n- First draft a GraphQL query, then use that query with GraphQL tool and if variables are required then also draft that.\n- Just pass search keyword directly to the GraphQL tool along with query.\n\n\nUser Query: {{ $('When chat message received').item.json.chatInput }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2,
"alwaysOutputData": false
},
{
"id": "b476a433-6a32-4ccb-b0a6-ec7be0192512",
"name": "WooCommerce Assistant Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-496,
800
],
"parameters": {
"text": "=You are a helpful WooCommerce automation Assistant you solve user's query about WooCommerce\n\nUser query: {{ $('When chat message received').item.json.chatInput }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "73415902-9503-48b4-8c7f-5e73a4df7810",
"connections": {
"GraphQL": {
"ai_tool": [
[
{
"node": "Shopify Assistant Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Memory RAG": {
"ai_memory": [
[
{
"node": "General Queries",
"type": "ai_memory",
"index": 0
}
]
]
},
"GPT-4o-mini": {
"ai_languageModel": [
[
{
"node": "General Queries",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Router Model": {
"ai_languageModel": [
[
{
"node": "Initial Query Router",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Initial Query Router",
"type": "ai_memory",
"index": 0
}
]
]
},
"Get Order info": {
"ai_tool": [
[
{
"node": "Shopify Assistant Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Shopify Memory": {
"ai_memory": [
[
{
"node": "Shopify Assistant Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"General Queries": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Fetch All Products": {
"ai_tool": [
[
{
"node": "Shopify Assistant Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Shopify Chat Model": {
"ai_languageModel": [
[
{
"node": "Shopify Assistant Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"WooCommerce Memory": {
"ai_memory": [
[
{
"node": "WooCommerce Assistant Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Fetch All Products2": {
"ai_tool": [
[
{
"node": "WooCommerce Assistant Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Fetch Order Details": {
"ai_tool": [
[
{
"node": "WooCommerce Assistant Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Initial Query Router": {
"main": [
[
{
"node": "Check if Its General query",
"type": "main",
"index": 0
}
]
]
},
"Pinecone Vector Store": {
"ai_tool": [
[
{
"node": "General Queries",
"type": "ai_tool",
"index": 0
}
]
]
},
"Embeddings AWS Bedrock": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"WooCommerce Chat Model": {
"ai_languageModel": [
[
{
"node": "WooCommerce Assistant Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Shopify Assistant Agent": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Check if Its General query": {
"main": [
[
{
"node": "Route To Shopify or WooCommerce",
"type": "main",
"index": 0
}
],
[
{
"node": "General Queries",
"type": "main",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Initial Query Router",
"type": "main",
"index": 0
}
]
]
},
"WooCommerce Assistant Agent": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 2
}
]
]
},
"Route To Shopify or WooCommerce": {
"main": [
[
{
"node": "Shopify Assistant Agent",
"type": "main",
"index": 0
}
],
[
{
"node": "WooCommerce Assistant Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
awsgooglePalmApihttpHeaderAuthopenAiApipineconeApishopifyAccessTokenApiwooCommerceApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
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…
Source: https://n8n.io/workflows/6100/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow transforms your n8n instance into a fully automated AI sales assistant for WooCommerce stores. It detects customer intent from chat, searches products, answers FAQs, generates Stripe pay
Advanced Ai Demo Presented At Ai Developers 14 Meetup. Uses slack, stickyNote, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi. Chat trigger; 39 nodes.
Advanced Ai Demo (Presented At Ai Developers #14 Meetup). Uses slack, stickyNote, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi. Chat trigger; 39 nodes.
Workflow 2358. Uses slack, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi, documentDefaultDataLoader. Chat trigger; 39 nodes.
2358. Uses slack, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi, documentDefaultDataLoader. Chat trigger; 39 nodes.