diff --git a/chat-de-whatsapp-propuestas-ejecutadas.json b/chat-de-whatsapp-propuestas-ejecutadas.json new file mode 100644 index 0000000..78d0f20 --- /dev/null +++ b/chat-de-whatsapp-propuestas-ejecutadas.json @@ -0,0 +1,802 @@ +{ + "updatedAt": "2026-06-09T03:35:09.606Z", + "createdAt": "2026-06-08T20:09:28.132Z", + "id": "sXH75CXIQ0sEzm1Y", + "name": "Chat de WhatsApp - Propuestas Ejecutadas", + "description": null, + "active": true, + "isArchived": false, + "nodes": [ + { + "parameters": { + "method": "POST", + "url": "={{'https://wsp.gomezleemarketing.com'}}/message/sendText/{{'botsoporte'}}", + "sendHeaders": true, + "headerParameters": { + "parameters": [ + { + "name": "apikey", + "value": "={{'C267126ABB45-4C12-B626-6BAB1833F5D7'}}" + } + ] + }, + "sendBody": true, + "bodyParameters": { + "parameters": [ + { + "name": "number", + "value": "={{ $json.whatsapp_to || $json.whatsapp_remote_jid || $json.manager_telefono }}" + }, + { + "name": "text ", + "value": "={{ $json.whatsapp_text || $json.telegram_text || $json.texto_respuesta || $json.mensaje || $json.text }}" + }, + { + "name": "delay", + "value": "={{ 1000 }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.4, + "position": [ + 2464, + -272 + ], + "id": "b1d4c2c3-c77f-4b9d-b4ca-c40535c26299", + "name": "WhatsApp - Enviar mensaje TEST" + }, + { + "parameters": { + "jsCode": "const input = $json || {};\nconst body = input.body || input;\nconst data = body.data || {};\n\nconst texto = (valor) => String(valor ?? '').trim();\n\nconst limpiarNumero = (valor) =>\n texto(valor)\n .replace('@s.whatsapp.net', '')\n .replace('@c.us', '')\n .replace('@g.us', '')\n .replace(/\\D/g, '');\n\nconst key = data.key || {};\n\nconst remoteJid = texto(key.remoteJid || data.remoteJid || body.remoteJid || '');\nconst managerTelefono = limpiarNumero(remoteJid);\n\nconst pushName =\n texto(data.pushName) ||\n texto(body.pushName) ||\n 'Usuario WhatsApp';\n\nconst message = data.message || {};\n\nconst textoMensaje =\n texto(message.conversation) ||\n texto(message.extendedTextMessage?.text) ||\n texto(data.messageText) ||\n texto(data.text) ||\n texto(body.text) ||\n '';\n\nlet messageType = 'unknown';\n\nif (message.audioMessage) {\n messageType = 'audio';\n} else if (message.imageMessage) {\n messageType = 'image';\n} else if (message.videoMessage) {\n messageType = 'video';\n} else if (textoMensaje) {\n messageType = 'text';\n}\n\nconst tieneMedia = ['audio', 'image', 'video'].includes(messageType);\n\nconst mediaMimeType =\n texto(message.audioMessage?.mimetype) ||\n texto(message.imageMessage?.mimetype) ||\n texto(message.videoMessage?.mimetype) ||\n '';\n\nconst mediaSourceId =\n texto(key.id) ||\n texto(data.id) ||\n texto(data.messageId) ||\n '';\n\nconst normalizarComando = (valor) => {\n const t = texto(valor)\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .toUpperCase();\n\n if (t === '/START' || t === 'START' || t === 'INICIAR') return 'START';\n if (t === 'CANCELAR') return 'CANCELAR';\n if (t === 'FOTOS LISTAS' || t === 'FOTOS_LISTAS') return 'FOTOS_LISTAS';\n if (t === 'SIN VIDEO' || t === 'SIN_VIDEO') return 'SIN_VIDEO';\n if (t === 'LISTO') return 'LISTO';\n\n return 'NORMAL';\n};\n\nreturn [\n {\n json: {\n event_id: texto(key.id || data.id || Date.now()),\n fecha_recepcion: new Date().toISOString(),\n\n canal_origen: 'WHATSAPP',\n\n manager_telefono: managerTelefono,\n manager_nombre: pushName,\n usuario_id_origen: managerTelefono,\n\n whatsapp_remote_jid: remoteJid,\n whatsapp_to: remoteJid,\n\n from_me: Boolean(key.fromMe || data.fromMe || false),\n\n message_type: messageType,\n texto: textoMensaje,\n accion_flujo: normalizarComando(textoMensaje),\n\n tiene_media: tieneMedia,\n media_count: tieneMedia ? 1 : 0,\n media_source_id: mediaSourceId,\n media_mime_type: mediaMimeType,\n media_file_name: '',\n\n raw_preview: JSON.stringify(body).slice(0, 4000),\n raw_event: body,\n },\n },\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 208, + -256 + ], + "id": "35e401ba-acce-429c-b811-58a45c032869", + "name": "Code - Normalizar evento WhatsApp TEST" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "f2be1fb5-b047-4614-a1f2-9a4d65ef5cc7", + "leftValue": "={{ $json.body.data.key.remoteJid }}", + "rightValue": "={{ $json.manager_telefono === '18298946645' }}", + "operator": { + "type": "string", + "operation": "equals" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.3, + "position": [ + 480, + -256 + ], + "id": "3b65e795-a7f8-415c-8c04-7cde544c4350", + "name": "Mi numero TESTING" + }, + { + "parameters": { + "httpMethod": "POST", + "path": "factura", + "options": {} + }, + "type": "n8n-nodes-base.webhook", + "typeVersion": 2.1, + "position": [ + 0, + -256 + ], + "id": "bbdd46ca-d2f0-4c42-8e14-d9591168cf4d", + "name": "Webhook - Evolution WhatsApp TEST", + "webhookId": "e2e6c9c2-6c1e-453d-85f1-271056935828" + }, + { + "parameters": { + "documentId": { + "__rl": true, + "value": "1SEzELmiQO6EOBZ7AARfwzfrZpQ3AfSS_Y1VRHgb8ziQ", + "mode": "list", + "cachedResultName": "TEST - Fulgencio - Propuestas Ejecutadas", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SEzELmiQO6EOBZ7AARfwzfrZpQ3AfSS_Y1VRHgb8ziQ/edit?usp=drivesdk" + }, + "sheetName": { + "__rl": true, + "value": 616166581, + "mode": "list", + "cachedResultName": "wa_ejecuciones_sesiones", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SEzELmiQO6EOBZ7AARfwzfrZpQ3AfSS_Y1VRHgb8ziQ/edit#gid=616166581" + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 848, + -272 + ], + "id": "653ca576-1661-49aa-80cb-62b7ec46a1c0", + "name": "Sheets - Leer sesiones existentes", + "alwaysOutputData": true, + "credentials": { + "googleSheetsOAuth2Api": { + "id": "K0hDZh3a85MpOHCs", + "name": "Google Sheets account 2" + } + } + }, + { + "parameters": { + "jsCode": "const evento = $('Code - Normalizar evento WhatsApp TEST').first().json || {};\nconst sesiones = $input.all().map((item) => item.json || {});\n\nconst texto = (valor) => String(valor ?? '').trim();\n\nconst estadosAbiertos = new Set([\n 'ACTIVA',\n 'PENDIENTE',\n 'EN_PROCESO',\n 'PROCESANDO',\n 'LISTO_PARA_RECUPERAR_MEDIA',\n 'LISTO_PARA_ANALIZAR',\n]);\n\nconst etapasAbiertas = new Set([\n 'ESPERANDO_AUDIO',\n 'ESPERANDO_IMAGENES',\n 'ESPERANDO_VIDEOS',\n 'PROCESANDO',\n]);\n\nconst managerTelefono = texto(evento.manager_telefono);\nconst accion = texto(evento.accion_flujo || 'NORMAL');\n\nconst sesionActiva = sesiones\n .filter((row) => texto(row.manager_telefono) === managerTelefono)\n .filter((row) => {\n const estado = texto(row.estado).toUpperCase();\n const etapa = texto(row.etapa).toUpperCase();\n\n return estadosAbiertos.has(estado) || etapasAbiertas.has(etapa);\n })\n .sort((a, b) => {\n return new Date(b.ultima_actividad || b.fecha_inicio || 0) - new Date(a.ultima_actividad || a.fecha_inicio || 0);\n })[0] || null;\n\nconst suffix = Math.random().toString(36).slice(2, 6).toUpperCase();\nconst sessionId = `WA_${Date.now()}_${managerTelefono.slice(-4)}_${suffix}`;\n\nlet decision = '';\n\nif (accion === 'START') {\n decision = sesionActiva ? 'AVISO_SESION_ACTIVA' : 'CREAR_SESION';\n} else if (accion === 'CANCELAR') {\n decision = sesionActiva ? 'CANCELAR_SESION' : 'SIN_SESION_PARA_CANCELAR';\n} else {\n decision = sesionActiva ? 'CONTINUAR_SESION' : 'SIN_SESION_ACTIVA';\n}\n\nreturn [\n {\n json: {\n ...evento,\n\n sesion_activa_encontrada: Boolean(sesionActiva),\n sesion_activa: sesionActiva,\n\n session_id: sesionActiva ? texto(sesionActiva.session_id) : sessionId,\n ejecucion_id: sesionActiva ? texto(sesionActiva.ejecucion_id || sesionActiva.session_id) : sessionId,\n\n decision_flujo: decision,\n\n nueva_sesion: {\n session_id: sessionId,\n manager_telefono: managerTelefono,\n manager_nombre: texto(evento.manager_nombre),\n canal_origen: 'WHATSAPP',\n fecha_inicio: new Date().toISOString(),\n ultima_actividad: new Date().toISOString(),\n etapa: 'ESPERANDO_AUDIO',\n audio_count: 0,\n imagenes_count: 0,\n videos_count: 0,\n estado: 'ACTIVA',\n ejecucion_id: sessionId,\n motivo_revision: '',\n },\n },\n },\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 1040, + -272 + ], + "id": "91675542-137d-4976-9c1c-3ba26bb1ddab", + "name": "Code - Resolver sesión WhatsApp TEST" + }, + { + "parameters": { + "rules": { + "values": [ + { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "leftValue": "={{ $json.decision_flujo === 'CREAR_SESION' }}", + "rightValue": "", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + }, + "id": "acec6506-977a-412d-b08a-fbcc8de4b0b8" + } + ], + "combinator": "and" + }, + "renameOutput": true, + "outputKey": "CREAR_SESION" + }, + { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "5c9dcfa5-9b15-428c-ad80-c277b0671658", + "leftValue": "={{ $json.decision_flujo === 'AVISO_SESION_ACTIVA' }}", + "rightValue": "", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "renameOutput": true, + "outputKey": "AVISO_SESION_ACTIVA" + }, + { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "966402b5-4517-45c2-8a87-0a7aa4e5e682", + "leftValue": "={{ $json.decision_flujo === 'SIN_SESION_ACTIVA' }}", + "rightValue": "", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "renameOutput": true, + "outputKey": "SIN_SESION_ACTIVA" + }, + { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "698f3da3-29d2-472f-b625-af387891035e", + "leftValue": "={{ $json.decision_flujo === 'CANCELAR_SESION' }}", + "rightValue": "", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "renameOutput": true, + "outputKey": "CANCELAR_SESION" + }, + { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "d5feac06-4493-494e-ac1e-36c007f0de79", + "leftValue": "={{ $json.decision_flujo === 'SIN_SESION_PARA_CANCELAR' }}", + "rightValue": "", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "renameOutput": true, + "outputKey": "SIN_SESION_PARA_CANCELAR" + }, + { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "950979b7-b930-4260-a392-52277a742e43", + "leftValue": "={{ $json.decision_flujo === 'CONTINUAR_SESION' }}", + "rightValue": "", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "renameOutput": true, + "outputKey": "CONTINUAR_SESION" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.switch", + "typeVersion": 3.4, + "position": [ + 1264, + -336 + ], + "id": "50d7bb39-3a6d-4906-b695-e6b09ba5c545", + "name": "Switch - Decisión sesión WhatsApp TEST" + }, + { + "parameters": { + "jsCode": "const datos = $('Code - Resolver sesión WhatsApp TEST').first().json || {};\n\nconst mensaje = [\n '📸 *Propuestas Ejecutadas - GLM*',\n '',\n `¡Hola, ${datos.manager_nombre || 'equipo'}! Bienvenido al registro de propuestas ejecutadas.`,\n '',\n 'Este proceso permite documentar ejecuciones reales para alimentar el banco de evidencias de Fulgencio Fumado.',\n '',\n '*Paso 1 de 3 — Nota de voz obligatoria*',\n '',\n 'Envía una nota de voz indicando:',\n '',\n '• Nombre o referencia de la propuesta ejecutada',\n '• Marca o cliente',\n '• País',\n '• Ubicación de la ejecución',\n '• Fecha de ejecución',\n '• Qué se implementó',\n '• Comentarios o resultados observados',\n '',\n 'Importante: registra una sola propuesta ejecutada a la vez.',\n].join('\\n');\n\nreturn [\n {\n json: {\n ...datos,\n whatsapp_to: datos.whatsapp_to || datos.whatsapp_remote_jid,\n whatsapp_text: mensaje,\n },\n },\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 1840, + -592 + ], + "id": "304baef0-fda7-43ce-8bfe-24ed684ced3b", + "name": "Code - Preparar bienvenida WhatsApp TEST" + }, + { + "parameters": { + "jsCode": "const datos = $json || {};\n\nconst etapa = String(datos.sesion_activa?.etapa || '').trim() || 'pendiente';\n\nconst mensaje = [\n '⚠️ Ya tienes un reporte de propuesta ejecutada en proceso.',\n '',\n `Etapa actual: ${etapa}`,\n '',\n 'Completa ese reporte antes de iniciar uno nuevo.',\n '',\n 'Si deseas cancelarlo, escribe: CANCELAR',\n].join('\\n');\n\nreturn [\n {\n json: {\n ...datos,\n whatsapp_to: datos.whatsapp_to || datos.whatsapp_remote_jid,\n whatsapp_text: mensaje,\n },\n },\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 1696, + -336 + ], + "id": "bf9701ac-00d2-47c3-a495-ddaad66ed0be", + "name": "Code - Preparar aviso sesión activa WhatsApp TEST" + }, + { + "parameters": { + "operation": "append", + "documentId": { + "__rl": true, + "value": "1nbeuaW2lxvWJYVFD-E0uJRhTGzUa-nuH2WYItHdTsKk", + "mode": "list", + "cachedResultName": "Fulgencio - Propuestas Ejecutadas", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nbeuaW2lxvWJYVFD-E0uJRhTGzUa-nuH2WYItHdTsKk/edit?usp=drivesdk" + }, + "sheetName": { + "__rl": true, + "value": 616166581, + "mode": "list", + "cachedResultName": "wa_ejecuciones_sesiones", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nbeuaW2lxvWJYVFD-E0uJRhTGzUa-nuH2WYItHdTsKk/edit#gid=616166581" + }, + "columns": { + "mappingMode": "defineBelow", + "value": { + "session_id": "={{ $json.nueva_sesion.session_id }}", + "manager_telefono": "={{ $json.nueva_sesion.manager_telefono }}", + "manager_nombre": "={{ $json.nueva_sesion.manager_nombre }}", + "canal_origen": "={{ $json.nueva_sesion.canal_origen }}", + "fecha_inicio": "={{ $json.nueva_sesion.fecha_inicio }}", + "ultima_actividad": "={{ $json.nueva_sesion.ultima_actividad }}", + "etapa": "={{ $json.nueva_sesion.etapa }}", + "audio_count": "={{ $json.nueva_sesion.audio_count }}", + "imagenes_count": "={{ $json.nueva_sesion.imagenes_count }}", + "videos_count": "={{ $json.nueva_sesion.videos_count }}", + "estado": "={{ $json.nueva_sesion.estado }}", + "ejecucion_id": "={{ $json.nueva_sesion.ejecucion_id }}", + "motivo_revision": "={{ $json.nueva_sesion.motivo_revision }}" + }, + "matchingColumns": [], + "schema": [ + { + "id": "session_id", + "displayName": "session_id", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "manager_telefono", + "displayName": "manager_telefono", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "manager_nombre", + "displayName": "manager_nombre", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "canal_origen", + "displayName": "canal_origen", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "fecha_inicio", + "displayName": "fecha_inicio", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "ultima_actividad", + "displayName": "ultima_actividad", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "etapa", + "displayName": "etapa", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "audio_count", + "displayName": "audio_count", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "imagenes_count", + "displayName": "imagenes_count", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "videos_count", + "displayName": "videos_count", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "estado", + "displayName": "estado", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "ejecucion_id", + "displayName": "ejecucion_id", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "motivo_revision", + "displayName": "motivo_revision", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + } + ], + "attemptToConvertTypes": false, + "convertFieldsToString": false + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 1632, + -592 + ], + "id": "cff69027-2e70-4be6-ad78-80ae6680ca75", + "name": "Sheets - Crear sesión WhatsApp TEST", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "K0hDZh3a85MpOHCs", + "name": "Google Sheets account 2" + } + } + } + ], + "connections": { + "Code - Normalizar evento WhatsApp TEST": { + "main": [ + [ + { + "node": "Mi numero TESTING", + "type": "main", + "index": 0 + } + ] + ] + }, + "Mi numero TESTING": { + "main": [ + [ + { + "node": "Sheets - Leer sesiones existentes", + "type": "main", + "index": 0 + } + ] + ] + }, + "Webhook - Evolution WhatsApp TEST": { + "main": [ + [ + { + "node": "Code - Normalizar evento WhatsApp TEST", + "type": "main", + "index": 0 + } + ] + ] + }, + "WhatsApp - Enviar mensaje TEST": { + "main": [ + [] + ] + }, + "Sheets - Leer sesiones existentes": { + "main": [ + [ + { + "node": "Code - Resolver sesión WhatsApp TEST", + "type": "main", + "index": 0 + } + ] + ] + }, + "Code - Resolver sesión WhatsApp TEST": { + "main": [ + [ + { + "node": "Switch - Decisión sesión WhatsApp TEST", + "type": "main", + "index": 0 + } + ] + ] + }, + "Switch - Decisión sesión WhatsApp TEST": { + "main": [ + [ + { + "node": "Sheets - Crear sesión WhatsApp TEST", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Code - Preparar aviso sesión activa WhatsApp TEST", + "type": "main", + "index": 0 + } + ] + ] + }, + "Code - Preparar bienvenida WhatsApp TEST": { + "main": [ + [ + { + "node": "WhatsApp - Enviar mensaje TEST", + "type": "main", + "index": 0 + } + ] + ] + }, + "Sheets - Crear sesión WhatsApp TEST": { + "main": [ + [ + { + "node": "Code - Preparar bienvenida WhatsApp TEST", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "settings": { + "executionOrder": "v1", + "binaryMode": "separate" + }, + "staticData": null, + "meta": { + "templateCredsSetupCompleted": true + }, + "versionId": "2f8abcd4-eb80-4a0f-9346-e1a6b5fefcdc", + "activeVersionId": "b233a72c-7778-4c95-b350-fbe215f858d8", + "versionCounter": 130, + "triggerCount": 1, + "shared": [ + { + "updatedAt": "2026-06-08T20:09:28.138Z", + "createdAt": "2026-06-08T20:09:28.138Z", + "role": "workflow:owner", + "workflowId": "sXH75CXIQ0sEzm1Y", + "projectId": "PJpTANzTXIFibWsW", + "project": { + "updatedAt": "2026-04-22T14:25:09.686Z", + "createdAt": "2026-04-22T14:22:54.790Z", + "id": "PJpTANzTXIFibWsW", + "name": "Isaac Aracena ", + "type": "personal", + "icon": null, + "description": null, + "creatorId": "0a88c0b1-928e-4412-896e-c5d1c99b2029" + } + } + ], + "tags": [], + "activeVersion": { + "updatedAt": "2026-06-08T21:59:59.000Z", + "createdAt": "2026-06-08T21:59:32.605Z", + "versionId": "b233a72c-7778-4c95-b350-fbe215f858d8", + "workflowId": "sXH75CXIQ0sEzm1Y", + "nodes": [ + { + "parameters": { + "httpMethod": "POST", + "path": "factura", + "options": {} + }, + "type": "n8n-nodes-base.webhook", + "typeVersion": 2.1, + "position": [ + -528, + -48 + ], + "id": "5f51a4c2-d554-4947-8ee6-6e8ec43338b1", + "name": "Webhook - Evolution WhatsApp TEST", + "webhookId": "e2e6c9c2-6c1e-453d-85f1-271056935828" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "f2be1fb5-b047-4614-a1f2-9a4d65ef5cc7", + "leftValue": "={{ $json.body.data.key.remoteJid }}", + "rightValue": "=18298946645@s.whatsapp.net", + "operator": { + "type": "string", + "operation": "equals" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.3, + "position": [ + -240, + -32 + ], + "id": "e6e861c4-a0ef-4df0-bfbb-2acfb2b32cac", + "name": "Mi numero TESTING" + }, + { + "parameters": { + "method": "POST", + "url": "={{'https://wsp.gomezleemarketing.com'}}/message/sendText/{{'botsoporte'}}", + "sendHeaders": true, + "headerParameters": { + "parameters": [ + { + "name": "apikey", + "value": "={{'C267126ABB45-4C12-B626-6BAB1833F5D7'}}" + } + ] + }, + "sendBody": true, + "bodyParameters": { + "parameters": [ + { + "name": "number", + "value": "={{ \"18298946645@s.whatsapp.net\" }}" + }, + { + "name": "mediatype", + "value": "=image" + }, + { + "name": "text", + "value": "=Hey" + }, + { + "name": "delay", + "value": "={{4000}}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.2, + "position": [ + 32, + -64 + ], + "id": "d0e6fe17-2483-4b96-91df-b53cb302feaf", + "name": "Alerta factura no es válida" + } + ], + "connections": { + "Webhook - Evolution WhatsApp TEST": { + "main": [ + [ + { + "node": "Mi numero TESTING", + "type": "main", + "index": 0 + } + ] + ] + }, + "Mi numero TESTING": { + "main": [ + [ + { + "node": "Alerta factura no es válida", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "authors": "Isaac Aracena", + "name": "Version b233a72c", + "description": "", + "autosaved": true, + "workflowPublishHistory": [ + { + "createdAt": "2026-06-08T21:59:59.162Z", + "id": 1223, + "workflowId": "sXH75CXIQ0sEzm1Y", + "versionId": "b233a72c-7778-4c95-b350-fbe215f858d8", + "event": "activated", + "userId": "0a88c0b1-928e-4412-896e-c5d1c99b2029" + } + ] + } +} \ No newline at end of file