This workflow corresponds to n8n.io template #8011 — 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 →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "6ba11958-a915-44d5-828d-5502e020848f",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
240,
-496
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "b4c04258-79b5-4c46-94c7-969d837a6857",
"name": "When clicking 'Execute workflow'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
224,
-1216
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b9a981fb-41eb-455a-9078-f91bdbed110d",
"name": "Edit Fields1",
"type": "n8n-nodes-base.set",
"position": [
448,
-496
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "s1",
"name": "sessionId",
"type": "string",
"value": "={{ $json.sessionId }}"
},
{
"id": "s2",
"name": "chatInput",
"type": "string",
"value": "={{ $json.chatInput }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f94da395-1334-4466-8d5a-d300a70f5119",
"name": "Window Buffer Memory1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1168,
-224
],
"parameters": {
"sessionKey": "={{ $('Edit Fields1').item.json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 12
},
"typeVersion": 1.3
},
{
"id": "f4c91458-29e6-4814-a64d-e512ac5da230",
"name": "Sales Info Extractor1",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
672,
-496
],
"parameters": {
"text": "={{ $json.chatInput }}",
"options": {
"systemPromptTemplate": "You extract buyer intent (product|faq|payment|lead) and fields (keyword, sku, min_price, max_price, name, email). Prices are numbers only. Do not hallucinate."
},
"schemaType": "manual",
"inputSchema": "{\n \"intents\": { \"product\": true, \"faq\": true, \"payment\": true, \"lead\": true },\n \"fields\": {\n \"keyword\": \"\",\n \"sku\": \"\",\n \"min_price\": \"\",\n \"max_price\": \"\",\n \"name\": \"\",\n \"email\": \"\"\n }\n}"
},
"typeVersion": 1
},
{
"id": "e102585a-a1a8-48b6-afdb-ed4eb69a638e",
"name": "OpenAI Chat Model (Extractor)1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
768,
-336
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"name": "Sales AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1200,
-496
],
"parameters": {
"options": {
"systemMessage": "=## Role\nYou are Sales AI Agent. Use tools only.\n\n## Routing\n- If extractor.intents.faq = true => use RAG_FAQ.\n- If extractor.intents.product = true => PRODUCT_SEARCH_WOO, then INVENTORY_DETAIL_WOO for shortlisted SKU.\n- If extractor.intents.payment = true => PAYMENT_LINK.\n- If name+email present => CRM_LEAD.\n- If blocked/unsure => HUMAN_ESCALATION.\n\n## Output\n- List products as: Title | Price | In stock | URL/Handle | SKU.\n- Always propose next actions: (1) Xem th\u00eam l\u1ef1a ch\u1ecdn, (2) L\u1ea5y link thanh to\u00e1n, (3) N\u00f3i chuy\u1ec7n v\u1edbi t\u01b0 v\u1ea5n vi\u00ean.\n\nToday is {{$now}}."
}
},
"typeVersion": 1.8
},
{
"id": "2ab2d2c1-5182-49d0-911f-85b6f2349070",
"name": "OpenAI Chat Model (Agent)1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1040,
-224
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "5469d03d-4a0f-410f-afc8-09083f697395",
"name": "Qdrant Vector Store (runtime)1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
1248,
-64
],
"parameters": {
"options": {},
"qdrantCollection": {
"__rl": true,
"mode": "list",
"value": "sales_docs",
"cachedResultName": "sales_docs"
}
},
"credentials": {
"qdrantApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "c3d1075f-e019-4e47-92ca-0efc5d937c3f",
"name": "RAG_FAQ1",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
1328,
-256
],
"parameters": {
"name": "RAG_FAQ",
"description": "Answer FAQs/policies/specs from vector store"
},
"typeVersion": 1
},
{
"id": "4cbfa8de-aae7-4d9e-bc76-42e002b92a27",
"name": "Embeddings OpenAI (runtime)1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
1248,
80
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "eb21abb7-76c0-4353-874c-0138a6581b84",
"name": "PRODUCT_SEARCH_WOO1",
"type": "n8n-nodes-base.wooCommerceTool",
"position": [
1728,
-208
],
"parameters": {
"options": {
"sku": "={{ $('Sales Info Extractor1').item.json.fields.sku }}",
"search": "={{ $('Sales Info Extractor1').item.json.fields.keyword }}",
"maxPrice": "={{ $('Sales Info Extractor1').item.json.fields.max_price }}",
"minPrice": "={{ $('Sales Info Extractor1').item.json.fields.min_price }}",
"stockStatus": "instock"
},
"operation": "getAll"
},
"credentials": {
"wooCommerceApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "c608958f-cda9-42f2-9ce4-86a02a8e1f0b",
"name": "INVENTORY_DETAIL_WOO1",
"type": "n8n-nodes-base.wooCommerceTool",
"position": [
1904,
-208
],
"parameters": {
"operation": "get",
"productId": "={{ $fromAI('product_id', '', 'string') }}"
},
"credentials": {
"wooCommerceApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "68eb6073-8be1-4f3b-88fc-9c28fa7b8a63",
"name": "PAYMENT_LINK1",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1712,
-384
],
"parameters": {
"name": "paymentLinkAgent",
"workflowId": {
"__rl": true,
"mode": "list",
"value": "PAYLINK-AGENT-ID",
"cachedResultName": "Payment Link Agent"
},
"description": "Create a Stripe payment link for chosen items",
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": []
}
},
"typeVersion": 2
},
{
"id": "965d4268-2fd0-4d8b-9957-38001836ee21",
"name": "CRM_LEAD1",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1888,
-384
],
"parameters": {
"name": "crmAgent",
"workflowId": {
"__rl": true,
"mode": "list",
"value": "CRM-AGENT-ID",
"cachedResultName": "CRM Agent"
},
"description": "Create/Update lead in CRM (HubSpot/Pipedrive)",
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": []
}
},
"typeVersion": 2
},
{
"id": "d1f0bbeb-4fa0-48a6-907f-33ca8aed1a32",
"name": "HUMAN_ESCALATION1",
"type": "n8n-nodes-base.telegramTool",
"position": [
2096,
-208
],
"parameters": {
"text": "={{ $fromAI('Text', '', 'string') }}",
"chatId": "SALES-ESCALATION-CHAT",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "c3ee1206-bc01-499d-a687-fb044d0996e8",
"name": "Qdrant Wipe1",
"type": "n8n-nodes-base.httpRequest",
"position": [
432,
-1216
],
"parameters": {
"url": "=https://xxxxxxxxxx.qdrant.io:6333/collections/sales_docs/points/delete",
"method": "POST",
"options": {},
"jsonBody": "{\n \"filter\": {}\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "d901677d-46d4-4891-a289-a626b19f419c",
"name": "Google Drive: List1",
"type": "n8n-nodes-base.googleDrive",
"position": [
624,
-1216
],
"parameters": {
"filter": {
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "DRIVE_FOLDER_ID",
"cachedResultName": "Sales Docs"
}
},
"options": {},
"resource": "fileFolder"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "ac729d26-43f7-46db-ad7c-81523ebaa0a8",
"name": "Google Drive: Download1",
"type": "n8n-nodes-base.googleDrive",
"position": [
832,
-1216
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "text/plain"
}
}
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "936e6bf5-06f3-469d-82e6-04b4e6f5d9fe",
"name": "Default Data Loader1",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1120,
-1024
],
"parameters": {
"options": {},
"dataType": "binary"
},
"typeVersion": 1
},
{
"id": "12b5d80d-3c78-47e4-960c-93396dc6a252",
"name": "Token Splitter1",
"type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
"position": [
1120,
-880
],
"parameters": {
"chunkSize": 300,
"chunkOverlap": 30
},
"typeVersion": 1
},
{
"id": "aedd2f0f-fd7b-4f44-b8c7-fa497e9b8485",
"name": "Embeddings OpenAI (build)1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
992,
-1008
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "db9980d3-176b-4236-b002-ec552c023118",
"name": "Qdrant Vector Store (insert)1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
1040,
-1216
],
"parameters": {
"mode": "insert",
"options": {},
"qdrantCollection": {
"__rl": true,
"mode": "list",
"value": "sales_docs",
"cachedResultName": "sales_docs"
}
},
"credentials": {
"qdrantApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "6ce8870c-9150-44cb-86e2-ef55a2f0931f",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1536,
-64
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "7d78df3f-98d7-4d53-af20-ad6dd1ca1d3c",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-320
],
"parameters": {
"color": 5,
"width": 528,
"height": 320,
"content": "\ud83d\uded2 **WooCommerce AI Sales Agent \u2013 Overview**\n\nThis workflow turns n8n into an **AI-powered sales assistant** for WooCommerce. \nIt can: \n- Detect customer intent (FAQ, product search, payment, lead capture). \n- Search products directly in WooCommerce and show stock details. \n- Answer FAQs using RAG with Qdrant + Google Drive documents. \n- Generate Stripe payment links for checkout. \n- Capture leads into CRM (HubSpot/Pipedrive). \n- Escalate unclear cases to human agents via Telegram. \n\nResult: A **24/7 automated sales agent** that helps customers from discovery \u2192 payment \u2192 lead capture.\n"
},
"typeVersion": 1
},
{
"id": "6462a494-08bc-43ef-ac60-405f1a5861bb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
-720
],
"parameters": {
"color": 3,
"width": 528,
"height": 256,
"content": "\u2699\ufe0f **Setup & Customization Notes**\n\nBefore using this workflow: \n1. \ud83d\udd11 Connect credentials: WooCommerce API, Stripe, CRM, Google Drive, OpenAI/Gemini, Qdrant, Telegram. \n2. \ud83c\udf0d Adjust language/localization (`hl`, `gl`) if needed for your market. \n3. \ud83d\udcc2 Update Google Drive folder ID where your sales docs are stored. \n4. \ud83d\uddd1\ufe0f Use \u201cQdrant Wipe\u201d if you want to re-index fresh documents. \n5. \u270f\ufe0f Customize agent\u2019s response style (formal, casual, short/long) in the `Sales AI Agent` system prompt. \n"
},
"typeVersion": 1
},
{
"id": "e2641b81-60fb-48c2-b763-a3b55864fa44",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-1056
],
"parameters": {
"color": 5,
"width": 528,
"height": 352,
"content": "\ud83d\udcc2 **Knowledge Base Update Flow**\n\nPurpose: Keeps the AI\u2019s FAQ knowledge accurate and up to date. \n\nHow it works: \n1. **Trigger (Manual Execute)** \u2192 Run when you want to refresh the knowledge base. \n2. **Qdrant Wipe** \u2192 Clears all old vectors. \n3. **Google Drive List & Download** \u2192 Loads all sales/policy documents from the configured folder. \n4. **Splitter + Embeddings** \u2192 Splits text into chunks and creates embeddings. \n5. **Qdrant Insert** \u2192 Stores embeddings in vector DB for retrieval (RAG). \n\n\ud83d\udca1 Use this flow whenever sales policies, product docs, or FAQs are updated. \n"
},
"typeVersion": 1
}
],
"connections": {
"RAG_FAQ1": {
"ai_tool": [
[
{
"node": "Sales AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"CRM_LEAD1": {
"ai_tool": [
[
{
"node": "Sales AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "Sales Info Extractor1",
"type": "main",
"index": 0
}
]
]
},
"Qdrant Wipe1": {
"main": [
[
{
"node": "Google Drive: List1",
"type": "main",
"index": 0
}
]
]
},
"PAYMENT_LINK1": {
"ai_tool": [
[
{
"node": "Sales AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Token Splitter1": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader1",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"HUMAN_ESCALATION1": {
"ai_tool": [
[
{
"node": "Sales AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Drive: List1": {
"main": [
[
{
"node": "Google Drive: Download1",
"type": "main",
"index": 0
}
]
]
},
"PRODUCT_SEARCH_WOO1": {
"ai_tool": [
[
{
"node": "Sales AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Default Data Loader1": {
"ai_document": [
[
{
"node": "Qdrant Vector Store (insert)1",
"type": "ai_document",
"index": 0
}
]
]
},
"INVENTORY_DETAIL_WOO1": {
"ai_tool": [
[
{
"node": "Sales AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Sales Info Extractor1": {
"main": [
[
{
"node": "Sales AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"Window Buffer Memory1": {
"ai_memory": [
[
{
"node": "Sales AI Agent1",
"type": "ai_memory",
"index": 0
}
]
]
},
"Google Drive: Download1": {
"main": [
[
{
"node": "Qdrant Vector Store (insert)1",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "RAG_FAQ1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings OpenAI (build)1": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store (insert)1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"OpenAI Chat Model (Agent)1": {
"ai_languageModel": [
[
{
"node": "Sales AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI (runtime)1": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store (runtime)1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"OpenAI Chat Model (Extractor)1": {
"ai_languageModel": [
[
{
"node": "Sales Info Extractor1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Qdrant Vector Store (runtime)1": {
"ai_vectorStore": [
[
{
"node": "RAG_FAQ1",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"When clicking 'Execute workflow'": {
"main": [
[
{
"node": "Qdrant Wipe1",
"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.
googleDriveOAuth2ApigooglePalmApihttpHeaderAuthopenAiApiqdrantApitelegramApiwooCommerceApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
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 payment links, captures leads into your CRM, and even escalates to human support…
Source: https://n8n.io/workflows/8011/ — 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 acts as a 24/7 sales agent, engaging leads across WhatsApp, Instagram, Facebook, Telegram, and your website. It intelligently transcribes audio messages, answers questions using a knowle
• Create a Google Drive folder to watch. • Connect your Google Drive account in n8n and authorize access. • Point the Google Drive Trigger node to this folder (new/modified files trigger the flow).
⚡AI-Powered YouTube Playlist & Video Summarization and Analysis v2. Uses lmChatGoogleGemini, agent, splitOut, chainLlm. Chat trigger; 72 nodes.
This n8n workflow transforms entire YouTube playlists or single videos into interactive knowledge bases you can chat with. Ask questions and get summaries without needing to watch hours of content. 🔗
The workflow operates through a three-step process that handles incoming chat messages with intelligent tool orchestration: Message Trigger: The node triggers whenever a user message arrives and passe