# execution_data

workflowData:
  {"id":"LR2Fl6iZzy7Oupgf","name":"Flujo Unificado Reserva 2026 - FINAL","active":false,"nodes":[{"parameters":{"multipleMethods":false,"httpMethod":"POST","path":"reserva-unificada-2026","authentication":"none","responseMode":"onReceived","responseCode":200,"contentTypeNotice":"","options":{"allowedOrigins":"*"}},"id":"30efade6-cfbd-4856-b030-5df50eb8399e","name":"Webhook Formulario","type":"n8n-nodes-base.webhook","typeVersion":1,"position":[-3504,256],"webhookId":"reserva-unificada-2026"},{"parameters":{"preBuiltAgentsCalloutGoogleSheets":"","authentication":"oAuth2","resource":"sheet","operation":"append","documentId":{"__rl":true,"value":"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit?gid=0#gid=0","mode":"url"},"sheetName":{"__rl":true,"value":324738822,"mode":"list","cachedResultName":"Hoja 2","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit#gid=324738822"},"columns":{"mappingMode":"defineBelow","value":{"Fecha":"={{ $now }}","Nombre":"={{ $json.body.nombre }}","Apellido":"={{ $json.body.apellido }}","Empresa":"={{ $json.body.empresa }}","CUIT":"={{ $json.body.cuit }}","Email":"={{ $json.body.email }}","Teléfono":"={{ $json.body.telefono }}","Plan":"={{ $json.body.plan_detalle }}","Cursos":"={{ $json.body.cursos }}"},"matchingColumns":[],"schema":[{"id":"Fecha","displayName":"Fecha","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Nombre","displayName":"Nombre","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Apellido","displayName":"Apellido","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Empresa","displayName":"Empresa","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"CUIT","displayName":"CUIT","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Email","displayName":"Email","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Teléfono","displayName":"Teléfono","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Plan","displayName":"Plan","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Cursos","displayName":"Cursos","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true},{"id":"Respondio","displayName":"Respondio","required":false,"defaultMatch":false,"display":true,"type":"string","canBeUsedToMatch":true,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"id":"035bf449-ff45-44c8-a62a-dc98a45aefbc","name":"1. Guardar Lead","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[-3296,256],"credentials":{"googleSheetsOAuth2Api":{"id":"5TssK5sjUDI7k2MP","name":"Google Sheets account"}}},{"parameters":{"resource":"email","operation":"send","fromEmail":"avisos@info.excelcertify.com","toEmail":"={{ $('Webhook Formulario').item.json.body.email }}","subject":"Confirmado: Tu tarifa 2025 está congelada","emailFormat":"html","html":"=<div style=\"font-family: Arial, sans-serif; color: #333;\">\n  <h2 style=\"color: #10B981;\">¡Hola {{ $('Webhook Formulario').item.json.body.nombre }}!</h2>\n  <p>Te confirmo que hemos recibido tu reserva para <strong>{{ $('Webhook Formulario').item.json.body.empresa }}</strong>.</p>\n  <p>El precio promocional ha quedado congelado correctamente.</p>\n  <p><strong>¿Qué sigue ahora?</strong></p>\n  <p>En los próximos 30 minutos, uno de nuestros expertos armará tu <strong>Presupuesto Formal en PDF</strong> y te lo enviará por este medio para que puedas presentarlo. También te daremos más detalles del servicio.</p>\n  <hr style=\"border: 0; border-top: 1px solid #eee; margin: 20px 0;\">\n  <p style=\"font-size: 12px; color: #888;\">ExcelCertify - Microsoft & Google Partner</p>\n</div>","options":{"appendAttribution":false,"replyTo":"info@excelcertify.com"}},"id":"c0b3a4ee-f637-4dde-941e-2c27217c2501","name":"2. Email Confirmación","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[-3072,256],"webhookId":"90d710e3-d1ac-4d08-bfb8-ad3a55bf6987","credentials":{"smtp":{"id":"OiV6sH0CDrHSeXXH","name":"SMTP account 2"}}},{"parameters":{"mode":"runOnceForAllItems","language":"javaScript","jsCode":"// LÓGICA DE PRESUPUESTO INTELIGENTE\nconst body = $('Webhook Formulario').item.json.body;\nconst now = $now;\nconst validityDate = $now.plus({ days: 30 });\nconst presupuestoID = Math.floor(Math.random() * 90000) + 10000;\n\n// 1. Detectar si es Pack o Individual\nlet planNombre = \"Curso Individual\";\nlet planPrecio = \"$980.000\";\nlet cursosArray = body.cursos ? body.cursos.split(', ') : [];\n\n// Si seleccionó \"Pack\" en el dropdown O eligió más de 1 curso\nif ((body.plan_detalle && body.plan_detalle.includes(\"Pack\")) || cursosArray.length > 1) {\n    planNombre = \"Pack Corporativo (Precio Congelado)\";\n    planPrecio = \"$750.000 c/u\";\n} else if (body.plan_detalle && body.plan_detalle.includes(\"Consultoria\")) {\n    planNombre = \"Servicio de Consultoría Anual\";\n    planPrecio = \"A Cotizar\";\n}\n\n// 2. Formatear lista de cursos para HTML\nconst cursosHTML = cursosArray.map(c => `• ${c}`).join('<br>');\n\n// 3. Generar HTML\nconst htmlContent = `\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Presupuesto Formal</title>\n<style>\n@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');\nbody {\n    font-family: 'Inter', Helvetica, Arial, sans-serif;\n    color: #374151;\n    line-height: 1.4;\n    margin: 0;\n    padding: 40px;\n    zoom: 0.8;\n}\n\n/* Header Compacto */\n.legal-top { font-size: 0.7rem; color: #9ca3af; text-transform: uppercase;\nletter-spacing: 0.5px; margin-bottom: 20px; border-bottom: 1px dashed #e5e7eb; padding-bottom: 5px; text-align: center; font-weight: 600; }\n.header { display: flex; justify-content: space-between;\nalign-items: center; border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; }\n\n/* Logos */\n.logos-container { display: flex; flex-direction: column; gap: 10px; }\n.main-logo { height: 55px; object-fit: contain; display: block; }\n.partner-logos { display: flex; gap: 15px; align-items: center; }\n.partner-img { height: 22px; filter: grayscale(100%); opacity: 0.6; }\n\n.meta-info { text-align: right; font-size: 0.85rem; color: #6b7280; }\n.meta-info strong { color: #111827; }\n\nh1 { color: #111827; font-size: 24px; margin: 0 0 5px 0; font-weight: 800; }\nh2 { color: #111827; font-size: 15px;\nfont-weight: 700; border-bottom: 1px solid #e5e7eb; padding-bottom: 5px; margin-top: 25px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }\n\n.client-info { display: flex;\njustify-content: space-between; margin-bottom: 25px; background-color: #f9fafb; padding: 15px; border-radius: 8px; border: 1px solid #f3f4f6; }\n.client-col { width: 48%; }\n.client-col p { margin: 3px 0; font-size: 0.9rem; }\n.label { font-weight: 600; color: #4b5563; display: inline-block; width: 90px; }\n\ntable { width: 100%; border-collapse: collapse; margin-top: 10px; }\nth { background: #111827; color: #ffffff; padding: 8px 15px; text-align: left;\nfont-weight: 600; font-size: 0.8rem; }\ntd { padding: 12px 15px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }\n.plan-desc strong { font-size: 1rem; color: #111827; }\n.plan-desc span { font-size: 0.8rem; color: #6b7280; display: block; }\n.price-col { text-align: right; font-weight: 700; color: #111827;\nfont-size: 1rem; white-space: nowrap; background-color: #f0fdf4; }\n\n.courses-box { background: #fff; padding: 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 0.9rem;\ncolor: #374151; line-height: 1.6; }\n.change-warning { display: inline-block; font-size: 0.85rem; color: #16a34a; font-weight: 600; font-style: italic; margin-left: 5px; }\n\n.terms { margin-top: 25px; font-size: 0.75rem; color: #4b5563; }\n.terms ul { padding-left: 18px; margin-bottom: 0; }\n.terms li { margin-bottom: 4px; }\n\n.footer { margin-top: 40px; text-align: center; font-size: 0.7rem; color: #9ca3af; border-top: 1px solid #f3f4f6; padding-top: 15px; }\n.highlight { color: #10b981; font-weight: 600; }\n</style>\n</head>\n<body>\n\n<div class=\"legal-top\">Presupuesto válido para emitir Orden de Compra a favor de Excel Certify - Integralitas S.A.S según corresponda</div>\n\n<div class=\"header\">\n  <div class=\"logos-container\">\n    \n    <img src=\"data:image/png;base64,[encoded data, 14432 characters]\" alt=\"Excel Certify\" class=\"main-logo\">\n    \n    <div class=\"partner-logos\">\n        <img src=\"data:image/png;base64,[encoded data, 43856 characters]\" alt=\"Microsoft Partner\" class=\"partner-img\">\n        <img src=\"data:image/png;base64,[encoded data, 18680 characters]\" alt=\"Google Partner\" class=\"partner-img\">\n    </div>\n  </div>\n\n  <div class=\"meta-info\">\n    <p><strong>Fecha de Emisión:</strong> ${now.toFormat('dd/MM/yyyy')}</p>\n    <p><strong>Válido hasta:</strong> <span class=\"highlight\">${validityDate.toFormat('dd/MM/yyyy')}</span></p>\n    <p><strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}</p>\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación</h1>\n<p style=\"color: #6b7280; margin-top: 0; font-size: 0.9rem;\">Propuesta profesional con tarifa congelada Enero 2025.</p>\n\n<div class=\"client-info\">\n  <div class=\"client-col\">\n    <p style=\"text-transform: uppercase; font-weight:bold; font-size: 0.75rem; color:#9ca3af; margin-bottom:5px;\">Cliente</p>\n    <p><span class=\"label\">Empresa:</span> <strong>${$('Webhook Formulario').first().json.body.empresa}</strong></p>\n    <p><span class=\"label\">CUIT / ID:</span> ${$('Webhook Formulario').first().json.body.cuit ? $('Webhook Formulario').first().json.body.cuit : 'No informado'}</p>\n  </div>\n  <div class=\"client-col\">\n    <p style=\"text-transform: uppercase; font-weight:bold; font-size: 0.75rem; color:#9ca3af; margin-bottom:5px;\">Contacto</p>\n    <p><span class=\"label\">Atención a:</span> ${$('Webhook Formulario').first().json.body.nombre + $('Webhook Formulario').first().json.body.apellido}</p>\n    <p><span class=\"label\">Email:</span> ${$('Webhook Formulario').first().json.body.email}</p>\n  </div>\n</div>\n\n<h2>Detalle de la Inversión</h2>\n<table>\n  <thead><tr><th width=\"65%\">Descripción del Servicio</th><th width=\"35%\" style=\"text-align: right;\">Inversión Total</th></tr></thead>\n  <tbody>\n    <tr>\n      <td class=\"plan-desc\">\n        <strong>${planNombre}</strong>\n        <span>Modalidad Online en Vivo. Incluye certificación oficial.</span>\n      </td>\n      <td class=\"price-col\">\n        ${planPrecio} s / IVA\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h2>Tecnologías Incluidas</h2>\n<p style=\"margin-bottom: 8px; font-size: 0.9rem;\">El presente presupuesto contempla la capacitación en las siguientes áreas seleccionadas:</p>\n\n<div class=\"courses-box\">\n  ${cursosHTML}\n  <span class=\"change-warning\">/ Los cursos pueden ser cambiados hasta 30 días antes de la capacitación efectiva.</span>\n</div>\n\n<div class=\"terms\">\n  <h3 style=\"margin-top: 0; font-size: 0.9rem; font-weight: 700; color: #111827; margin-bottom: 8px;\">Términos y Condiciones Comerciales</h3>\n  <ul>\n    <li><strong>Validez de la Oferta:</strong> Precios congelados (tarifa Enero 2025) válidos para ejecución hasta Junio 2026, confirmando reserva en Enero.</li>\n    <li><strong>Forma de Pago:</strong> Transferencia bancaria o eCheq a favor de Integralitas S.A.S.</li>\n    <li><strong>Facturación:</strong> Se emitirá Factura A o C tras la confirmación. Con Factura A, el precio promocional está sujeto a un recargo del 16% + IVA.</li>\n    <li><strong>Confidencialidad:</strong> Documento confidencial para uso exclusivo de la empresa destinataria.</li>\n  </ul>\n</div>\n\n<div class=\"footer\">\n  <p><strong>Excel Certify</strong> - Integralitas S.A.S</p>\n  <p>Microsoft Solutions Partner & Google Partner</p>\n  <p>www.excelcertify.com | info@excelcertify.com</p>\n</div>\n\n</body>\n</html>`;\n\n// Retornar array de objetos con clave json (CORRECCIÓN CRÍTICA)\nreturn [{\n  json: {\n    html_final: htmlContent,\n    filename: `Presupuesto_${(body.empresa || 'Cliente').replace(/[^a-zA-Z0-9]/g, '')}.pdf`\n  }\n}];","notice":""},"id":"f1b4a932-5223-4200-a86e-4fda06ead960","name":"Generar Lógica PDF","type":"n8n-nodes-base.code","typeVersion":2,"position":[-2624,256]},{"parameters":{"preBuiltAgentsCalloutHttpRequest":"","curlImport":"","method":"POST","url":"https://api.pdfshift.io/v3/convert/pdf","authentication":"genericCredentialType","genericAuthType":"httpBasicAuth","provideSslCertificates":false,"sendQuery":false,"sendHeaders":false,"sendBody":true,"contentType":"json","specifyBody":"keypair","bodyParameters":{"parameters":[{"name":"source","value":"={{ $json.html_final }}"},{"name":"landscape","value":"false"},{"name":"use_print","value":"false"}]},"options":{"response":{}},"infoMessage":""},"id":"c74874e0-65f3-4dc2-b9bf-decc6ead712c","name":"Crear PDF (API)","type":"n8n-nodes-base.httpRequest","typeVersion":4.1,"position":[-2416,256],"credentials":{"httpBasicAuth":{"id":"nUGJyhzEG2yOkIO7","name":"Unnamed credential"}}},{"parameters":{"resource":"email","operation":"send","fromEmail":"avisos@info.excelcertify.com","toEmail":"={{ $('Webhook Formulario').item.json.body.email }}","subject":"Tu Presupuesto Formal + Propuesta de Reunión","emailFormat":"html","html":"<p>Hola <strong>{{ $('Webhook Formulario').item.json.body.nombre }}</strong>,</p>\n\n<p>Como prometimos, adjunto encontrarás el presupuesto formal para <strong>{{ $('Webhook Formulario').item.json.body.empresa }}</strong> con la tarifa congelada.</p>\n\n<p>Dado que tienes interés en capacitar a tu equipo en estas tecnologías, me gustaría tener una breve llamada de 15 minutos para conocer mejor el perfil de los alumnos y ajustar el temario.</p>\n\n<p>👉 <strong><a href=\"https://calendly.com/TU-USUARIO/reunion-15-min\">Haz clic aquí para elegir un horario en mi agenda</a></strong></p>\n\n<p>Quedo a la espera de tus comentarios.</p>\n<p>Saludos,<br>El equipo de ExcelCertify.</p>","options":{"appendAttribution":false,"attachments":"data","replyTo":"info@excelcertify.com"}},"id":"be4599f5-d317-4766-af62-765794077002","name":"3. Email con PDF","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[-2128,256],"webhookId":"c8a39101-04ea-4879-97da-c1a2f474707f","credentials":{"smtp":{"id":"OiV6sH0CDrHSeXXH","name":"SMTP account 2"}}},{"parameters":{"mode":"runOnceForAllItems","language":"javaScript","jsCode":"// CALCULAR FECHA DE SEGUIMIENTO (2 días hábiles a las 10 AM)\nconst now = new Date();\nlet target = new Date(now);\n\n// Sumar 2 días\ntarget.setDate(now.getDate() + 2);\n\n// Si cae Sábado (6), sumar 2 días más -> Lunes\n// Si cae Domingo (0), sumar 1 día más -> Lunes\nconst day = target.getDay();\nif (day === 6) {\n    target.setDate(target.getDate() + 2);\n} else if (day === 0) {\n    target.setDate(target.getDate() + 1);\n}\n\n// Fijar a las 10:00 AM\ntarget.setHours(10, 0, 0, 0);\n\n// Retornar array de objetos (CORRECCIÓN CRÍTICA)\nreturn [{\n  json: {\n    targetDate: target.toISOString()\n  }\n}];","notice":""},"id":"d3f055f0-cf22-401e-beef-a810b33b30c5","name":"Calcular Fecha (+2 días hábiles)","type":"n8n-nodes-base.code","typeVersion":2,"position":[-1968,256]},{"parameters":{"resume":"specificTime","dateTime":"={{ $json.targetDate }}"},"id":"7ff9a304-2729-43b2-b779-5a2d7f8d8a20","name":"Esperar 2 Días (10AM)","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-1744,256],"webhookId":"97b372f8-d748-43d9-9523-74e2d4f82877"},{"parameters":{"preBuiltAgentsCalloutGoogleSheets":"","authentication":"oAuth2","resource":"sheet","operation":"read","documentId":{"__rl":true,"value":"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit?gid=0#gid=0","mode":"url"},"sheetName":{"__rl":true,"value":324738822,"mode":"list","cachedResultName":"Hoja 2","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit#gid=324738822"},"filtersUI":{"values":[{"lookupColumn":"Email","lookupValue":"={{ $('Webhook Formulario').item.json.body.email }}"}]},"combineFilters":"AND","options":{}},"id":"9c602fda-c616-4197-8978-af6e7d5adc12","name":"Verificar Estado 1","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[-1536,256],"credentials":{"googleSheetsOAuth2Api":{"id":"5TssK5sjUDI7k2MP","name":"Google Sheets account"}}},{"parameters":{"conditions":{"string":[{"value1":"={{ $json.Respondio }}","operation":"notEqual","value2":"SI"}]},"combineOperation":"all"},"id":"bda4a224-c2ff-4f89-aaa0-58a6eda6c2a3","name":"¿Respondió?","type":"n8n-nodes-base.if","typeVersion":1,"position":[-1312,256]},{"parameters":{"resource":"email","operation":"send","fromEmail":"avisos@info.excelcertify.com","toEmail":"={{ $('Webhook Formulario').item.json.body.email }}","subject":"¿Pudiste ver el presupuesto?","emailFormat":"html","html":"<p>Hola {{ $('Webhook Formulario').item.json.body.nombre }},</p>\n<p>Te escribo para saber si pudiste revisar el presupuesto que te envié hace unos días.</p>\n<p>Recuerda que la tarifa promocional de 2025 solo la podemos mantener para reservas confirmadas en Enero.</p>\n<p>Si tienes alguna duda técnica o administrativa, respóndeme este correo y lo vemos.</p>\n<p>Saludos,</p>","options":{"appendAttribution":false,"replyTo":"info@excelcertify.com"}},"id":"853798fb-0294-4988-ba99-7927d43c3b5c","name":"4. Seguimiento (2 días)","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[-1088,240],"webhookId":"1dae335e-fdb5-43fc-b088-9aeab06ed1e2","credentials":{"smtp":{"id":"OiV6sH0CDrHSeXXH","name":"SMTP account 2"}}},{"parameters":{"resume":"timeInterval","amount":7,"unit":"days"},"id":"aec4c35f-e499-4246-84cc-2d1325e28281","name":"Esperar 7 Días","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-864,240],"webhookId":"f7847b31-3312-4c28-9844-3c8745582c56"},{"parameters":{"preBuiltAgentsCalloutGoogleSheets":"","authentication":"oAuth2","resource":"sheet","operation":"read","documentId":{"__rl":true,"value":"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit?gid=0#gid=0","mode":"url"},"sheetName":{"__rl":true,"value":324738822,"mode":"list","cachedResultName":"Hoja 2","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit#gid=324738822"},"filtersUI":{"values":[{"lookupColumn":"Email","lookupValue":"={{ $('Webhook Formulario').item.json.body.email }}"}]},"combineFilters":"AND","options":{}},"id":"0f9fd7e4-9807-4c78-8d16-55fd13a13922","name":"Verificar Estado 2","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[-656,240],"credentials":{"googleSheetsOAuth2Api":{"id":"5TssK5sjUDI7k2MP","name":"Google Sheets account"}}},{"parameters":{"conditions":{"string":[{"value1":"={{ $json.Respondio }}","operation":"notEqual","value2":"SI"}]},"combineOperation":"all"},"id":"6c348413-5622-4c78-a1a5-c3017865ae68","name":"¿Respondió? (2)","type":"n8n-nodes-base.if","typeVersion":1,"position":[-432,240]},{"parameters":{"resource":"email","operation":"send","fromEmail":"avisos@info.excelcertify.com","toEmail":"={{ $('Webhook Formulario').item.json.body.email }}","subject":"Último aviso: Cupos 2026","emailFormat":"html","html":"<p>Hola {{ $('Webhook Formulario').item.json.body.nombre }},</p>\n<p>No quisiera ser insistente, pero estamos cerrando los cupos con tarifa congelada esta semana y no recibimos tu confirmación.</p>\n<p>Si ya no estás interesado, por favor desestima este correo. Si aún te interesa, avísame hoy para guardarte el lugar.</p>\n<p>Saludos.</p>","options":{"appendAttribution":false,"replyTo":"info@excelcertify.com"}},"id":"1c2f1210-4e92-4e2b-a111-98d1c073194a","name":"5. Seguimiento (7 días)","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[-208,208],"webhookId":"f3f25634-1588-4b14-ae2c-d320a8a679cd","credentials":{"smtp":{"id":"OiV6sH0CDrHSeXXH","name":"SMTP account 2"}}},{"parameters":{"preBuiltAgentsCalloutHttpRequest":"","curlImport":"","method":"POST","url":"https://api.whatsapp.com/send","authentication":"none","provideSslCertificates":false,"sendQuery":false,"sendHeaders":false,"sendBody":false,"options":{},"infoMessage":""},"id":"700d090d-ecf3-4fe2-ab1d-05e3fd89ea50","name":"WhatsApp (Desconectado)","type":"n8n-nodes-base.httpRequest","typeVersion":4.1,"position":[-1968,496],"notes":"Conectar aquí cuando tengas credenciales API"},{"parameters":{"resume":"timeInterval","amount":15,"unit":"seconds"},"id":"d08ab392-436d-4dab-b49e-20930a0ede8d","name":"Esperar 15 Min1","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-2848,384],"webhookId":"cb315e96-6e27-463d-883a-48d56a29774e"},{"parameters":{"mode":"runOnceForAllItems","language":"javaScript","jsCode":"// 1. Obtener el nombre de la empresa y el ID desde el nodo anterior (o variables globales)\n// Asegúrate de que 'nombre_empresa' venga en tu JSON. Si no, cámbialo por la variable correcta.\n\n\n// 2. Definir el nuevo nombre\nconst nuevoNombre = $input.first().json.filename;\n\n// 3. Modificar el nombre del archivo en los datos binarios\n// Nota: 'data' es la clave que se ve en tu captura de pantalla bajo OUTPUT\nif (items[0].binary && items[0].binary.data) {\n  items[0].binary.data.fileName = nuevoNombre;\n}\n\nreturn items;","notice":""},"type":"n8n-nodes-base.code","typeVersion":2,"position":[-2272,256],"id":"cd529811-6b52-4778-9eb9-aba55ca538e9","name":"conviertenombre"}],"connections":{"Webhook Formulario":{"main":[[{"node":"1. Guardar Lead","type":"main","index":0}]]},"1. Guardar Lead":{"main":[[{"node":"2. Email Confirmación","type":"main","index":0}]]},"2. Email Confirmación":{"main":[[{"node":"Esperar 15 Min1","type":"main","index":0}]]},"Generar Lógica PDF":{"main":[[{"node":"Crear PDF (API)","type":"main","index":0}]]},"Crear PDF (API)":{"main":[[{"node":"conviertenombre","type":"main","index":0}]]},"3. Email con PDF":{"main":[[{"node":"Calcular Fecha (+2 días hábiles)","type":"main","index":0}]]},"Calcular Fecha (+2 días hábiles)":{"main":[[{"node":"Esperar 2 Días (10AM)","type":"main","index":0}]]},"Esperar 2 Días (10AM)":{"main":[[{"node":"Verificar Estado 1","type":"main","index":0}]]},"Verificar Estado 1":{"main":[[{"node":"¿Respondió?","type":"main","index":0}]]},"¿Respondió?":{"main":[[{"node":"4. Seguimiento (2 días)","type":"main","index":0}]]},"4. Seguimiento (2 días)":{"main":[[{"node":"Esperar 7 Días","type":"main","index":0}]]},"Esperar 7 Días":{"main":[[{"node":"Verificar Estado 2","type":"main","index":0}]]},"Verificar Estado 2":{"main":[[{"node":"¿Respondió? (2)","type":"main","index":0}]]},"¿Respondió? (2)":{"main":[[{"node":"5. Seguimiento (7 días)","type":"main","index":0}]]},"Esperar 15 Min1":{"main":[[{"node":"Generar Lógica PDF","type":"main","index":0}]]},"conviertenombre":{"main":[[{"node":"3. Email con PDF","type":"main","index":0}]]}},"settings":{"executionOrder":"v1"},"pinData":{}}

data:
  [{"startData":"1","resultData":"2","executionData":"3"},{"destinationNode":"4","runNodeFilter":"5"},{"runData":"6","pinData":"7","lastNodeExecuted":"4"},{"contextData":"8","nodeExecutionStack":"9","metadata":"10","waitingExecution":"11","waitingExecutionSource":"12"},"conviertenombre",["13","14","4","15","16","17","18"],{"Webhook Formulario":"19","1. Guardar Lead":"20","2. Email Confirmación":"21","Esperar 15 Min1":"22","Generar Lógica PDF":"23","Crear PDF (API)":"24","conviertenombre":"25"},{},{},[],{},{},{},"Webhook Formulario","Crear PDF (API)","Generar Lógica PDF","Esperar 15 Min1","2. Email Confirmación","1. Guardar Lead",["26"],["27"],["28"],["29"],["30"],["31"],["32"],{"startTime":1767656689593,"executionIndex":0,"source":"33","hints":"34","executionTime":1,"executionStatus":"35","data":"36"},{"startTime":1767656811524,"executionIndex":1,"source":"37","hints":"38","executionTime":2533,"executionStatus":"35","data":"39"},{"startTime":1767656845503,"executionIndex":2,"source":"40","hints":"41","executionTime":1604,"executionStatus":"35","data":"42"},{"startTime":1767657537533,"executionIndex":3,"source":"43","hints":"44","executionTime":15002,"executionStatus":"35","data":"45"},{"startTime":1767658122561,"executionIndex":4,"source":"46","hints":"47","executionTime":34,"executionStatus":"35","data":"48"},{"startTime":1767658130063,"executionIndex":5,"source":"49","hints":"50","executionTime":3139,"executionStatus":"35","data":"51"},{"startTime":1767658626132,"executionIndex":6,"source":"52","hints":"53","executionTime":62,"executionStatus":"35","data":"54"},[],[],"success",{"main":"55"},["56"],[],{"main":"57"},["58"],[],{"main":"59"},["60"],[],{"main":"61"},["62"],[],{"main":"63"},["64"],[],{"main":"65"},["66"],[],{"main":"67"},["68"],{"previousNode":"13","previousNodeOutput":0,"previousNodeRun":0},["69"],{"previousNode":"18","previousNodeOutput":0,"previousNodeRun":0},["70"],{"previousNode":"17","previousNodeOutput":0,"previousNodeRun":0},["71"],{"previousNode":"16","previousNodeOutput":0,"previousNodeRun":0},["72"],{"previousNode":"15","previousNodeOutput":0,"previousNodeRun":0},["73"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},["74"],["75"],["76"],["77"],["78"],["79"],["80"],["81"],{"json":"82","pairedItem":"83"},{"json":"84","pairedItem":"85"},{"json":"86","pairedItem":"87"},{"json":"88","pairedItem":"89"},{"json":"90","pairedItem":"91"},{"json":"92","binary":"93","pairedItem":"94"},{"json":"95","binary":"96","pairedItem":"97"},{"headers":"98","params":"99","query":"100","body":"101","webhookUrl":"102","executionMode":"103"},{"item":0},{"Fecha":"104","Nombre":"105","Apellido":"106","Empresa":"107","CUIT":"108","Email":"109","Teléfono":"110","Plan":"111","Cursos":"112"},{"item":0},{"accepted":"113","rejected":"114","ehlo":"115","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"116","envelope":"117","messageId":"118"},{"item":0},{"accepted":"119","rejected":"120","ehlo":"121","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"116","envelope":"122","messageId":"118"},{"item":0},{"html_final":"123","filename":"124"},{"item":0},{"html_final":"123","filename":"124"},{"data":"125"},{"item":0},{"html_final":"123","filename":"124"},{"data":"126"},{"item":0},{"host":"127","user-agent":"128","content-length":"129","accept":"130","accept-encoding":"131","accept-language":"132","content-type":"133","origin":"134","priority":"135","referer":"136","sec-ch-ua":"137","sec-ch-ua-mobile":"138","sec-ch-ua-platform":"139","sec-fetch-dest":"140","sec-fetch-mode":"141","sec-fetch-site":"142","x-forwarded-for":"143","x-forwarded-host":"127","x-forwarded-port":"144","x-forwarded-proto":"145","x-forwarded-server":"146","x-real-ip":"143"},{},{},{"nombre":"105","apellido":"106","empresa":"107","cuit":"108","email":"109","telefono":"110","plan_detalle":"111","cursos[]":"147","cursos":"112"},"https://n8n.apptlas.cloud/webhook-test/reserva-unificada-2026","test","2026-01-06T00:46:52.982+01:00","Victor","Colussi","Petrogas","","info@excelcertify.com","+543624810831","Pack Corporativo (2+ cursos) - $750.000 c/u - Hasta 20 Personas","Excel | Google Sheets Empresarial, Microsoft 365, Power BI & Data Analytics",["109"],[],["148","149","150","151","152","153","154","155"],"250 2.0.0 Ok: queued as 4dlWDt4cDXz1xnX",{"from":"156","to":"157"},"<fd2e0a66-ca68-ae80-e3d2-26411b98c8bf@info.excelcertify.com>",["109"],[],["148","149","150","151","152","153","154","155"],{"from":"156","to":"158"},"\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Presupuesto Formal</title>\n<style>\n@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');\nbody {\n    font-family: 'Inter', Helvetica, Arial, sans-serif;\n    color: #374151;\n    line-height: 1.4;\n    margin: 0;\n    padding: 40px;\n    zoom: 0.8;\n}\n\n/* Header Compacto */\n.legal-top { font-size: 0.7rem; color: #9ca3af; text-transform: uppercase;\nletter-spacing: 0.5px; margin-bottom: 20px; border-bottom: 1px dashed #e5e7eb; padding-bottom: 5px; text-align: center; font-weight: 600; }\n.header { display: flex; justify-content: space-between;\nalign-items: center; border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; }\n\n/* Logos */\n.logos-container { display: flex; flex-direction: column; gap: 10px; }\n.main-logo { height: 55px; object-fit: contain; display: block; }\n.partner-logos { display: flex; gap: 15px; align-items: center; }\n.partner-img { height: 22px; filter: grayscale(100%); opacity: 0.6; }\n\n.meta-info { text-align: right; font-size: 0.85rem; color: #6b7280; }\n.meta-info strong { color: #111827; }\n\nh1 { color: #111827; font-size: 24px; margin: 0 0 5px 0; font-weight: 800; }\nh2 { color: #111827; font-size: 15px;\nfont-weight: 700; border-bottom: 1px solid #e5e7eb; padding-bottom: 5px; margin-top: 25px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }\n\n.client-info { display: flex;\njustify-content: space-between; margin-bottom: 25px; background-color: #f9fafb; padding: 15px; border-radius: 8px; border: 1px solid #f3f4f6; }\n.client-col { width: 48%; }\n.client-col p { margin: 3px 0; font-size: 0.9rem; }\n.label { font-weight: 600; color: #4b5563; display: inline-block; width: 90px; }\n\ntable { width: 100%; border-collapse: collapse; margin-top: 10px; }\nth { background: #111827; color: #ffffff; padding: 8px 15px; text-align: left;\nfont-weight: 600; font-size: 0.8rem; }\ntd { padding: 12px 15px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }\n.plan-desc strong { font-size: 1rem; color: #111827; }\n.plan-desc span { font-size: 0.8rem; color: #6b7280; display: block; }\n.price-col { text-align: right; font-weight: 700; color: #111827;\nfont-size: 1rem; white-space: nowrap; background-color: #f0fdf4; }\n\n.courses-box { background: #fff; padding: 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 0.9rem;\ncolor: #374151; line-height: 1.6; }\n.change-warning { display: inline-block; font-size: 0.85rem; color: #16a34a; font-weight: 600; font-style: italic; margin-left: 5px; }\n\n.terms { margin-top: 25px; font-size: 0.75rem; color: #4b5563; }\n.terms ul { padding-left: 18px; margin-bottom: 0; }\n.terms li { margin-bottom: 4px; }\n\n.footer { margin-top: 40px; text-align: center; font-size: 0.7rem; color: #9ca3af; border-top: 1px solid #f3f4f6; padding-top: 15px; }\n.highlight { color: #10b981; font-weight: 600; }\n</style>\n</head>\n<body>\n\n<div class=\"legal-top\">Presupuesto válido para emitir Orden de Compra a favor de Excel Certify - Integralitas S.A.S según corresponda</div>\n\n<div class=\"header\">\n  <div class=\"logos-container\">\n    \n    <img src=\"data:image/png;base64,[encoded data, 14432 characters]\" alt=\"Excel Certify\" class=\"main-logo\">\n    \n    <div class=\"partner-logos\">\n        <img src=\"data:image/png;base64,[encoded data, 43856 characters]\" alt=\"Microsoft Partner\" class=\"partner-img\">\n        <img src=\"data:image/png;base64,[encoded data, 18680 characters]\" alt=\"Google Partner\" class=\"partner-img\">\n    </div>\n  </div>\n\n  <div class=\"meta-info\">\n    <p><strong>Fecha de Emisión:</strong> 06/01/2026</p>\n    <p><strong>Válido hasta:</strong> <span class=\"highlight\">05/02/2026</span></p>\n    <p><strong>Presupuesto N°:</strong> PRE-26-41668</p>\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación</h1>\n<p style=\"color: #6b7280; margin-top: 0; font-size: 0.9rem;\">Propuesta profesional con tarifa congelada Enero 2025.</p>\n\n<div class=\"client-info\">\n  <div class=\"client-col\">\n    <p style=\"text-transform: uppercase; font-weight:bold; font-size: 0.75rem; color:#9ca3af; margin-bottom:5px;\">Cliente</p>\n    <p><span class=\"label\">Empresa:</span> <strong>Petrogas</strong></p>\n    <p><span class=\"label\">CUIT / ID:</span> No informado</p>\n  </div>\n  <div class=\"client-col\">\n    <p style=\"text-transform: uppercase; font-weight:bold; font-size: 0.75rem; color:#9ca3af; margin-bottom:5px;\">Contacto</p>\n    <p><span class=\"label\">Atención a:</span> VictorColussi</p>\n    <p><span class=\"label\">Email:</span> info@excelcertify.com</p>\n  </div>\n</div>\n\n<h2>Detalle de la Inversión</h2>\n<table>\n  <thead><tr><th width=\"65%\">Descripción del Servicio</th><th width=\"35%\" style=\"text-align: right;\">Inversión Total</th></tr></thead>\n  <tbody>\n    <tr>\n      <td class=\"plan-desc\">\n        <strong>Pack Corporativo (Precio Congelado)</strong>\n        <span>Modalidad Online en Vivo. Incluye certificación oficial.</span>\n      </td>\n      <td class=\"price-col\">\n        $750.000 c/u s / IVA\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h2>Tecnologías Incluidas</h2>\n<p style=\"margin-bottom: 8px; font-size: 0.9rem;\">El presente presupuesto contempla la capacitación en las siguientes áreas seleccionadas:</p>\n\n<div class=\"courses-box\">\n  • Excel | Google Sheets Empresarial<br>• Microsoft 365<br>• Power BI & Data Analytics\n  <span class=\"change-warning\">/ Los cursos pueden ser cambiados hasta 30 días antes de la capacitación efectiva.</span>\n</div>\n\n<div class=\"terms\">\n  <h3 style=\"margin-top: 0; font-size: 0.9rem; font-weight: 700; color: #111827; margin-bottom: 8px;\">Términos y Condiciones Comerciales</h3>\n  <ul>\n    <li><strong>Validez de la Oferta:</strong> Precios congelados (tarifa Enero 2025) válidos para ejecución hasta Junio 2026, confirmando reserva en Enero.</li>\n    <li><strong>Forma de Pago:</strong> Transferencia bancaria o eCheq a favor de Integralitas S.A.S.</li>\n    <li><strong>Facturación:</strong> Se emitirá Factura A o C tras la confirmación. Con Factura A, el precio promocional está sujeto a un recargo del 16% + IVA.</li>\n    <li><strong>Confidencialidad:</strong> Documento confidencial para uso exclusivo de la empresa destinataria.</li>\n  </ul>\n</div>\n\n<div class=\"footer\">\n  <p><strong>Excel Certify</strong> - Integralitas S.A.S</p>\n  <p>Microsoft Solutions Partner & Google Partner</p>\n  <p>www.excelcertify.com | info@excelcertify.com</p>\n</div>\n\n</body>\n</html>","Presupuesto_Petrogas.pdf",{"mimeType":"159","fileType":"160","fileExtension":"160","data":"161","fileName":"162","fileSize":"163"},{"mimeType":"159","fileType":"160","fileExtension":"160","data":"161","fileName":"124","fileSize":"163"},"n8n.apptlas.cloud","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36","337","*/*","gzip, deflate, br, zstd","es-ES,es;q=0.9,en;q=0.8,la;q=0.7","application/json","https://excelcertify.com","u=1, i","https://excelcertify.com/","\"Google Chrome\";v=\"143\", \"Chromium\";v=\"143\", \"Not A(Brand\";v=\"24\"","?0","\"Windows\"","empty","cors","cross-site","186.122.104.167","443","https","6a03186a9812","Power BI & Data Analytics","PIPELINING","SIZE 48811212","ETRN","AUTH PLAIN LOGIN","ENHANCEDSTATUSCODES","8BITMIME","DSN","CHUNKING","avisos@info.excelcertify.com",["109"],["109"],"application/pdf","pdf","[encoded data, 457444 characters]","result.pdf","343 kB"]


