This workflow follows the Execute Workflow Trigger → HTTP Request 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 →
{
"name": "KALELE_BUSCAR_PRODUCTO",
"nodes": [
{
"parameters": {
"inputSource": "passthrough"
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "trg-buscar-001",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"jsCode": "// Recibe { query } y extrae talla / color del texto para enriquecer la b\u00fasqueda.\nconst trg = $input.first().json || {};\nconst raw = (trg.query || '').toString().trim();\n\nconst lower = raw.toLowerCase();\n\n// Detectar talla (XS, S, M, L, XL, XXL como palabras sueltas)\nconst tallaMatch = lower.match(/\\b(xxl|xl|xs|[sml])\\b/i);\nconst talla = tallaMatch ? tallaMatch[1].toLowerCase() : '';\n\n// Detectar color (lista com\u00fan en espa\u00f1ol)\nconst coloresConocidos = ['negro','blanco','rojo','azul','verde','amarillo','rosa','rosado','morado','lila','beige','crema','cafe','caf\u00e9','marron','marr\u00f3n','gris','dorado','plateado','naranja','celeste','turquesa','vino','nude','floral','multi'];\nlet color = '';\nfor (const c of coloresConocidos) {\n if (lower.includes(c)) { color = c; break; }\n}\n\n// La query para WooCommerce: removemos la talla aislada y palabras como 'talla', dejamos descripci\u00f3n + color si hay.\nconst searchQuery = raw\n .replace(/\\b(talla|size)\\s+/ig, '')\n .replace(/\\b(xxl|xl|xs|[sml])\\b/ig, '')\n .replace(/\\s+/g, ' ')\n .trim();\n\nreturn [{ json: { query_original: raw, search: searchQuery, talla, color } }];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
240,
0
],
"id": "code-parse-001",
"name": "Parsear query"
},
{
"parameters": {
"url": "https://kaleleboutique.com/wp-json/wc/store/v1/products",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "search",
"value": "={{ $json.search }}"
},
{
"name": "per_page",
"value": "20"
},
{
"name": "orderby",
"value": "popularity"
}
]
},
"options": {
"response": {
"response": {
"neverError": true
}
},
"timeout": 15000
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
480,
0
],
"id": "http-buscar-001",
"name": "WooCommerce Search"
},
{
"parameters": {
"jsCode": "// Toma la respuesta de WooCommerce + la talla/color parseados y devuelve\n// la estructura limpia para el LLM.\nconst parsed = $('Parsear query').first().json;\nconst tallaPedida = (parsed.talla || '').toLowerCase();\nconst colorPedido = (parsed.color || '').toLowerCase();\nconst query = parsed.query_original || '';\n\nfunction extraerTallas(attrs) {\n const a = (attrs || []).find(x => (x.name || '').toLowerCase() === 'talla');\n return a ? a.terms.map(t => t.name.toLowerCase()) : [];\n}\nfunction extraerColores(attrs) {\n const a = (attrs || []).find(x => (x.name || '').toLowerCase() === 'color');\n return a ? a.terms.map(t => t.name.toLowerCase()) : [];\n}\nfunction limpiarPrecio(p) {\n if (!p || !p.price) return '';\n const symbol = p.currency_prefix || '\u20a1';\n const n = parseInt(p.price, 10);\n if (isNaN(n)) return p.price;\n return symbol + n.toLocaleString('es-CR');\n}\n\nconst raw = $input.first().json;\nconst productos = Array.isArray(raw) ? raw : (raw.data || []);\n\nif (!productos || productos.length === 0) {\n return [{ json: { status: 'no_encontrado', query, mensaje: 'No encontr\u00e9 ese producto en kaleleboutique.com. Prob\u00e1 otra b\u00fasqueda u ofrec\u00e9 alternativas con productos_similares.' } }];\n}\n\nconst mapeados = productos.map(p => {\n const tallas = extraerTallas(p.attributes);\n const colores = extraerColores(p.attributes);\n const stockOk = p.is_in_stock && p.is_purchasable;\n let disponibilidad;\n if (!stockOk) disponibilidad = 'agotado';\n else if (tallaPedida && tallas.length && !tallas.includes(tallaPedida)) disponibilidad = 'talla_no_disponible';\n else if (colorPedido && colores.length && !colores.includes(colorPedido)) disponibilidad = 'color_no_disponible';\n else disponibilidad = 'disponible';\n return {\n id: p.id,\n sku: p.sku || '',\n nombre: p.name,\n categoria: (p.categories || []).map(c => c.name).join(', '),\n precio: limpiarPrecio(p.prices),\n en_oferta: p.on_sale === true,\n tallas_disponibles: tallas,\n colores_disponibles: colores,\n foto: (p.images && p.images[0]) ? p.images[0].src : '',\n link: p.permalink,\n disponibilidad\n };\n});\n\nreturn [{\n json: {\n status: 'encontrado',\n query,\n talla_pedida: tallaPedida,\n color_pedido: colorPedido,\n producto: mapeados[0],\n coincidencias_adicionales: mapeados.slice(1, 6),\n total_resultados: mapeados.length\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
720,
0
],
"id": "code-buscar-001",
"name": "Formatear resultado"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "out-1",
"name": "respuesta",
"value": "={{ JSON.stringify($json) }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
960,
0
],
"id": "set-buscar-001",
"name": "Edit Fields"
}
],
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Parsear query",
"type": "main",
"index": 0
}
]
]
},
"Parsear query": {
"main": [
[
{
"node": "WooCommerce Search",
"type": "main",
"index": 0
}
]
]
},
"WooCommerce Search": {
"main": [
[
{
"node": "Formatear resultado",
"type": "main",
"index": 0
}
]
]
},
"Formatear resultado": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"tags": []
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
KALELE_BUSCAR_PRODUCTO. Uses executeWorkflowTrigger, httpRequest. Event-driven trigger; 5 nodes.
Source: https://gist.github.com/ivanfuentes1024-dot/3a40df7d7f2605debb6c566795f31ab1 — 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.
02_LLM_Pipeline v1.0. Uses executeWorkflowTrigger, httpRequest, seaTable. Event-driven trigger; 65 nodes.
This template is a powerful, reusable utility for managing stateful, long-running processes. It allows a main workflow to be paused indefinitely at "checkpoints" and then be resumed by external, async
Upload files from any source to your account Kommo or AmoCRM with a simple and reusable workflow. It can split a large file into small ones and upload chunks. Works for Kommo and amoCRM There are 3 re
Remixed Backup your workflows to GitHub from Solomon's work. Check out his templates.
Remixed Backup your workflows to GitHub from Solomon's work. Check out his templates.