# execution_data

workflowData:
[cell repeats an earlier one in this file: 11854 characters]

data:
  [{"startData":"1","resultData":"2","executionData":"3"},{},{"runData":"4","lastNodeExecuted":"5"},{"contextData":"6","metadata":"7","nodeExecutionStack":"8","waitingExecution":"9","waitingExecutionSource":"10"},{"Cron":"11","Fecha mañana":"12","HTTP Request":"13","Parse Groq JSON":"14","Code in JavaScript":"15","Convert to File":"16","Read/Write Files from Disk":"17"},"Read/Write Files from Disk",{},{},[],{},{},["18"],["19"],["20"],["21"],["22"],["23"],["24"],{"startTime":1767650414246,"executionIndex":0,"source":"25","hints":"26","executionTime":0,"executionStatus":"27","data":"28"},{"startTime":1767650414247,"executionIndex":1,"source":"29","hints":"30","executionTime":113,"executionStatus":"27","data":"31"},{"startTime":1767650414360,"executionIndex":2,"source":"32","hints":"33","executionTime":3097,"executionStatus":"27","data":"34"},{"startTime":1767650417457,"executionIndex":3,"source":"35","hints":"36","executionTime":12,"executionStatus":"27","data":"37"},{"startTime":1767650417469,"executionIndex":4,"source":"38","hints":"39","executionTime":341,"executionStatus":"27","data":"40"},{"startTime":1767650417810,"executionIndex":5,"source":"41","hints":"42","executionTime":3,"executionStatus":"27","data":"43"},{"startTime":1767650417813,"executionIndex":6,"source":"44","hints":"45","executionTime":6,"executionStatus":"27","data":"46"},[],[],"success",{"main":"47"},["48"],[],{"main":"49"},["50"],[],{"main":"51"},["52"],[],{"main":"53"},["54"],[],{"main":"55"},["56"],[],{"main":"57"},["58"],[],{"main":"59"},["60"],{"previousNode":"61"},["62"],{"previousNode":"63"},["64"],{"previousNode":"65"},["66"],{"previousNode":"67"},["68"],{"previousNode":"69"},["70"],{"previousNode":"71"},["72"],["73"],"Cron",["74"],"Fecha mañana",["75"],"HTTP Request",["76"],"Parse Groq JSON",["77"],"Code in JavaScript",["78"],"Convert to File",["79"],{"json":"80","pairedItem":"81"},{"json":"82","pairedItem":"83"},{"json":"84","pairedItem":"85"},{"json":"86","pairedItem":"87"},{"json":"88","pairedItem":"89"},{"json":"90","binary":"91","pairedItem":"92"},{"json":"93","pairedItem":"94","binary":"95"},{},{"item":0},{"dateFor":"96"},{"item":0},{"id":"97","object":"98","created":1767650417,"model":"99","choices":"100","usage":"101","usage_breakdown":null,"system_fingerprint":"102","x_groq":"103","service_tier":"104"},{"item":0},{"date_for":"96","generated_at":"105","signs":"106"},{"item":0},{"date_for":"96","generated_at":"105","signs":"107"},{"item":0},{},{"data":"108"},["109"],{"fileName":"110"},{"item":0},{"data":"108"},"2026-01-06","chatcmpl-408e2366-66d4-4a40-a5e2-810ee97ead35","chat.completion","llama-3.1-8b-instant",["111"],{"queue_time":0.155398904,"prompt_tokens":1198,"prompt_time":0.133161385,"completion_tokens":1979,"completion_time":2.617276617,"total_tokens":3177,"total_time":2.750438002},"fp_6c980774ec",{"id":"112","seed":1677682466},"on_demand","2026-01-05T22:00:14.364Z",["113","114","115","116","117","118","119","120","121","122","123","124"],["125","126","127","128","129","130","131","132","133","134","135","136"],{"mimeType":"137","fileType":"138","fileExtension":"138","data":"139","fileName":"140","fileSize":"141"},{"item":0},"/data/api-shared/horoscopo89.json",{"index":0,"message":"142","logprobs":null,"finish_reason":"143"},"req_01ke82sky4e1nsj9aa7fyn5whs",{"sign":"144","sign_es":"144","sign_en":"144","lucky_number":47,"predictions":"145","es":"146","en":"147"},{"sign":"148","sign_es":"148","sign_en":"149","lucky_number":61,"predictions":"150","es":"151","en":"152"},{"sign":"153","sign_es":"153","sign_en":"154","lucky_number":13,"predictions":"155","es":"156","en":"157"},{"sign":"158","sign_es":"158","sign_en":"159","lucky_number":92,"predictions":"160","es":"161","en":"162"},{"sign":"163","sign_es":"163","sign_en":"164","lucky_number":85,"predictions":"165","es":"166","en":"167"},{"sign":"168","sign_es":"168","sign_en":"168","lucky_number":29,"predictions":"169","es":"170","en":"171"},{"sign":"172","sign_es":"172","sign_en":"172","lucky_number":41,"predictions":"173","es":"174","en":"175"},{"sign":"176","sign_es":"176","sign_en":"177","lucky_number":23,"predictions":"178","es":"179","en":"180"},{"sign":"181","sign_es":"181","sign_en":"182","lucky_number":53,"predictions":"183","es":"184","en":"185"},{"sign":"186","sign_es":"186","sign_en":"187","lucky_number":67,"predictions":"188","es":"189","en":"190"},{"sign":"191","sign_es":"191","sign_en":"192","lucky_number":95,"predictions":"193","es":"194","en":"195"},{"sign":"196","sign_es":"196","sign_en":"197","lucky_number":19,"predictions":"198","es":"199","en":"200"},{"sign":"144","sign_es":"144","sign_en":"144","lucky_number":47,"predictions":"201","es":"146","en":"147"},{"sign":"148","sign_es":"148","sign_en":"149","lucky_number":61,"predictions":"202","es":"151","en":"152"},{"sign":"153","sign_es":"153","sign_en":"154","lucky_number":13,"predictions":"203","es":"156","en":"157"},{"sign":"158","sign_es":"158","sign_en":"159","lucky_number":92,"predictions":"204","es":"161","en":"162"},{"sign":"163","sign_es":"163","sign_en":"164","lucky_number":85,"predictions":"205","es":"166","en":"167"},{"sign":"168","sign_es":"168","sign_en":"168","lucky_number":29,"predictions":"206","es":"170","en":"171"},{"sign":"172","sign_es":"172","sign_en":"172","lucky_number":41,"predictions":"207","es":"174","en":"175"},{"sign":"176","sign_es":"176","sign_en":"177","lucky_number":23,"predictions":"208","es":"179","en":"180"},{"sign":"181","sign_es":"181","sign_en":"182","lucky_number":53,"predictions":"209","es":"184","en":"185"},{"sign":"186","sign_es":"186","sign_en":"187","lucky_number":67,"predictions":"210","es":"189","en":"190"},{"sign":"191","sign_es":"191","sign_en":"192","lucky_number":95,"predictions":"211","es":"194","en":"195"},{"sign":"196","sign_es":"196","sign_en":"197","lucky_number":19,"predictions":"212","es":"199","en":"200"},"application/json","json","[encoded data, 7700 characters]","horoscopo89.json","5.77 kB",{"role":"213","content":"214"},"stop","Aries",{"love":"215","health":"216","money":"217"},"Esta mañana, ¡desbloquea tu energía creativa! Amanece con una ilusión clara y sigue adelante con audacia. Recuerda que cada obstáculo es una oportunidad para crecer y aprender.","This morning, unlock your creative energy! Rise with a clear vision and go forth with boldness. Remember that every obstacle is a chance to grow and learn.","Tauro","Taurus",{"love":"218","health":"219","money":"220"},"Durante el mediodía, siente la tierra firme bajo tus pies. Aléjate de las distracciones y conecta con la naturaleza. ¡Recuerda que la sabiduría se encuentra en la quietud!","At noon, feel the earth solid beneath your feet. Distract yourself from the noise and connect with nature. Remember that wisdom is found in quietude!","Géminis","Gemini",{"love":"221","health":"222","money":"223"},"Este atardecer, ¡sal a explorar! Mira alrededor y pregunta a los demás. La curiosidad es la clave para encontrar la inspiración.","This evening, get out and explore! Look around and ask others. Curiosity is the key to finding inspiration.","Cáncer","Cancer",{"love":"224","health":"225","money":"226"},"En la noche, siente la luna resplandeciente en tu corazón. Conecta con tus emociones y permite que tus sentimientos fluyan. ¡Es hora de sanar y encontrar la paz!","Tonight, feel the radiant moon in your heart. Connect with your emotions and let your feelings flow. It's time to heal and find peace!","León","Leo",{"love":"215","health":"227","money":"228"},"Esta mañana, ¡sé un león! Despliega tu confianza y seguridad. ¡Recuerda que eres un ser magnético y atraes lo que deseas!","This morning, be a lion! Spread your confidence and security. Remember that you're a magnetic being and attract what you want!","Virgo",{"love":"229","health":"230","money":"231"},"Durante el mediodía, analiza tus acciones y hábitos. Asegúrate de que estás equilibrando tus energías y no estás sobrecargándote. ¡Recuerda que la precisión es clave!","At noon, analyze your actions and habits. Make sure you're balancing your energies and not overloading yourself. Remember that precision is key!","Libra",{"love":"218","health":"232","money":"233"},"Este atardecer, sé un árbitro de la justicia. Busca la armonía y la equidad en todas las relaciones. ¡Recuerda que la paz es la clave para el crecimiento!","This evening, be a judge of justice. Seek harmony and fairness in all relationships. Remember that peace is the key to growth!","Escorpio","Scorpio",{"love":"234","health":"235","money":"236"},"En la noche, siente la oscuridad como un espacio para el crecimiento. Busca lo que se esconde en la sombra y únete a las fuerzas que te impulsan hacia adelante. ¡Recuerda que la transformación es la clave!","Tonight, feel the darkness as a space for growth. Seek what's hidden in the shadows and join the forces that propel you forward. Remember that transformation is the key!","Sagitario","Sagittarius",{"love":"237","health":"222","money":"217"},"Esta mañana, ¡despliega tus alas y vuela hacia el horizonte! Busca lo que siempre has soñado y prepárate para la aventura de tu vida. ¡Recuerda que la libertad es la clave!","This morning, spread your wings and fly towards the horizon! Seek what you've always dreamed of and prepare for the adventure of your life. Remember that freedom is the key!","Capricornio","Capricorn",{"love":"229","health":"227","money":"226"},"Durante el mediodía, trabaja en tus objetivos y no te rindas. Recuerda que cada paso adelante lleva a un paso hacia arriba. ¡La persistencia es la clave para el éxito!","At noon, work towards your goals and don't give up. Remember that every step forward leads to a step up. Persistence is the key to success!","Acuario","Aquarius",{"love":"238","health":"239","money":"240"},"Este atardecer, ¡desafía lo convencional y sigue adelante! Busca la innovación y la creatividad en todas las cosas. ¡Recuerda que el cambio es la clave para el progreso!","This evening, challenge the conventional and go forward! Seek innovation and creativity in all things. Remember that change is the key to progress!","Piscis","Pisces",{"love":"224","health":"241","money":"226"},"En la noche, siente el alma de la tierra y conecta con tu corazón. ¡Recuerda que la ternura es la clave para encontrar la paz y la abundancia!","Tonight, feel the soul of the earth and connect with your heart. Remember that tenderness is the key to finding peace and abundance!",{"love":"215","health":"216","money":"217"},{"love":"218","health":"219","money":"220"},{"love":"221","health":"222","money":"223"},{"love":"224","health":"225","money":"226"},{"love":"215","health":"227","money":"228"},{"love":"229","health":"230","money":"231"},{"love":"218","health":"232","money":"233"},{"love":"234","health":"235","money":"236"},{"love":"237","health":"222","money":"217"},{"love":"229","health":"227","money":"226"},{"love":"238","health":"239","money":"240"},{"love":"224","health":"241","money":"226"},"assistant","```json\n{\n  \"date_for\": \"2026-01-06\",\n  \"generated_at\": \"2026-01-05T22:00:14.364Z\",\n  \"signs\": [\n    {\n      \"sign\": \"Aries\",\n      \"sign_es\": \"Aries\",\n      \"sign_en\": \"Aries\",\n      \"lucky_number\": 47,\n      \"predictions\": {\n        \"love\": \"Magnetismo\",\n        \"health\": \"Vitalidad\",\n        \"money\": \"Oportunidad\"\n      },\n      \"es\": \"Esta mañana, ¡desbloquea tu energía creativa! Amanece con una ilusión clara y sigue adelante con audacia. Recuerda que cada obstáculo es una oportunidad para crecer y aprender.\",\n      \"en\": \"This morning, unlock your creative energy! Rise with a clear vision and go forth with boldness. Remember that every obstacle is a chance to grow and learn.\"\n    },\n    {\n      \"sign\": \"Tauro\",\n      \"sign_es\": \"Tauro\",\n      \"sign_en\": \"Taurus\",\n      \"lucky_number\": 61,\n      \"predictions\": {\n        \"love\": \"Paciencia\",\n        \"health\": \"Descanso\",\n        \"money\": \"Ahorro\"\n      },\n      \"es\": \"Durante el mediodía, siente la tierra firme bajo tus pies. Aléjate de las distracciones y conecta con la naturaleza. ¡Recuerda que la sabiduría se encuentra en la quietud!\",\n      \"en\": \"At noon, feel the earth solid beneath your feet. Distract yourself from the noise and connect with nature. Remember that wisdom is found in quietude!\"\n    },\n    {\n      \"sign\": \"Géminis\",\n      \"sign_es\": \"Géminis\",\n      \"sign_en\": \"Gemini\",\n      \"lucky_number\": 13,\n      \"predictions\": {\n        \"love\": \"Diálogo\",\n        \"health\": \"Energía\",\n        \"money\": \"Inversión\"\n      },\n      \"es\": \"Este atardecer, ¡sal a explorar! Mira alrededor y pregunta a los demás. La curiosidad es la clave para encontrar la inspiración.\",\n      \"en\": \"This evening, get out and explore! Look around and ask others. Curiosity is the key to finding inspiration.\"\n    },\n    {\n      \"sign\": \"Cáncer\",\n      \"sign_es\": \"Cáncer\",\n      \"sign_en\": \"Cancer\",\n      \"lucky_number\": 92,\n      \"predictions\": {\n        \"love\": \"Ternura\",\n        \"health\": \"Sanación\",\n        \"money\": \"Abundancia\"\n      },\n      \"es\": \"En la noche, siente la luna resplandeciente en tu corazón. Conecta con tus emociones y permite que tus sentimientos fluyan. ¡Es hora de sanar y encontrar la paz!\",\n      \"en\": \"Tonight, feel the radiant moon in your heart. Connect with your emotions and let your feelings flow. It's time to heal and find peace!\"\n    },\n    {\n      \"sign\": \"León\",\n      \"sign_es\": \"León\",\n      \"sign_en\": \"Leo\",\n      \"lucky_number\": 85,\n      \"predictions\": {\n        \"love\": \"Magnetismo\",\n        \"health\": \"Fuerza\",\n        \"money\": \"Ganancia\"\n      },\n      \"es\": \"Esta mañana, ¡sé un león! Despliega tu confianza y seguridad. ¡Recuerda que eres un ser magnético y atraes lo que deseas!\",\n      \"en\": \"This morning, be a lion! Spread your confidence and security. Remember that you're a magnetic being and attract what you want!\"\n    },\n    {\n      \"sign\": \"Virgo\",\n      \"sign_es\": \"Virgo\",\n      \"sign_en\": \"Virgo\",\n      \"lucky_number\": 29,\n      \"predictions\": {\n        \"love\": \"Compromiso\",\n        \"health\": \"Equilibrio\",\n        \"money\": \"Estabilidad\"\n      },\n      \"es\": \"Durante el mediodía, analiza tus acciones y hábitos. Asegúrate de que estás equilibrando tus energías y no estás sobrecargándote. ¡Recuerda que la precisión es clave!\",\n      \"en\": \"At noon, analyze your actions and habits. Make sure you're balancing your energies and not overloading yourself. Remember that precision is key!\"\n    },\n    {\n      \"sign\": \"Libra\",\n      \"sign_es\": \"Libra\",\n      \"sign_en\": \"Libra\",\n      \"lucky_number\": 41,\n      \"predictions\": {\n        \"love\": \"Paciencia\",\n        \"health\": \"Resiliencia\",\n        \"money\": \"Crecimiento\"\n      },\n      \"es\": \"Este atardecer, sé un árbitro de la justicia. Busca la armonía y la equidad en todas las relaciones. ¡Recuerda que la paz es la clave para el crecimiento!\",\n      \"en\": \"This evening, be a judge of justice. Seek harmony and fairness in all relationships. Remember that peace is the key to growth!\"\n    },\n    {\n      \"sign\": \"Escorpio\",\n      \"sign_es\": \"Escorpio\",\n      \"sign_en\": \"Scorpio\",\n      \"lucky_number\": 23,\n      \"predictions\": {\n        \"love\": \"Intensidad\",\n        \"health\": \"Precaución\",\n        \"money\": \"Cautela\"\n      },\n      \"es\": \"En la noche, siente la oscuridad como un espacio para el crecimiento. Busca lo que se esconde en la sombra y únete a las fuerzas que te impulsan hacia adelante. ¡Recuerda que la transformación es la clave!\",\n      \"en\": \"Tonight, feel the darkness as a space for growth. Seek what's hidden in the shadows and join the forces that propel you forward. Remember that transformation is the key!\"\n    },\n    {\n      \"sign\": \"Sagitario\",\n      \"sign_es\": \"Sagitario\",\n      \"sign_en\": \"Sagittarius\",\n      \"lucky_number\": 53,\n      \"predictions\": {\n        \"love\": \"Aventura\",\n        \"health\": \"Energía\",\n        \"money\": \"Oportunidad\"\n      },\n      \"es\": \"Esta mañana, ¡despliega tus alas y vuela hacia el horizonte! Busca lo que siempre has soñado y prepárate para la aventura de tu vida. ¡Recuerda que la libertad es la clave!\",\n      \"en\": \"This morning, spread your wings and fly towards the horizon! Seek what you've always dreamed of and prepare for the adventure of your life. Remember that freedom is the key!\"\n    },\n    {\n      \"sign\": \"Capricornio\",\n      \"sign_es\": \"Capricornio\",\n      \"sign_en\": \"Capricorn\",\n      \"lucky_number\": 67,\n      \"predictions\": {\n        \"love\": \"Compromiso\",\n        \"health\": \"Fuerza\",\n        \"money\": \"Abundancia\"\n      },\n      \"es\": \"Durante el mediodía, trabaja en tus objetivos y no te rindas. Recuerda que cada paso adelante lleva a un paso hacia arriba. ¡La persistencia es la clave para el éxito!\",\n      \"en\": \"At noon, work towards your goals and don't give up. Remember that every step forward leads to a step up. Persistence is the key to success!\"\n    },\n    {\n      \"sign\": \"Acuario\",\n      \"sign_es\": \"Acuario\",\n      \"sign_en\": \"Aquarius\",\n      \"lucky_number\": 95,\n      \"predictions\": {\n        \"love\": \"Libertad\",\n        \"health\": \"Movimiento\",\n        \"money\": \"Cambio\"\n      },\n      \"es\": \"Este atardecer, ¡desafía lo convencional y sigue adelante! Busca la innovación y la creatividad en todas las cosas. ¡Recuerda que el cambio es la clave para el progreso!\",\n      \"en\": \"This evening, challenge the conventional and go forward! Seek innovation and creativity in all things. Remember that change is the key to progress!\"\n    },\n    {\n      \"sign\": \"Piscis\",\n      \"sign_es\": \"Piscis\",\n      \"sign_en\": \"Pisces\",\n      \"lucky_number\": 19,\n      \"predictions\": {\n        \"love\": \"Ternura\",\n        \"health\": \"Quietud\",\n        \"money\": \"Abundancia\"\n      },\n      \"es\": \"En la noche, siente el alma de la tierra y conecta con tu corazón. ¡Recuerda que la ternura es la clave para encontrar la paz y la abundancia!\",\n      \"en\": \"Tonight, feel the soul of the earth and connect with your heart. Remember that tenderness is the key to finding peace and abundance!\"\n    }\n  ]\n}\n```","Magnetismo","Vitalidad","Oportunidad","Paciencia","Descanso","Ahorro","Diálogo","Energía","Inversión","Ternura","Sanación","Abundancia","Fuerza","Ganancia","Compromiso","Equilibrio","Estabilidad","Resiliencia","Crecimiento","Intensidad","Precaución","Cautela","Aventura","Libertad","Movimiento","Cambio","Quietud"]


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 }}","Respondio":""},"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}],"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":{"resume":"timeInterval","amount":15,"unit":"minutes"},"id":"63f14a33-2684-424c-afc2-aa45a1c3a7df","name":"Esperar 15 Min","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-2848,256],"webhookId":"cb315e96-6e27-463d-883a-48d56a29774e"},{"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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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 Min","type":"main","index":0}]]},"Esperar 15 Min":{"main":[[{"node":"Generar Lógica PDF","type":"main","index":0}]]},"Generar Lógica PDF":{"main":[[{"node":"Crear PDF (API)","type":"main","index":0}]]},"Crear PDF (API)":{"main":[[{"node":"3. Email con PDF","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}]]}},"settings":{"executionOrder":"v1"},"staticData":{},"pinData":{}}

data:
  [{"startData":"1","resultData":"2","executionData":"3"},{},{"runData":"4","pinData":"5","lastNodeExecuted":"6","error":"7"},{"contextData":"8","nodeExecutionStack":"9","waitingExecution":"10"},{"Webhook Formulario":"11","1. Guardar Lead":"12"},{},"1. Guardar Lead",{"level":"13","tags":"14","description":"15","timestamp":1767656690482,"context":"16","functionality":"17","name":"18","node":"19","messages":"20","message":"21","stack":"22"},{},["23"],{},["24"],["25"],"warning",{},"Refresh the columns list in the 'Column to Match On' parameter. Updated columns: Cursos -> Respondio",{},"regular","NodeOperationError",{"parameters":"26","id":"27","name":"6","type":"28","typeVersion":4.5,"position":"29","credentials":"30"},[],"Column names were updated after the node's setup","NodeOperationError: Column names were updated after the node's setup\n    at checkForSchemaChanges (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.ts:365:9)\n    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts:246:24)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/actions/router.ts:64:14)\n    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/GoogleSheetsV2.node.ts:30:10)\n    at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1093:8)\n    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1274:11)\n    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1708:27\n    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2324:11",{"node":"31","data":"32","source":"33"},{"startTime":1767656689593,"executionIndex":0,"source":"34","hints":"35","executionTime":1,"executionStatus":"36","data":"37"},{"startTime":1767656689594,"executionIndex":1,"source":"38","hints":"39","executionTime":890,"executionStatus":"40","error":"41"},{"preBuiltAgentsCalloutGoogleSheets":"42","authentication":"43","resource":"44","operation":"45","documentId":"46","sheetName":"47","columns":"48","options":"49"},"035bf449-ff45-44c8-a62a-dc98a45aefbc","n8n-nodes-base.googleSheets",[-3296,256],{"googleSheetsOAuth2Api":"50"},{"parameters":"51","id":"27","name":"6","type":"28","typeVersion":4.5,"position":"52","credentials":"53"},{"main":"54"},{"main":"38"},[],[],"success",{"main":"55"},["56"],[],"error",{"level":"13","tags":"14","description":"15","timestamp":1767656690482,"context":"16","functionality":"17","name":"18","node":"19","messages":"20","message":"21","stack":"22"},"","oAuth2","sheet","append",{"__rl":true,"value":"57","mode":"58"},{"__rl":true,"value":324738822,"mode":"59","cachedResultName":"60","cachedResultUrl":"61"},{"mappingMode":"62","value":"63","matchingColumns":"64","schema":"65","attemptToConvertTypes":false,"convertFieldsToString":false},{},{"id":"66","name":"67"},{"preBuiltAgentsCalloutGoogleSheets":"42","authentication":"43","resource":"44","operation":"45","documentId":"68","sheetName":"69","columns":"70","options":"71"},[-3296,256],{"googleSheetsOAuth2Api":"72"},["73"],["74"],{"previousNode":"75"},"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit?gid=0#gid=0","url","list","Hoja 2","https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit#gid=324738822","defineBelow",{"Fecha":"76","Nombre":"77","Apellido":"78","Empresa":"79","CUIT":"80","Email":"81","Teléfono":"82","Plan":"83","Cursos":"84","Respondio":"42"},[],["85","86","87","88","89","90","91","92","93","94"],"5TssK5sjUDI7k2MP","Google Sheets account",{"__rl":true,"value":"57","mode":"58"},{"__rl":true,"value":324738822,"mode":"59","cachedResultName":"60","cachedResultUrl":"61"},{"mappingMode":"62","value":"95","matchingColumns":"96","schema":"97","attemptToConvertTypes":false,"convertFieldsToString":false},{},{"id":"66","name":"67"},["98"],["99"],"Webhook Formulario","={{ $now }}","={{ $json.body.nombre }}","={{ $json.body.apellido }}","={{ $json.body.empresa }}","={{ $json.body.cuit }}","={{ $json.body.email }}","={{ $json.body.telefono }}","={{ $json.body.plan_detalle }}","={{ $json.body.cursos }}",{"id":"100","displayName":"100","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"102","displayName":"102","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"103","displayName":"103","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"104","displayName":"104","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"105","displayName":"105","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"106","displayName":"106","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"107","displayName":"107","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"108","displayName":"108","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"109","displayName":"109","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"110","displayName":"110","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"Fecha":"76","Nombre":"77","Apellido":"78","Empresa":"79","CUIT":"80","Email":"81","Teléfono":"82","Plan":"83","Cursos":"84","Respondio":"42"},[],["111","112","113","114","115","116","117","118","119","120"],{"json":"121","pairedItem":"122"},{"json":"121","pairedItem":"123"},"Fecha","string","Nombre","Apellido","Empresa","CUIT","Email","Teléfono","Plan","Cursos","Respondio",{"id":"100","displayName":"100","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"102","displayName":"102","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"103","displayName":"103","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"104","displayName":"104","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"105","displayName":"105","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"106","displayName":"106","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"107","displayName":"107","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"108","displayName":"108","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"109","displayName":"109","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"id":"110","displayName":"110","required":false,"defaultMatch":false,"display":true,"type":"101","canBeUsedToMatch":true},{"headers":"124","params":"125","query":"126","body":"127","webhookUrl":"128","executionMode":"129"},{"item":0},{"item":0},{"host":"130","user-agent":"131","content-length":"132","accept":"133","accept-encoding":"134","accept-language":"135","content-type":"136","origin":"137","priority":"138","referer":"139","sec-ch-ua":"140","sec-ch-ua-mobile":"141","sec-ch-ua-platform":"142","sec-fetch-dest":"143","sec-fetch-mode":"144","sec-fetch-site":"145","x-forwarded-for":"146","x-forwarded-host":"130","x-forwarded-port":"147","x-forwarded-proto":"148","x-forwarded-server":"149","x-real-ip":"146"},{},{},{"nombre":"150","apellido":"151","empresa":"152","cuit":"42","email":"153","telefono":"154","plan_detalle":"155","cursos[]":"156","cursos":"157"},"https://n8n.apptlas.cloud/webhook-test/reserva-unificada-2026","test","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","Victor","Colussi","Petrogas","info@excelcertify.com","+543624810831","Pack Corporativo (2+ cursos) - $750.000 c/u - Hasta 20 Personas","Power BI & Data Analytics","Excel | Google Sheets Empresarial, Microsoft 365, Power BI & Data Analytics"]


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 }}","Respondio":""},"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}],"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":{"resume":"timeInterval","amount":15,"unit":"minutes"},"id":"63f14a33-2684-424c-afc2-aa45a1c3a7df","name":"Esperar 15 Min","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-2848,256],"webhookId":"cb315e96-6e27-463d-883a-48d56a29774e"},{"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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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 Min","type":"main","index":0}]]},"Esperar 15 Min":{"main":[[{"node":"Generar Lógica PDF","type":"main","index":0}]]},"Generar Lógica PDF":{"main":[[{"node":"Crear PDF (API)","type":"main","index":0}]]},"Crear PDF (API)":{"main":[[{"node":"3. Email con PDF","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}]]}},"settings":{"executionOrder":"v1"},"pinData":{}}

data:
  [{"startData":"1","resultData":"2","executionData":"3"},{"destinationNode":"4","runNodeFilter":"5"},{"runData":"6","pinData":"7","lastNodeExecuted":"4","error":"8"},{"contextData":"9","nodeExecutionStack":"10","metadata":"11","waitingExecution":"12","waitingExecutionSource":"13"},"1. Guardar Lead",["14","4"],{"Webhook Formulario":"15","1. Guardar Lead":"16"},{},{"level":"17","tags":"18","description":"19","timestamp":1767656747429,"context":"20","functionality":"21","name":"22","node":"23","messages":"24","message":"25","stack":"26"},{},["27"],{},{},{},"Webhook Formulario",["28"],["29"],"warning",{},"Refresh the columns list in the 'Column to Match On' parameter. Updated columns: Cursos -> Respondio",{},"regular","NodeOperationError",{"parameters":"30","id":"31","name":"4","type":"32","typeVersion":4.5,"position":"33","credentials":"34"},[],"Column names were updated after the node's setup","NodeOperationError: Column names were updated after the node's setup\n    at checkForSchemaChanges (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.ts:365:9)\n    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts:246:24)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/actions/router.ts:64:14)\n    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/GoogleSheetsV2.node.ts:30:10)\n    at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1093:8)\n    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1274:11)\n    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1708:27\n    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2324:11",{"node":"35","data":"36","source":"37"},{"startTime":1767656689593,"executionIndex":0,"source":"38","hints":"39","executionTime":1,"executionStatus":"40","data":"41"},{"startTime":1767656746879,"executionIndex":1,"source":"42","hints":"43","executionTime":550,"executionStatus":"44","error":"45"},{"preBuiltAgentsCalloutGoogleSheets":"46","authentication":"47","resource":"48","operation":"49","documentId":"50","sheetName":"51","columns":"52","options":"53"},"035bf449-ff45-44c8-a62a-dc98a45aefbc","n8n-nodes-base.googleSheets",[-3296,256],{"googleSheetsOAuth2Api":"54"},{"parameters":"55","id":"31","name":"4","type":"32","typeVersion":4.5,"position":"56","credentials":"57"},{"main":"58"},{"main":"42"},[],[],"success",{"main":"59"},["60"],[],"error",{"level":"17","tags":"18","description":"19","timestamp":1767656747429,"context":"20","functionality":"21","name":"22","node":"23","messages":"24","message":"25","stack":"26"},"","oAuth2","sheet","append",{"__rl":true,"value":"61","mode":"62"},{"__rl":true,"value":324738822,"mode":"63","cachedResultName":"64","cachedResultUrl":"65"},{"mappingMode":"66","value":"67","matchingColumns":"68","schema":"69","attemptToConvertTypes":false,"convertFieldsToString":false},{},{"id":"70","name":"71"},{"preBuiltAgentsCalloutGoogleSheets":"46","authentication":"47","resource":"48","operation":"49","documentId":"72","sheetName":"73","columns":"74","options":"75"},[-3296,256],{"googleSheetsOAuth2Api":"76"},["77"],["78"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit?gid=0#gid=0","url","list","Hoja 2","https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit#gid=324738822","defineBelow",{"Fecha":"79","Nombre":"80","Apellido":"81","Empresa":"82","CUIT":"83","Email":"84","Teléfono":"85","Plan":"86","Cursos":"87","Respondio":"46"},[],["88","89","90","91","92","93","94","95","96","97"],"5TssK5sjUDI7k2MP","Google Sheets account",{"__rl":true,"value":"61","mode":"62"},{"__rl":true,"value":324738822,"mode":"63","cachedResultName":"64","cachedResultUrl":"65"},{"mappingMode":"66","value":"98","matchingColumns":"99","schema":"100","attemptToConvertTypes":false,"convertFieldsToString":false},{},{"id":"70","name":"71"},["101"],["102"],"={{ $now }}","={{ $json.body.nombre }}","={{ $json.body.apellido }}","={{ $json.body.empresa }}","={{ $json.body.cuit }}","={{ $json.body.email }}","={{ $json.body.telefono }}","={{ $json.body.plan_detalle }}","={{ $json.body.cursos }}",{"id":"103","displayName":"103","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"105","displayName":"105","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"106","displayName":"106","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"107","displayName":"107","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"108","displayName":"108","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"109","displayName":"109","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"110","displayName":"110","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"111","displayName":"111","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"112","displayName":"112","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"113","displayName":"113","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"Fecha":"79","Nombre":"80","Apellido":"81","Empresa":"82","CUIT":"83","Email":"84","Teléfono":"85","Plan":"86","Cursos":"87","Respondio":"46"},[],["114","115","116","117","118","119","120","121","122","123"],{"json":"124","pairedItem":"125"},{"json":"124","pairedItem":"126"},"Fecha","string","Nombre","Apellido","Empresa","CUIT","Email","Teléfono","Plan","Cursos","Respondio",{"id":"103","displayName":"103","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"105","displayName":"105","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"106","displayName":"106","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"107","displayName":"107","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"108","displayName":"108","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"109","displayName":"109","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"110","displayName":"110","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"111","displayName":"111","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"112","displayName":"112","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"113","displayName":"113","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"headers":"127","params":"128","query":"129","body":"130","webhookUrl":"131","executionMode":"132"},{"item":0},{"item":0},{"host":"133","user-agent":"134","content-length":"135","accept":"136","accept-encoding":"137","accept-language":"138","content-type":"139","origin":"140","priority":"141","referer":"142","sec-ch-ua":"143","sec-ch-ua-mobile":"144","sec-ch-ua-platform":"145","sec-fetch-dest":"146","sec-fetch-mode":"147","sec-fetch-site":"148","x-forwarded-for":"149","x-forwarded-host":"133","x-forwarded-port":"150","x-forwarded-proto":"151","x-forwarded-server":"152","x-real-ip":"149"},{},{},{"nombre":"153","apellido":"154","empresa":"155","cuit":"46","email":"156","telefono":"157","plan_detalle":"158","cursos[]":"159","cursos":"160"},"https://n8n.apptlas.cloud/webhook-test/reserva-unificada-2026","test","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","Victor","Colussi","Petrogas","info@excelcertify.com","+543624810831","Pack Corporativo (2+ cursos) - $750.000 c/u - Hasta 20 Personas","Power BI & Data Analytics","Excel | Google Sheets Empresarial, Microsoft 365, Power BI & Data Analytics"]


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":true}],"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":{"resume":"timeInterval","amount":15,"unit":"minutes"},"id":"63f14a33-2684-424c-afc2-aa45a1c3a7df","name":"Esperar 15 Min","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-2848,256],"webhookId":"cb315e96-6e27-463d-883a-48d56a29774e"},{"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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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 Min","type":"main","index":0}]]},"Esperar 15 Min":{"main":[[{"node":"Generar Lógica PDF","type":"main","index":0}]]},"Generar Lógica PDF":{"main":[[{"node":"Crear PDF (API)","type":"main","index":0}]]},"Crear PDF (API)":{"main":[[{"node":"3. Email con PDF","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}]]}},"settings":{"executionOrder":"v1"},"pinData":{}}

data:
  [{"startData":"1","resultData":"2","executionData":"3"},{"destinationNode":"4","runNodeFilter":"5"},{"runData":"6","pinData":"7","lastNodeExecuted":"4","error":"8"},{"contextData":"9","nodeExecutionStack":"10","metadata":"11","waitingExecution":"12","waitingExecutionSource":"13"},"1. Guardar Lead",["14","4"],{"Webhook Formulario":"15","1. Guardar Lead":"16"},{},{"level":"17","tags":"18","description":"19","timestamp":1767656773793,"context":"20","functionality":"21","name":"22","node":"23","messages":"24","message":"25","stack":"26"},{},["27"],{},{},{},"Webhook Formulario",["28"],["29"],"warning",{},"Refresh the columns list in the 'Column to Match On' parameter. Updated columns: Cursos -> Respondio",{},"regular","NodeOperationError",{"parameters":"30","id":"31","name":"4","type":"32","typeVersion":4.5,"position":"33","credentials":"34"},[],"Column names were updated after the node's setup","NodeOperationError: Column names were updated after the node's setup\n    at checkForSchemaChanges (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.ts:365:9)\n    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts:246:24)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/actions/router.ts:64:14)\n    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Google/Sheet/v2/GoogleSheetsV2.node.ts:30:10)\n    at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1093:8)\n    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1274:11)\n    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1708:27\n    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2324:11",{"node":"35","data":"36","source":"37"},{"startTime":1767656689593,"executionIndex":0,"source":"38","hints":"39","executionTime":1,"executionStatus":"40","data":"41"},{"startTime":1767656773149,"executionIndex":1,"source":"42","hints":"43","executionTime":644,"executionStatus":"44","error":"45"},{"preBuiltAgentsCalloutGoogleSheets":"46","authentication":"47","resource":"48","operation":"49","documentId":"50","sheetName":"51","columns":"52","options":"53"},"035bf449-ff45-44c8-a62a-dc98a45aefbc","n8n-nodes-base.googleSheets",[-3296,256],{"googleSheetsOAuth2Api":"54"},{"parameters":"55","id":"31","name":"4","type":"32","typeVersion":4.5,"position":"56","credentials":"57"},{"main":"58"},{"main":"42"},[],[],"success",{"main":"59"},["60"],[],"error",{"level":"17","tags":"18","description":"19","timestamp":1767656773793,"context":"20","functionality":"21","name":"22","node":"23","messages":"24","message":"25","stack":"26"},"","oAuth2","sheet","append",{"__rl":true,"value":"61","mode":"62"},{"__rl":true,"value":324738822,"mode":"63","cachedResultName":"64","cachedResultUrl":"65"},{"mappingMode":"66","value":"67","matchingColumns":"68","schema":"69","attemptToConvertTypes":false,"convertFieldsToString":false},{},{"id":"70","name":"71"},{"preBuiltAgentsCalloutGoogleSheets":"46","authentication":"47","resource":"48","operation":"49","documentId":"72","sheetName":"73","columns":"74","options":"75"},[-3296,256],{"googleSheetsOAuth2Api":"76"},["77"],["78"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},"https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit?gid=0#gid=0","url","list","Hoja 2","https://docs.google.com/spreadsheets/d/1EoiocZTa9ELY8TQBXLEJSjxAZmohYClF1GH0N2qE4As/edit#gid=324738822","defineBelow",{"Fecha":"79","Nombre":"80","Apellido":"81","Empresa":"82","CUIT":"83","Email":"84","Teléfono":"85","Plan":"86","Cursos":"87"},[],["88","89","90","91","92","93","94","95","96","97"],"5TssK5sjUDI7k2MP","Google Sheets account",{"__rl":true,"value":"61","mode":"62"},{"__rl":true,"value":324738822,"mode":"63","cachedResultName":"64","cachedResultUrl":"65"},{"mappingMode":"66","value":"98","matchingColumns":"99","schema":"100","attemptToConvertTypes":false,"convertFieldsToString":false},{},{"id":"70","name":"71"},["101"],["102"],"={{ $now }}","={{ $json.body.nombre }}","={{ $json.body.apellido }}","={{ $json.body.empresa }}","={{ $json.body.cuit }}","={{ $json.body.email }}","={{ $json.body.telefono }}","={{ $json.body.plan_detalle }}","={{ $json.body.cursos }}",{"id":"103","displayName":"103","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"105","displayName":"105","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"106","displayName":"106","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"107","displayName":"107","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"108","displayName":"108","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"109","displayName":"109","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"110","displayName":"110","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"111","displayName":"111","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"112","displayName":"112","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"113","displayName":"113","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true,"removed":true},{"Fecha":"79","Nombre":"80","Apellido":"81","Empresa":"82","CUIT":"83","Email":"84","Teléfono":"85","Plan":"86","Cursos":"87"},[],["114","115","116","117","118","119","120","121","122","123"],{"json":"124","pairedItem":"125"},{"json":"124","pairedItem":"126"},"Fecha","string","Nombre","Apellido","Empresa","CUIT","Email","Teléfono","Plan","Cursos","Respondio",{"id":"103","displayName":"103","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"105","displayName":"105","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"106","displayName":"106","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"107","displayName":"107","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"108","displayName":"108","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"109","displayName":"109","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"110","displayName":"110","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"111","displayName":"111","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"112","displayName":"112","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true},{"id":"113","displayName":"113","required":false,"defaultMatch":false,"display":true,"type":"104","canBeUsedToMatch":true,"removed":true},{"headers":"127","params":"128","query":"129","body":"130","webhookUrl":"131","executionMode":"132"},{"item":0},{"item":0},{"host":"133","user-agent":"134","content-length":"135","accept":"136","accept-encoding":"137","accept-language":"138","content-type":"139","origin":"140","priority":"141","referer":"142","sec-ch-ua":"143","sec-ch-ua-mobile":"144","sec-ch-ua-platform":"145","sec-fetch-dest":"146","sec-fetch-mode":"147","sec-fetch-site":"148","x-forwarded-for":"149","x-forwarded-host":"133","x-forwarded-port":"150","x-forwarded-proto":"151","x-forwarded-server":"152","x-real-ip":"149"},{},{},{"nombre":"153","apellido":"154","empresa":"155","cuit":"46","email":"156","telefono":"157","plan_detalle":"158","cursos[]":"159","cursos":"160"},"https://n8n.apptlas.cloud/webhook-test/reserva-unificada-2026","test","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","Victor","Colussi","Petrogas","info@excelcertify.com","+543624810831","Pack Corporativo (2+ cursos) - $750.000 c/u - Hasta 20 Personas","Power BI & Data Analytics","Excel | Google Sheets Empresarial, Microsoft 365, Power BI & Data Analytics"]


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":{"resume":"timeInterval","amount":15,"unit":"minutes"},"id":"63f14a33-2684-424c-afc2-aa45a1c3a7df","name":"Esperar 15 Min","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-2848,256],"webhookId":"cb315e96-6e27-463d-883a-48d56a29774e"},{"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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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 Min","type":"main","index":0}]]},"Esperar 15 Min":{"main":[[{"node":"Generar Lógica PDF","type":"main","index":0}]]},"Generar Lógica PDF":{"main":[[{"node":"Crear PDF (API)","type":"main","index":0}]]},"Crear PDF (API)":{"main":[[{"node":"3. Email con PDF","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}]]}},"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"},"1. Guardar Lead",["13","4"],{"Webhook Formulario":"14","1. Guardar Lead":"15"},{},{},[],{},{},{},"Webhook Formulario",["16"],["17"],{"startTime":1767656689593,"executionIndex":0,"source":"18","hints":"19","executionTime":1,"executionStatus":"20","data":"21"},{"startTime":1767656811524,"executionIndex":1,"source":"22","hints":"23","executionTime":2533,"executionStatus":"20","data":"24"},[],[],"success",{"main":"25"},["26"],[],{"main":"27"},["28"],{"previousNode":"13","previousNodeOutput":0,"previousNodeRun":0},["29"],["30"],["31"],{"json":"32","pairedItem":"33"},{"json":"34","pairedItem":"35"},{"headers":"36","params":"37","query":"38","body":"39","webhookUrl":"40","executionMode":"41"},{"item":0},{"Fecha":"42","Nombre":"43","Apellido":"44","Empresa":"45","CUIT":"46","Email":"47","Teléfono":"48","Plan":"49","Cursos":"50"},{"item":0},{"host":"51","user-agent":"52","content-length":"53","accept":"54","accept-encoding":"55","accept-language":"56","content-type":"57","origin":"58","priority":"59","referer":"60","sec-ch-ua":"61","sec-ch-ua-mobile":"62","sec-ch-ua-platform":"63","sec-fetch-dest":"64","sec-fetch-mode":"65","sec-fetch-site":"66","x-forwarded-for":"67","x-forwarded-host":"51","x-forwarded-port":"68","x-forwarded-proto":"69","x-forwarded-server":"70","x-real-ip":"67"},{},{},{"nombre":"43","apellido":"44","empresa":"45","cuit":"46","email":"47","telefono":"48","plan_detalle":"49","cursos[]":"71","cursos":"50"},"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","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"]


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":{"resume":"timeInterval","amount":15,"unit":"minutes"},"id":"63f14a33-2684-424c-afc2-aa45a1c3a7df","name":"Esperar 15 Min","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-2848,256],"webhookId":"cb315e96-6e27-463d-883a-48d56a29774e"},{"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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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 Min","type":"main","index":0}]]},"Esperar 15 Min":{"main":[[{"node":"Generar Lógica PDF","type":"main","index":0}]]},"Generar Lógica PDF":{"main":[[{"node":"Crear PDF (API)","type":"main","index":0}]]},"Crear PDF (API)":{"main":[[{"node":"3. Email con PDF","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}]]}},"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"},"2. Email Confirmación",["13","14","4"],{"Webhook Formulario":"15","1. Guardar Lead":"16","2. Email Confirmación":"17"},{},{},[],{},{},{},"Webhook Formulario","1. Guardar Lead",["18"],["19"],["20"],{"startTime":1767656689593,"executionIndex":0,"source":"21","hints":"22","executionTime":1,"executionStatus":"23","data":"24"},{"startTime":1767656811524,"executionIndex":1,"source":"25","hints":"26","executionTime":2533,"executionStatus":"23","data":"27"},{"startTime":1767656845503,"executionIndex":2,"source":"28","hints":"29","executionTime":1604,"executionStatus":"23","data":"30"},[],[],"success",{"main":"31"},["32"],[],{"main":"33"},["34"],[],{"main":"35"},["36"],{"previousNode":"13","previousNodeOutput":0,"previousNodeRun":0},["37"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},["38"],["39"],["40"],["41"],{"json":"42","pairedItem":"43"},{"json":"44","pairedItem":"45"},{"json":"46","pairedItem":"47"},{"headers":"48","params":"49","query":"50","body":"51","webhookUrl":"52","executionMode":"53"},{"item":0},{"Fecha":"54","Nombre":"55","Apellido":"56","Empresa":"57","CUIT":"58","Email":"59","Teléfono":"60","Plan":"61","Cursos":"62"},{"item":0},{"accepted":"63","rejected":"64","ehlo":"65","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"66","envelope":"67","messageId":"68"},{"item":0},{"host":"69","user-agent":"70","content-length":"71","accept":"72","accept-encoding":"73","accept-language":"74","content-type":"75","origin":"76","priority":"77","referer":"78","sec-ch-ua":"79","sec-ch-ua-mobile":"80","sec-ch-ua-platform":"81","sec-fetch-dest":"82","sec-fetch-mode":"83","sec-fetch-site":"84","x-forwarded-for":"85","x-forwarded-host":"69","x-forwarded-port":"86","x-forwarded-proto":"87","x-forwarded-server":"88","x-real-ip":"85"},{},{},{"nombre":"55","apellido":"56","empresa":"57","cuit":"58","email":"59","telefono":"60","plan_detalle":"61","cursos[]":"89","cursos":"62"},"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",["59"],[],["90","91","92","93","94","95","96","97"],"250 2.0.0 Ok: queued as 4dlWDt4cDXz1xnX",{"from":"98","to":"99"},"<fd2e0a66-ca68-ae80-e3d2-26411b98c8bf@info.excelcertify.com>","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",["59"]]


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":{"resume":"timeInterval","amount":15,"unit":"minutes"},"id":"63f14a33-2684-424c-afc2-aa45a1c3a7df","name":"Esperar 15 Min","type":"n8n-nodes-base.wait","typeVersion":1,"position":[-2848,256],"webhookId":"cb315e96-6e27-463d-883a-48d56a29774e"},{"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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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 Min","type":"main","index":0}]]},"Esperar 15 Min":{"main":[[{"node":"Generar Lógica PDF","type":"main","index":0}]]},"Generar Lógica PDF":{"main":[[{"node":"Crear PDF (API)","type":"main","index":0}]]},"Crear PDF (API)":{"main":[[{"node":"3. Email con PDF","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}]]}},"settings":{"executionOrder":"v1"},"pinData":{}}

data:
  [{"startData":"1","resultData":"2","executionData":"3","waitTill":"4","pushRef":"5"},{"destinationNode":"6","originalDestinationNode":"6","runNodeFilter":"7"},{"runData":"8","pinData":"9","lastNodeExecuted":"6","error":"10"},{"contextData":"11","nodeExecutionStack":"12","metadata":"13","waitingExecution":"14","waitingExecutionSource":"15"},"2026-01-06T00:02:34.814Z","eapifyupeh","Esperar 15 Min",["16","17","6","18"],{"Webhook Formulario":"19","1. Guardar Lead":"20","2. Email Confirmación":"21","Esperar 15 Min":"22"},{},{"level":"23","tags":"24","extra":"25","timestamp":1767657535079,"context":"26","functionality":"27","name":"28","message":"29","stack":"30"},{},["31"],{},{},{},"Webhook Formulario","2. Email Confirmación","1. Guardar Lead",["32"],["33"],["34"],["35"],"warning",{},{"executionId":"36"},{},"regular","ManualExecutionCancelledError","The execution was cancelled manually","ManualExecutionCancelledError: The execution was cancelled manually\n    at ExecutionRepository.stopDuringRun (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+db@file+packages+@n8n+db_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1._4f71e79debd90f68b8a49d1bf4d1af69/node_modules/@n8n/db/src/repositories/execution.repository.ts:796:17)\n    at ExecutionService.stopInRegularMode (/usr/local/lib/node_modules/n8n/src/executions/execution.service.ts:561:41)\n    at ExecutionService.stop (/usr/local/lib/node_modules/n8n/src/executions/execution.service.ts:522:18)\n    at ExecutionsController.stop (/usr/local/lib/node_modules/n8n/src/executions/executions.controller.ts:113:10)\n    at handler (/usr/local/lib/node_modules/n8n/src/controller.registry.ts:79:12)\n    at /usr/local/lib/node_modules/n8n/src/response-helper.ts:161:17",{"node":"37","data":"38","source":"39"},{"startTime":1767656689593,"executionIndex":0,"source":"40","hints":"41","executionTime":1,"executionStatus":"42","data":"43"},{"startTime":1767656811524,"executionIndex":1,"source":"44","hints":"45","executionTime":2533,"executionStatus":"42","data":"46"},{"startTime":1767656845503,"executionIndex":2,"source":"47","hints":"48","executionTime":1604,"executionStatus":"42","data":"49"},{"startTime":1767656854813,"executionIndex":3,"source":"50","hints":"51","executionTime":2,"executionStatus":"52","data":"53"},"217",{"parameters":"54","id":"55","name":"6","type":"56","typeVersion":1,"position":"57","webhookId":"58"},{"main":"59"},{"main":"50"},[],[],"success",{"main":"60"},["61"],[],{"main":"62"},["63"],[],{"main":"64"},["65"],[],"waiting",{"main":"66"},{"resume":"67","amount":15,"unit":"68"},"63f14a33-2684-424c-afc2-aa45a1c3a7df","n8n-nodes-base.wait",[-2848,256],"cb315e96-6e27-463d-883a-48d56a29774e",["69"],["70"],{"previousNode":"16","previousNodeOutput":0,"previousNodeRun":0},["71"],{"previousNode":"18","previousNodeOutput":0,"previousNodeRun":0},["72"],{"previousNode":"17","previousNodeOutput":0,"previousNodeRun":0},["69"],"timeInterval","minutes",["73"],["74"],["75"],["76"],{"json":"77","pairedItem":"78"},{"json":"79","pairedItem":"80"},{"json":"81","pairedItem":"82"},{"json":"77","pairedItem":"83"},{"accepted":"84","rejected":"85","ehlo":"86","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"87","envelope":"88","messageId":"89"},{"item":0},{"headers":"90","params":"91","query":"92","body":"93","webhookUrl":"94","executionMode":"95"},{"item":0},{"Fecha":"96","Nombre":"97","Apellido":"98","Empresa":"99","CUIT":"100","Email":"101","Teléfono":"102","Plan":"103","Cursos":"104"},{"item":0},{"item":0},["101"],[],["105","106","107","108","109","110","111","112"],"250 2.0.0 Ok: queued as 4dlWDt4cDXz1xnX",{"from":"113","to":"114"},"<fd2e0a66-ca68-ae80-e3d2-26411b98c8bf@info.excelcertify.com>",{"host":"115","user-agent":"116","content-length":"117","accept":"118","accept-encoding":"119","accept-language":"120","content-type":"121","origin":"122","priority":"123","referer":"124","sec-ch-ua":"125","sec-ch-ua-mobile":"126","sec-ch-ua-platform":"127","sec-fetch-dest":"128","sec-fetch-mode":"129","sec-fetch-site":"130","x-forwarded-for":"131","x-forwarded-host":"115","x-forwarded-port":"132","x-forwarded-proto":"133","x-forwarded-server":"134","x-real-ip":"131"},{},{},{"nombre":"97","apellido":"98","empresa":"99","cuit":"100","email":"101","telefono":"102","plan_detalle":"103","cursos[]":"135","cursos":"104"},"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","PIPELINING","SIZE 48811212","ETRN","AUTH PLAIN LOGIN","ENHANCEDSTATUSCODES","8BITMIME","DSN","CHUNKING","avisos@info.excelcertify.com",["101"],"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"]


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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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":"3. Email con PDF","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}]]}},"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"},"Esperar 15 Min1",["13","14","4","15"],{"Webhook Formulario":"16","1. Guardar Lead":"17","2. Email Confirmación":"18","Esperar 15 Min1":"19"},{},{},[],{},{},{},"Webhook Formulario","2. Email Confirmación","1. Guardar Lead",["20"],["21"],["22"],["23"],{"startTime":1767656689593,"executionIndex":0,"source":"24","hints":"25","executionTime":1,"executionStatus":"26","data":"27"},{"startTime":1767656811524,"executionIndex":1,"source":"28","hints":"29","executionTime":2533,"executionStatus":"26","data":"30"},{"startTime":1767656845503,"executionIndex":2,"source":"31","hints":"32","executionTime":1604,"executionStatus":"26","data":"33"},{"startTime":1767657537533,"executionIndex":3,"source":"34","hints":"35","executionTime":15002,"executionStatus":"26","data":"36"},[],[],"success",{"main":"37"},["38"],[],{"main":"39"},["40"],[],{"main":"41"},["42"],[],{"main":"43"},["44"],{"previousNode":"13","previousNodeOutput":0,"previousNodeRun":0},["45"],{"previousNode":"15","previousNodeOutput":0,"previousNodeRun":0},["46"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},["47"],["48"],["49"],["50"],["51"],{"json":"52","pairedItem":"53"},{"json":"54","pairedItem":"55"},{"json":"56","pairedItem":"57"},{"json":"56","pairedItem":"58"},{"headers":"59","params":"60","query":"61","body":"62","webhookUrl":"63","executionMode":"64"},{"item":0},{"Fecha":"65","Nombre":"66","Apellido":"67","Empresa":"68","CUIT":"69","Email":"70","Teléfono":"71","Plan":"72","Cursos":"73"},{"item":0},{"accepted":"74","rejected":"75","ehlo":"76","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"77","envelope":"78","messageId":"79"},{"item":0},{"item":0},{"host":"80","user-agent":"81","content-length":"82","accept":"83","accept-encoding":"84","accept-language":"85","content-type":"86","origin":"87","priority":"88","referer":"89","sec-ch-ua":"90","sec-ch-ua-mobile":"91","sec-ch-ua-platform":"92","sec-fetch-dest":"93","sec-fetch-mode":"94","sec-fetch-site":"95","x-forwarded-for":"96","x-forwarded-host":"80","x-forwarded-port":"97","x-forwarded-proto":"98","x-forwarded-server":"99","x-real-ip":"96"},{},{},{"nombre":"66","apellido":"67","empresa":"68","cuit":"69","email":"70","telefono":"71","plan_detalle":"72","cursos[]":"100","cursos":"73"},"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",["70"],[],["101","102","103","104","105","106","107","108"],"250 2.0.0 Ok: queued as 4dlWDt4cDXz1xnX",{"from":"109","to":"110"},"<fd2e0a66-ca68-ae80-e3d2-26411b98c8bf@info.excelcertify.com>","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",["70"]]


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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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":"3. Email con PDF","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}]]}},"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"},"Generar Lógica PDF",["13","14","4","15","16"],{"Webhook Formulario":"17","1. Guardar Lead":"18","2. Email Confirmación":"19","Esperar 15 Min1":"20","Generar Lógica PDF":"21"},{},{},[],{},{},{},"Webhook Formulario","Esperar 15 Min1","2. Email Confirmación","1. Guardar Lead",["22"],["23"],["24"],["25"],["26"],{"startTime":1767656689593,"executionIndex":0,"source":"27","hints":"28","executionTime":1,"executionStatus":"29","data":"30"},{"startTime":1767656811524,"executionIndex":1,"source":"31","hints":"32","executionTime":2533,"executionStatus":"29","data":"33"},{"startTime":1767656845503,"executionIndex":2,"source":"34","hints":"35","executionTime":1604,"executionStatus":"29","data":"36"},{"startTime":1767657537533,"executionIndex":3,"source":"37","hints":"38","executionTime":15002,"executionStatus":"29","data":"39"},{"startTime":1767657568551,"executionIndex":4,"source":"40","hints":"41","executionTime":295,"executionStatus":"29","data":"42"},[],[],"success",{"main":"43"},["44"],[],{"main":"45"},["46"],[],{"main":"47"},["48"],[],{"main":"49"},["50"],[],{"main":"51"},["52"],{"previousNode":"13","previousNodeOutput":0,"previousNodeRun":0},["53"],{"previousNode":"16","previousNodeOutput":0,"previousNodeRun":0},["54"],{"previousNode":"15","previousNodeOutput":0,"previousNodeRun":0},["55"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},["56"],["57"],["58"],["59"],["60"],["61"],{"json":"62","pairedItem":"63"},{"json":"64","pairedItem":"65"},{"json":"66","pairedItem":"67"},{"json":"68","pairedItem":"69"},{"json":"70","pairedItem":"71"},{"headers":"72","params":"73","query":"74","body":"75","webhookUrl":"76","executionMode":"77"},{"item":0},{"Fecha":"78","Nombre":"79","Apellido":"80","Empresa":"81","CUIT":"82","Email":"83","Teléfono":"84","Plan":"85","Cursos":"86"},{"item":0},{"accepted":"87","rejected":"88","ehlo":"89","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"90","envelope":"91","messageId":"92"},{"item":0},{"accepted":"93","rejected":"94","ehlo":"95","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"90","envelope":"96","messageId":"92"},{"item":0},{"html_final":"97","filename":"98"},{"item":0},{"host":"99","user-agent":"100","content-length":"101","accept":"102","accept-encoding":"103","accept-language":"104","content-type":"105","origin":"106","priority":"107","referer":"108","sec-ch-ua":"109","sec-ch-ua-mobile":"110","sec-ch-ua-platform":"111","sec-fetch-dest":"112","sec-fetch-mode":"113","sec-fetch-site":"114","x-forwarded-for":"115","x-forwarded-host":"99","x-forwarded-port":"116","x-forwarded-proto":"117","x-forwarded-server":"118","x-real-ip":"115"},{},{},{"nombre":"79","apellido":"80","empresa":"81","cuit":"82","email":"83","telefono":"84","plan_detalle":"85","cursos[]":"119","cursos":"86"},"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",["83"],[],["120","121","122","123","124","125","126","127"],"250 2.0.0 Ok: queued as 4dlWDt4cDXz1xnX",{"from":"128","to":"129"},"<fd2e0a66-ca68-ae80-e3d2-26411b98c8bf@info.excelcertify.com>",["83"],[],["120","121","122","123","124","125","126","127"],{"from":"128","to":"130"},"\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n<meta charset=\"UTF-8\">\n<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-87962<br>\n    <strong>Fecha:</strong> 06/01/2026\n    <strong>Válido hasta:</strong> 05/02/2026\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> Petrogas</p>\n  <p><strong>CUIT:</strong> No informado</p>\n  <p><strong>Atención a:</strong> Victor Colussi</p>\n  <p><strong>Email:</strong> info@excelcertify.com</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    • Excel | Google Sheets Empresarial<br>• Microsoft 365<br>• Power BI & Data Analytics\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>Pack Corporativo (Precio Congelado)</strong></p>\n  <p class=\"price\">Inversión: $750.000 c/u <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\n</body>\n</html>","Presupuesto_Petrogas.pdf","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",["83"],["83"]]


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<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-${presupuestoID}<br>\n    <strong>Fecha:</strong> ${now.toFormat('dd/MM/yyyy')}\n    <strong>Válido hasta:</strong> ${validityDate.toFormat('dd/MM/yyyy')}\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> ${body.empresa}</p>\n  <p><strong>CUIT:</strong> ${body.cuit || 'No informado'}</p>\n  <p><strong>Atención a:</strong> ${body.nombre} ${body.apellido}</p>\n  <p><strong>Email:</strong> ${body.email}</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    ${cursosHTML}\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>${planNombre}</strong></p>\n  <p class=\"price\">Inversión: ${planPrecio} <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\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":[-2192,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"}],"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":"3. Email con PDF","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}]]}},"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"},"Crear PDF (API)",["13","14","4","15","16","17"],{"Webhook Formulario":"18","1. Guardar Lead":"19","2. Email Confirmación":"20","Esperar 15 Min1":"21","Generar Lógica PDF":"22","Crear PDF (API)":"23"},{},{"node:Crear PDF (API)":"24"},[],{},{},{},"Webhook Formulario","Generar Lógica PDF","Esperar 15 Min1","2. Email Confirmación","1. Guardar Lead",["25"],["26"],["27"],["28"],["29"],["30"],{"response":"31"},{"startTime":1767656689593,"executionIndex":0,"source":"32","hints":"33","executionTime":1,"executionStatus":"34","data":"35"},{"startTime":1767656811524,"executionIndex":1,"source":"36","hints":"37","executionTime":2533,"executionStatus":"34","data":"38"},{"startTime":1767656845503,"executionIndex":2,"source":"39","hints":"40","executionTime":1604,"executionStatus":"34","data":"41"},{"startTime":1767657537533,"executionIndex":3,"source":"42","hints":"43","executionTime":15002,"executionStatus":"34","data":"44"},{"startTime":1767657568551,"executionIndex":4,"source":"45","hints":"46","executionTime":295,"executionStatus":"34","data":"47"},{"startTime":1767657578826,"executionIndex":5,"source":"48","hints":"49","executionTime":2338,"executionStatus":"34","data":"50"},{"body":"51"},[],[],"success",{"main":"52"},["53"],[],{"main":"54"},["55"],[],{"main":"56"},["57"],[],{"main":"58"},["59"],[],{"main":"60"},["61"],[],{"main":"62"},{"_events":"63","_readableState":"64","socket":"65","httpVersionMajor":1,"httpVersionMinor":1,"httpVersion":"66","complete":true,"rawHeaders":"67","rawTrailers":"68","aborted":false,"upgrade":false,"url":"69","method":null,"statusCode":200,"statusMessage":"70","client":"65","_consuming":true,"_dumped":false,"req":"71","_eventsCount":3,"responseUrl":"72","redirects":"73","contentType":"74","encoding":"75","contentDisposition":"76"},["77"],{"previousNode":"13","previousNodeOutput":0,"previousNodeRun":0},["78"],{"previousNode":"17","previousNodeOutput":0,"previousNodeRun":0},["79"],{"previousNode":"16","previousNodeOutput":0,"previousNodeRun":0},["80"],{"previousNode":"15","previousNodeOutput":0,"previousNodeRun":0},["81"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},["82"],{"end":"83"},{"highWaterMark":65536,"buffer":"84","bufferIndex":0,"length":0,"pipes":"85","awaitDrainWriters":null},{"_tlsOptions":"86","_secureEstablished":true,"_securePending":false,"_newSessionPending":false,"_controlReleased":true,"secureConnecting":false,"_SNICallback":null,"servername":"87","alpnProtocol":false,"authorized":true,"authorizationError":null,"encrypted":true,"_events":"88","_eventsCount":10,"connecting":false,"_hadError":false,"_parent":null,"_host":"87","_closeAfterHandlingError":false,"_readableState":"89","_writableState":"90","allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"69","_server":null,"ssl":"91","_requestCert":true,"_rejectUnauthorized":true,"parser":null,"_httpMessage":"71","timeout":300000},"1.1",["92","93","94","93","95","96","97","98","99","98","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","74","137","138"],[],"","OK",{"_events":"139","_eventsCount":7,"outputData":"140","outputSize":0,"writable":true,"destroyed":false,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":false,"maxRequestsOnConnectionReached":false,"_defaultKeepAlive":true,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"strictContentLength":false,"_contentLength":2326,"_hasBody":true,"_trailer":"69","finished":true,"_headerSent":true,"_closed":false,"_header":"141","_keepAliveTimeout":0,"agent":"142","method":"143","path":"144","_ended":true,"res":"51","aborted":false,"timeoutCb":null,"upgradeOrConnect":false,"parser":null,"maxHeadersCount":null,"reusedSocket":false,"host":"87","protocol":"145","_redirectable":"146"},"https://sk_679d4a0147fa62f1564e11ef1d824a6a9ab40829:sk_679d4a0147fa62f1564e11ef1d824a6a9ab40829@api.pdfshift.io/v3/convert/pdf",[],"application/pdf","utf-8",{"type":"147","filename":"148"},["149"],["150"],["151"],["152"],["153"],["154"],[null,null],[],[],{"pipe":false,"secureContext":"155","isServer":false,"requestCert":true,"rejectUnauthorized":true},"api.pdfshift.io",{"close":"156","timeout":"157"},{"highWaterMark":65536,"buffer":"158","bufferIndex":0,"length":0,"pipes":"159","awaitDrainWriters":null},{"highWaterMark":65536,"length":0,"corked":0,"writelen":0,"bufferedIndex":0,"pendingcb":1},{"_parent":"160","_parentWrap":null,"_secureContext":"155","reading":true},"x-response-statuscode","200","x-response-status-code","x-pdfshift-processor","proc4.gra.pdfshift.io","x-credits-cost","1","x-credits-used","x-response-duration","1008ms","x-pdfshift-duration","1074ms","x-credits-remaining","28","content-disposition","inline; filename=result.pdf","content-security-policy","default-src 'self'; frame-ancestors 'none'; style-src 'unsafe-inline'; img-src 'self' secure.gravatar.com","x-content-type-options","nosniff","x-frame-options","DENY","x-xss-protection","1; mode=block","x-server-identifier","api.sbg.pdfshift.io","access-control-allow-origin","*","access-control-allow-methods","HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS","access-control-allow-credentials","true","access-control-expose-headers","x-client-session, x-request-id, x-server-identifier, x-process-time, x-pdfshift-processor, x-pdfshift-duration, x-response-status-code, x-credits-cost, x-credits-used, x-credits-remaining, x-ratelimit-remaining, x-ratelimit-limit, x-ratelimit-reset, x-response-duration, x-pdfshift-duration","access-control-allow-headers","origin, x-requested-with, content-type, accept, host, authorization, x-token, x-api-key","cache-control","private, no-cache, no-cache=Set-Cookie, proxy-revalidate","x-process-time","1239ms","x-request-id","34b588ba-04f9-412c-9dd7-8ae7dcae5c41","content-length","51043","content-type","connection","close",{},[],"POST /v3/convert/pdf HTTP/1.1\r\nAccept: application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7\r\nContent-Type: application/json\r\nUser-Agent: axios/1.12.0\r\nContent-Length: 2326\r\nAccept-Encoding: gzip, compress, deflate, br\r\nHost: api.pdfshift.io\r\nAuthorization: Basic c2tfNjc5ZDRhMDE0N2ZhNjJmMTU2NGUxMWVmMWQ4MjRhNmE5YWI0MDgyOTpza182NzlkNGEwMTQ3ZmE2MmYxNTY0ZTExZWYxZDgyNGE2YTlhYjQwODI5\r\nConnection: close\r\n\r\n",{"_events":"161","_eventsCount":2,"options":"162","defaultPort":443,"protocol":"145","requests":"163","sockets":"164","freeSockets":"165","keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256,"scheduling":"166","maxTotalSockets":null,"totalSocketCount":1,"agentKeepAliveTimeoutBuffer":1000,"maxCachedSessions":100,"_sessionCache":"167"},"POST","/v3/convert/pdf","https:",{"_events":"168","_writableState":"169","_options":"170","_ended":true,"_ending":true,"_redirectCount":0,"_redirects":"73","_requestBodyLength":2326,"_requestBodyBuffers":"171","_eventsCount":3,"_currentRequest":"71","_currentUrl":"72","_timeout":null},"inline","result.pdf",{"json":"172","pairedItem":"173"},{"json":"174","pairedItem":"175"},{"json":"176","pairedItem":"177"},{"json":"178","pairedItem":"179"},{"json":"180","pairedItem":"181"},{"json":"180","binary":"182","pairedItem":"183"},{"context":"184"},[null,null,null,null],[null,null],[],[],{"reading":true,"onconnection":null},{},{"servername":"87","defaultPort":443,"protocol":"145","noDelay":true,"path":null},{},{"api.pdfshift.io:443:::::::::::::::::::::":"185"},{},"lifo",{"map":"186","list":"187"},{"socket":"188"},{"highWaterMark":65536,"length":0,"corked":0,"writelen":0,"bufferedIndex":0,"pendingcb":0},{"maxRedirects":21,"maxBodyLength":null,"protocol":"145","path":"144","method":"143","headers":"189","agents":"190","auth":"191","beforeRedirects":"192","hostname":"87","port":"69","agent":"142","nativeProtocols":"193","pathname":"144"},[],{"headers":"194","params":"195","query":"196","body":"197","webhookUrl":"198","executionMode":"199"},{"item":0},{"Fecha":"200","Nombre":"201","Apellido":"202","Empresa":"203","CUIT":"69","Email":"204","Teléfono":"205","Plan":"206","Cursos":"207"},{"item":0},{"accepted":"208","rejected":"209","ehlo":"210","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"211","envelope":"212","messageId":"213"},{"item":0},{"accepted":"214","rejected":"215","ehlo":"216","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"211","envelope":"217","messageId":"213"},{"item":0},{"html_final":"218","filename":"219"},{"item":0},{"data":"220"},{"item":0},{},["65"],{"api.pdfshift.io:443:::::::::::::::::::::":"221"},["222"],[null,null],{"Accept":"223","Content-Type":"224","User-Agent":"225","Content-Length":"226","Accept-Encoding":"227"},{"http":"228","https":"142"},"sk_679d4a0147fa62f1564e11ef1d824a6a9ab40829:sk_679d4a0147fa62f1564e11ef1d824a6a9ab40829",{},{"http:":"229","https:":"230"},{"host":"231","user-agent":"232","content-length":"233","accept":"234","accept-encoding":"235","accept-language":"236","content-type":"224","origin":"237","priority":"238","referer":"239","sec-ch-ua":"240","sec-ch-ua-mobile":"241","sec-ch-ua-platform":"242","sec-fetch-dest":"243","sec-fetch-mode":"244","sec-fetch-site":"245","x-forwarded-for":"246","x-forwarded-host":"231","x-forwarded-port":"247","x-forwarded-proto":"248","x-forwarded-server":"249","x-real-ip":"246"},{},{},{"nombre":"201","apellido":"202","empresa":"203","cuit":"69","email":"204","telefono":"205","plan_detalle":"206","cursos[]":"250","cursos":"207"},"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",["204"],[],["251","252","253","254","255","256","257","258"],"250 2.0.0 Ok: queued as 4dlWDt4cDXz1xnX",{"from":"259","to":"260"},"<fd2e0a66-ca68-ae80-e3d2-26411b98c8bf@info.excelcertify.com>",["204"],[],["251","252","253","254","255","256","257","258"],{"from":"259","to":"261"},"\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n<meta charset=\"UTF-8\">\n<style>\nbody { font-family: Helvetica, Arial, sans-serif; color: #333; padding: 40px; }\n.header { border-bottom: 2px solid #10b981; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; }\n.logo { height: 50px; }\nh1 { color: #111827; }\n.client-box { background: #f9fafb; padding: 20px; border-radius: 8px; margin-bottom: 30px; }\n.price-box { background: #f0fdf4; padding: 20px; border: 1px solid #10b981; border-radius: 8px; text-align: center; margin: 20px 0; }\n.price { font-size: 24px; font-weight: bold; color: #111827; }\n.footer { margin-top: 50px; font-size: 12px; color: #888; text-align: center; border-top: 1px solid #eee; padding-top: 20px; }\n</style>\n</head>\n<body>\n<div class=\"header\">\n  <img src=\"https://excelcertify.com/wp-content/uploads/2023/07/cropped-cropped-cropped-logoexcelcertify-bicubic-1-1-188x63.png\" class=\"logo\">\n  <div style=\"text-align:right;\">\n    <strong>Presupuesto N°:</strong> PRE-26-87962<br>\n    <strong>Fecha:</strong> 06/01/2026\n    <strong>Válido hasta:</strong> 05/02/2026\n  </div>\n</div>\n\n<h1>Presupuesto de Capacitación 2026</h1>\n\n<div class=\"client-box\">\n  <p><strong>Empresa:</strong> Petrogas</p>\n  <p><strong>CUIT:</strong> No informado</p>\n  <p><strong>Atención a:</strong> Victor Colussi</p>\n  <p><strong>Email:</strong> info@excelcertify.com</p>\n</div>\n\n<h3>Detalle del Servicio</h3>\n<p>Capacitación In-Company Online en Vivo (Instructor Experto).</p>\n<div style=\"margin-bottom: 20px; padding: 10px; border: 1px solid #eee;\">\n    <strong>Cursos Solicitados:</strong><br>\n    • Excel | Google Sheets Empresarial<br>• Microsoft 365<br>• Power BI & Data Analytics\n</div>\n\n<div class=\"price-box\">\n  <p>Plan Seleccionado: <strong>Pack Corporativo (Precio Congelado)</strong></p>\n  <p class=\"price\">Inversión: $750.000 c/u <span style=\"font-size:14px; font-weight:normal;\">(+ IVA si corresponde)</span></p>\n</div>\n\n<p><strong>Condiciones:</strong> Precio congelado válido confirmando reserva durante Enero 2025.</p>\n\n<div class=\"footer\">\n  ExcelCertify - Partner Oficial Microsoft & Google<br>\n  www.excelcertify.com\n</div>\n</body>\n</html>","Presupuesto_Petrogas.pdf",{"mimeType":"74","fileType":"262","fileExtension":"262","data":"263","fileName":"148","fileSize":"264"},{"type":"265","data":"266"},"api.pdfshift.io:443:::::::::::::::::::::","application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7","application/json","axios/1.12.0","2326","gzip, compress, deflate, br",{"_events":"267","_eventsCount":2,"options":"268","defaultPort":80,"protocol":"269","requests":"270","sockets":"271","freeSockets":"272","keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256,"scheduling":"166","maxTotalSockets":null,"totalSocketCount":0,"agentKeepAliveTimeoutBuffer":1000},{"METHODS":"273","STATUS_CODES":"274","maxHeaderSize":16384,"globalAgent":"275"},{"globalAgent":"276"},"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","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",["204"],["204"],"pdf","[encoded data, 68060 characters]","51 kB","Buffer",[48,130,5,210,2,1,1,2,2,3,4,4,2,19,2,4,32,237,40,154,233,43,9,149,63,117,236,201,41,156,128,238,109,22,211,147,74,11,176,61,191,65,95,33,120,99,156,230,153,4,48,66,64,246,74,203,140,111,167,60,134,165,106,34,96,180,165,65,5,186,231,109,227,241,194,24,127,29,71,182,21,48,110,187,245,76,220,192,113,64,18,149,218,133,123,45,188,166,185,161,6,2,4,105,92,80,107,162,4,2,2,28,32,163,130,5,19,48,130,5,15,48,130,3,247,160,3,2,1,2,2,18,5,216,95,209,121,165,94,244,152,141,11,45,12,208,162,65,113,164,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,48,51,49,11,48,9,6,3,85,4,6,19,2,85,83,49,22,48,20,6,3,85,4,10,19,13,76,101,116,39,115,32,69,110,99,114,121,112,116,49,12,48,10,6,3,85,4,3,19,3,82,49,51,48,30,23,13,50,53,49,49,50,57,50,51,48,51,49,55,90,23,13,50,54,48,50,50,55,50,51,48,51,49,54,90,48,26,49,24,48,22,6,3,85,4,3,19,15,97,112,105,46,112,100,102,115,104,105,102,116,46,105,111,48,130,1,34,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,130,1,15,0,48,130,1,10,2,130,1,1,0,209,67,164,147,228,157,183,171,184,211,189,189,79,97,165,37,211,61,179,199,220,246,169,133,11,136,35,184,129,235,215,121,106,147,230,182,71,40,65,150,21,152,124,105,157,84,77,142,83,130,226,132,173,114,69,52,197,148,9,102,29,204,243,118,147,38,210,45,130,102,176,85,164,221,232,50,40,54,81,121,78,250,246,0,126,0,5,139,209,123,93,215,253,163,35,190,55,13,210,196,249,254,131,206,125,80,47,84,253,173,78,59,82,229,112,79,251,166,133,155,163,9,139,209,237,110,101,69,119,21,232,218,230,57,255,254,133,248,205,201,183,59,231,254,125,178,119,194,195,131,145,64,39,138,50,190,184,179,143,109,233,62,182,97,223,235,85,107,175,65,187,81,114,239,130,224,229,46,112,69,215,126,157,91,56,92,240,1,76,57,132,0,172,28,187,173,235,139,129,80,211,96,139,226,243,154,87,143,225,171,76,254,157,252,127,213,232,221,205,142,148,245,46,114,94,139,49,28,47,100,224,49,59,191,18,10,24,193,80,165,243,88,62,18,167,245,105,227,229,16,213,211,25,139,117,9,2,3,1,0,1,163,130,2,52,48,130,2,48,48,14,6,3,85,29,15,1,1,255,4,4,3,2,5,160,48,29,6,3,85,29,37,4,22,48,20,6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,29,6,3,85,29,14,4,22,4,20,130,188,161,129,134,20,12,164,89,239,223,202,8,154,59,124,172,111,160,117,48,31,6,3,85,29,35,4,24,48,22,128,20,231,171,159,15,44,51,160,83,211,94,79,120,200,178,132,14,59,214,146,51,48,51,6,8,43,6,1,5,5,7,1,1,4,39,48,37,48,35,6,8,43,6,1,5,5,7,48,2,134,23,104,116,116,112,58,47,47,114,49,51,46,105,46,108,101,110,99,114,46,111,114,103,47,48,47,6,3,85,29,17,4,40,48,38,130,15,97,112,105,46,112,100,102,115,104,105,102,116,46,105,111,130,19,97,112,105,46,115,98,103,46,112,100,102,115,104,105,102,116,46,105,111,48,19,6,3,85,29,32,4,12,48,10,48,8,6,6,103,129,12,1,2,1,48,46,6,3,85,29,31,4,39,48,37,48,35,160,33,160,31,134,29,104,116,116,112,58,47,47,114,49,51,46,99,46,108,101,110,99,114,46,111,114,103,47,51,55,46,99,114,108,48,130,1,4,6,10,43,6,1,4,1,214,121,2,4,2,4,129,245,4,129,242,0,240,0,119,0,25,134,212,199,40,170,111,254,186,3,111,120,42,77,1,145,170,206,45,114,49,15,174,206,93,112,65,45,37,76,199,212,0,0,1,154,210,16,205,179,0,0,4,3,0,72,48,70,2,33,0,128,185,119,101,120,14,216,52,202,194,93,53,190,252,155,52,169,126,69,160,155,174,223,239,15,251,163,207,212,56,97,35,2,33,0,131,16,157,170,200,179,221,98,118,49,196,5,72,243,118,196,4,17,137,110,189,79,109,198,66,111,161,240,136,157,237,0,0,117,0,14,87,148,188,243,174,169,62,51,27,44,153,7,179,247,144,223,155,194,61,113,50,37,221,33,169,37,172,97,197,78,33,0,0,1,154,210,16,205,166,0,0,4,3,0,70,48,68,2,32,67,134,180,233,65,47,22,177,58,21,72,99,33,212,236,200,79,8,45,145,73,62,47,165,1,130,105,206,66,179,53,220,2,32,82,57,221,208,197,112,41,224,51,27,113,193,143,144,100,83,228,217,80,74,238,167,88,39,58,242,120,162,19,227,74,117,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,3,130,1,1,0,28,243,11,157,177,155,203,221,38,148,144,87,213,32,93,177,9,183,110,175,103,91,98,223,115,107,217,32,229,68,205,149,61,66,11,159,149,63,196,71,249,201,35,49,41,159,136,190,151,205,238,145,103,198,78,98,192,157,56,138,242,242,186,193,95,223,75,248,45,238,59,67,139,82,211,118,214,65,237,74,215,45,171,27,66,33,174,130,81,245,145,180,245,193,203,235,169,71,241,74,60,180,145,129,228,230,204,99,73,17,79,12,126,24,73,77,248,111,193,90,132,154,219,211,99,94,225,230,72,108,45,141,123,84,105,246,170,249,3,78,155,133,162,245,136,181,159,60,14,52,201,130,150,65,37,138,88,197,159,120,249,93,217,133,96,202,170,232,196,239,1,168,102,37,216,219,250,33,15,143,45,31,144,199,252,192,24,194,105,47,241,146,45,162,180,193,159,174,154,122,52,226,49,246,58,32,218,216,249,238,59,8,183,74,164,48,33,219,130,105,143,202,212,252,92,136,248,141,127,246,57,51,250,221,84,11,84,201,176,61,155,8,145,60,123,75,41,124,230,205,132,249,197,96,128,210,164,2,4,0,166,17,4,15,97,112,105,46,112,100,102,115,104,105,102,116,46,105,111,169,4,2,2,28,32,170,34,4,32,191,237,8,199,155,240,118,110,241,54,200,182,240,238,16,51,255,32,205,35,112,213,236,146,130,135,166,145,236,36,244,23,174,6,2,4,91,72,53,72,179,3,2,1,29],{},{"servername":"87","noDelay":true,"path":null},"http:",{},{},{},["277","278","279","280","281","282","283","284","285","286","287","288","289","290","291","292","293","294","295","143","296","297","298","299","300","301","302","303","304","305","306","307","308","309","310"],{"100":"311","101":"312","102":"313","103":"314","200":"70","201":"315","202":"316","203":"317","204":"318","205":"319","206":"320","207":"321","208":"322","226":"323","300":"324","301":"325","302":"326","303":"327","304":"328","305":"329","307":"330","308":"331","400":"332","401":"333","402":"334","403":"335","404":"336","405":"337","406":"338","407":"339","408":"340","409":"341","410":"342","411":"343","412":"344","413":"345","414":"346","415":"347","416":"348","417":"349","418":"350","421":"351","422":"352","423":"353","424":"354","425":"355","426":"356","428":"357","429":"358","431":"359","451":"360","500":"361","501":"362","502":"363","503":"364","504":"365","505":"366","506":"367","507":"368","508":"369","509":"370","510":"371","511":"372"},{"_events":"373","_eventsCount":2,"options":"374","defaultPort":80,"protocol":"269","requests":"375","sockets":"376","freeSockets":"377","keepAliveMsecs":1000,"keepAlive":true,"maxSockets":null,"maxFreeSockets":256,"scheduling":"166","maxTotalSockets":null,"totalSocketCount":0,"agentKeepAliveTimeoutBuffer":1000},{"_events":"378","_eventsCount":2,"options":"379","defaultPort":443,"protocol":"145","requests":"380","sockets":"381","freeSockets":"382","keepAliveMsecs":1000,"keepAlive":true,"maxSockets":null,"maxFreeSockets":256,"scheduling":"166","maxTotalSockets":null,"totalSocketCount":1,"agentKeepAliveTimeoutBuffer":1000,"maxCachedSessions":100,"_sessionCache":"383"},"ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE","Continue","Switching Protocols","Processing","Early Hints","Created","Accepted","Non-Authoritative Information","No Content","Reset Content","Partial Content","Multi-Status","Already Reported","IM Used","Multiple Choices","Moved Permanently","Found","See Other","Not Modified","Use Proxy","Temporary Redirect","Permanent Redirect","Bad Request","Unauthorized","Payment Required","Forbidden","Not Found","Method Not Allowed","Not Acceptable","Proxy Authentication Required","Request Timeout","Conflict","Gone","Length Required","Precondition Failed","Payload Too Large","URI Too Long","Unsupported Media Type","Range Not Satisfiable","Expectation Failed","I'm a Teapot","Misdirected Request","Unprocessable Entity","Locked","Failed Dependency","Too Early","Upgrade Required","Precondition Required","Too Many Requests","Request Header Fields Too Large","Unavailable For Legal Reasons","Internal Server Error","Not Implemented","Bad Gateway","Service Unavailable","Gateway Timeout","HTTP Version Not Supported","Variant Also Negotiates","Insufficient Storage","Loop Detected","Bandwidth Limit Exceeded","Not Extended","Network Authentication Required",{},{"keepAlive":true,"scheduling":"166","timeout":5000,"noDelay":true,"path":null},{},{},{},{},{"keepAlive":true,"scheduling":"166","timeout":5000,"defaultPort":443,"protocol":"145","noDelay":true,"path":null},{},{},{"telemetry.n8n.io:443:::::::::::::::::::::":"384"},{"map":"385","list":"386"},["387"],{"telemetry.n8n.io:443:::::::::::::::::::::":"388"},["389"],{"_tlsOptions":"390","_secureEstablished":true,"_securePending":false,"_newSessionPending":false,"_controlReleased":true,"secureConnecting":false,"_SNICallback":null,"servername":"391","alpnProtocol":false,"authorized":true,"authorizationError":null,"encrypted":true,"_events":"392","_eventsCount":9,"connecting":false,"_hadError":false,"_parent":null,"_host":"391","_closeAfterHandlingError":false,"_readableState":"393","_writableState":"394","allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"69","_server":null,"ssl":"395","_requestCert":true,"_rejectUnauthorized":true,"timeout":5000,"parser":null,"_httpMessage":null},{"type":"265","data":"396"},"telemetry.n8n.io:443:::::::::::::::::::::",{"pipe":false,"secureContext":"397","isServer":false,"requestCert":true,"rejectUnauthorized":true,"session":"398"},"telemetry.n8n.io",{"close":"399","timeout":"400"},{"highWaterMark":65536,"buffer":"401","bufferIndex":0,"length":0,"pipes":"402","awaitDrainWriters":null},{"highWaterMark":65536,"length":0,"corked":0,"writelen":0,"bufferedIndex":0,"pendingcb":0},{"_parent":"403","_parentWrap":null,"_secureContext":"397","reading":true},[48,130,4,236,2,1,1,2,2,3,4,4,2,19,2,4,32,24,165,103,115,67,144,150,34,172,189,200,177,164,214,76,3,13,120,239,214,140,249,111,169,168,139,2,109,139,185,21,224,4,48,53,21,178,200,53,36,106,91,104,15,10,14,124,88,143,20,95,62,220,175,169,176,181,17,81,54,145,55,44,18,175,141,53,196,178,61,199,29,174,233,206,37,105,201,181,175,36,233,161,6,2,4,105,92,80,107,162,4,2,2,28,32,163,130,3,135,48,130,3,131,48,130,3,8,160,3,2,1,2,2,18,6,197,170,36,211,13,220,237,231,226,250,187,144,97,180,74,24,46,48,10,6,8,42,134,72,206,61,4,3,3,48,50,49,11,48,9,6,3,85,4,6,19,2,85,83,49,22,48,20,6,3,85,4,10,19,13,76,101,116,39,115,32,69,110,99,114,121,112,116,49,11,48,9,6,3,85,4,3,19,2,69,56,48,30,23,13,50,54,48,49,48,50,48,48,50,55,49,57,90,23,13,50,54,48,52,48,50,48,48,50,55,49,56,90,48,17,49,15,48,13,6,3,85,4,3,19,6,110,56,110,46,105,111,48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,211,174,61,128,47,240,248,241,234,21,116,150,42,179,46,240,129,213,39,54,31,110,227,236,110,69,66,142,168,163,145,17,16,173,24,162,208,109,128,17,118,230,102,224,180,228,94,253,12,138,106,253,101,6,198,43,21,218,217,83,12,31,61,169,163,130,2,29,48,130,2,25,48,14,6,3,85,29,15,1,1,255,4,4,3,2,7,128,48,29,6,3,85,29,37,4,22,48,20,6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,29,6,3,85,29,14,4,22,4,20,78,175,69,224,96,124,252,186,40,233,46,76,32,57,246,237,0,54,100,102,48,31,6,3,85,29,35,4,24,48,22,128,20,143,13,19,162,246,46,126,209,80,108,51,24,56,93,89,142,35,114,145,202,48,50,6,8,43,6,1,5,5,7,1,1,4,38,48,36,48,34,6,8,43,6,1,5,5,7,48,2,134,22,104,116,116,112,58,47,47,101,56,46,105,46,108,101,110,99,114,46,111,114,103,47,48,27,6,3,85,29,17,4,20,48,18,130,8,42,46,110,56,110,46,105,111,130,6,110,56,110,46,105,111,48,19,6,3,85,29,32,4,12,48,10,48,8,6,6,103,129,12,1,2,1,48,45,6,3,85,29,31,4,38,48,36,48,34,160,32,160,30,134,28,104,116,116,112,58,47,47,101,56,46,99,46,108,101,110,99,114,46,111,114,103,47,52,55,46,99,114,108,48,130,1,3,6,10,43,6,1,4,1,214,121,2,4,2,4,129,244,4,129,241,0,239,0,118,0,203,56,247,21,137,124,132,161,68,95,91,193,221,251,201,110,242,154,89,205,71,10,105,5,133,176,203,20,195,20,88,231,0,0,1,155,124,79,152,228,0,0,4,3,0,71,48,69,2,32,83,164,25,190,193,138,81,65,4,29,200,67,33,228,159,132,248,201,79,76,34,164,139,91,241,163,70,139,7,130,56,189,2,33,0,151,213,95,97,101,188,252,190,211,33,36,94,112,67,24,59,71,244,136,186,48,109,36,64,58,219,51,220,143,47,218,220,0,117,0,150,151,100,191,85,88,151,173,247,67,135,104,55,8,66,119,233,240,58,213,246,164,243,54,110,70,164,63,15,202,169,198,0,0,1,155,124,79,153,17,0,0,4,3,0,70,48,68,2,32,70,201,88,182,206,159,158,188,13,55,249,206,160,255,228,255,72,206,70,166,8,10,168,202,68,86,19,172,3,54,171,16,2,32,57,84,155,163,101,86,224,83,58,130,34,230,31,120,239,96,16,5,49,158,14,13,81,222,31,210,239,245,184,185,186,236,48,10,6,8,42,134,72,206,61,4,3,3,3,105,0,48,102,2,49,0,146,136,16,88,236,32,141,155,94,106,213,247,1,43,117,52,231,251,124,78,207,11,147,41,90,246,192,185,88,149,2,75,35,119,135,119,110,222,68,210,45,212,72,239,45,4,94,214,2,49,0,215,219,172,179,221,249,93,191,225,252,157,50,178,185,115,122,97,114,7,16,247,76,123,176,186,139,113,135,127,54,137,45,118,178,20,130,5,47,168,57,30,18,213,140,242,119,97,145,164,2,4,0,166,18,4,16,116,101,108,101,109,101,116,114,121,46,110,56,110,46,105,111,169,5,2,3,0,253,32,170,129,195,4,129,192,213,183,81,239,172,66,156,126,252,41,110,221,128,172,62,17,118,123,47,59,216,123,139,218,222,9,56,211,194,84,223,240,80,77,149,252,151,91,255,200,4,68,154,9,53,41,234,177,24,159,164,206,114,215,36,154,113,16,154,26,116,208,82,206,196,0,2,39,75,25,61,42,102,220,159,13,249,7,196,70,139,12,48,16,236,203,123,57,78,53,73,139,239,59,93,174,34,214,185,94,68,243,92,105,22,95,142,234,184,163,211,14,86,167,114,198,239,179,13,229,144,221,154,153,178,63,172,65,104,92,24,197,232,116,157,226,30,82,90,202,93,216,183,37,43,36,233,33,116,108,170,70,167,215,83,13,123,200,55,225,84,98,2,239,41,200,2,144,66,169,242,250,58,242,71,95,224,176,186,60,61,0,154,32,108,89,223,254,116,123,18,46,174,7,2,5,0,140,137,0,135,179,4,2,2,17,236],{"context":"404"},{"type":"265","data":"405"},[null,null,null],[null,null],[],[],{"reading":true,"onconnection":null},{},[48,130,4,236,2,1,1,2,2,3,4,4,2,19,2,4,32,160,217,202,228,199,162,67,88,93,144,104,53,59,137,103,185,188,178,4,206,142,203,218,168,52,235,174,164,29,246,84,158,4,48,121,151,133,190,124,230,88,223,57,165,191,253,170,205,202,43,124,229,241,96,177,25,220,43,169,222,184,36,205,85,80,63,228,36,17,175,128,70,242,33,186,79,201,229,68,114,34,176,161,6,2,4,105,92,80,90,162,4,2,2,28,32,163,130,3,135,48,130,3,131,48,130,3,8,160,3,2,1,2,2,18,6,197,170,36,211,13,220,237,231,226,250,187,144,97,180,74,24,46,48,10,6,8,42,134,72,206,61,4,3,3,48,50,49,11,48,9,6,3,85,4,6,19,2,85,83,49,22,48,20,6,3,85,4,10,19,13,76,101,116,39,115,32,69,110,99,114,121,112,116,49,11,48,9,6,3,85,4,3,19,2,69,56,48,30,23,13,50,54,48,49,48,50,48,48,50,55,49,57,90,23,13,50,54,48,52,48,50,48,48,50,55,49,56,90,48,17,49,15,48,13,6,3,85,4,3,19,6,110,56,110,46,105,111,48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,211,174,61,128,47,240,248,241,234,21,116,150,42,179,46,240,129,213,39,54,31,110,227,236,110,69,66,142,168,163,145,17,16,173,24,162,208,109,128,17,118,230,102,224,180,228,94,253,12,138,106,253,101,6,198,43,21,218,217,83,12,31,61,169,163,130,2,29,48,130,2,25,48,14,6,3,85,29,15,1,1,255,4,4,3,2,7,128,48,29,6,3,85,29,37,4,22,48,20,6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,29,6,3,85,29,14,4,22,4,20,78,175,69,224,96,124,252,186,40,233,46,76,32,57,246,237,0,54,100,102,48,31,6,3,85,29,35,4,24,48,22,128,20,143,13,19,162,246,46,126,209,80,108,51,24,56,93,89,142,35,114,145,202,48,50,6,8,43,6,1,5,5,7,1,1,4,38,48,36,48,34,6,8,43,6,1,5,5,7,48,2,134,22,104,116,116,112,58,47,47,101,56,46,105,46,108,101,110,99,114,46,111,114,103,47,48,27,6,3,85,29,17,4,20,48,18,130,8,42,46,110,56,110,46,105,111,130,6,110,56,110,46,105,111,48,19,6,3,85,29,32,4,12,48,10,48,8,6,6,103,129,12,1,2,1,48,45,6,3,85,29,31,4,38,48,36,48,34,160,32,160,30,134,28,104,116,116,112,58,47,47,101,56,46,99,46,108,101,110,99,114,46,111,114,103,47,52,55,46,99,114,108,48,130,1,3,6,10,43,6,1,4,1,214,121,2,4,2,4,129,244,4,129,241,0,239,0,118,0,203,56,247,21,137,124,132,161,68,95,91,193,221,251,201,110,242,154,89,205,71,10,105,5,133,176,203,20,195,20,88,231,0,0,1,155,124,79,152,228,0,0,4,3,0,71,48,69,2,32,83,164,25,190,193,138,81,65,4,29,200,67,33,228,159,132,248,201,79,76,34,164,139,91,241,163,70,139,7,130,56,189,2,33,0,151,213,95,97,101,188,252,190,211,33,36,94,112,67,24,59,71,244,136,186,48,109,36,64,58,219,51,220,143,47,218,220,0,117,0,150,151,100,191,85,88,151,173,247,67,135,104,55,8,66,119,233,240,58,213,246,164,243,54,110,70,164,63,15,202,169,198,0,0,1,155,124,79,153,17,0,0,4,3,0,70,48,68,2,32,70,201,88,182,206,159,158,188,13,55,249,206,160,255,228,255,72,206,70,166,8,10,168,202,68,86,19,172,3,54,171,16,2,32,57,84,155,163,101,86,224,83,58,130,34,230,31,120,239,96,16,5,49,158,14,13,81,222,31,210,239,245,184,185,186,236,48,10,6,8,42,134,72,206,61,4,3,3,3,105,0,48,102,2,49,0,146,136,16,88,236,32,141,155,94,106,213,247,1,43,117,52,231,251,124,78,207,11,147,41,90,246,192,185,88,149,2,75,35,119,135,119,110,222,68,210,45,212,72,239,45,4,94,214,2,49,0,215,219,172,179,221,249,93,191,225,252,157,50,178,185,115,122,97,114,7,16,247,76,123,176,186,139,113,135,127,54,137,45,118,178,20,130,5,47,168,57,30,18,213,140,242,119,97,145,164,2,4,0,166,18,4,16,116,101,108,101,109,101,116,114,121,46,110,56,110,46,105,111,169,5,2,3,0,253,32,170,129,195,4,129,192,213,183,81,239,172,66,156,126,252,41,110,221,128,172,62,17,30,143,233,13,56,120,233,134,39,123,162,9,190,116,207,74,78,145,20,127,106,104,220,67,230,134,149,66,8,167,234,142,38,140,170,115,84,155,23,151,102,177,100,206,13,241,27,239,27,5,239,29,80,237,26,148,205,79,129,22,98,124,232,81,255,194,148,55,43,209,130,83,169,153,35,174,184,168,201,106,153,253,194,97,87,111,157,113,242,198,4,2,190,126,86,175,58,150,44,130,74,78,110,220,118,146,222,129,94,208,219,163,133,34,22,232,150,78,148,146,169,132,55,36,233,1,186,72,138,26,207,232,113,25,103,138,202,243,95,19,7,207,106,204,94,74,173,59,70,11,138,210,122,243,24,143,99,161,184,34,120,249,246,61,173,190,236,232,249,164,63,225,134,46,190,163,174,7,2,5,0,170,68,118,169,179,4,2,2,17,236]]


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>${$json.body.empresa}</strong></p>\n    <p><span class=\"label\">CUIT / ID:</span> ${$json.body.cuit ? $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> ${$json.body.nombre_reserva}</p>\n    <p><span class=\"label\">Email:</span> ${$json.body.email_responsable}</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":[-2192,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"}],"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":"3. Email con PDF","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}]]}},"settings":{"executionOrder":"v1"},"pinData":{}}

data:
  [{"startData":"1","resultData":"2","executionData":"3"},{"destinationNode":"4","runNodeFilter":"5"},{"runData":"6","pinData":"7","lastNodeExecuted":"4","error":"8"},{"contextData":"9","nodeExecutionStack":"10","metadata":"11","waitingExecution":"12","waitingExecutionSource":"13"},"Generar Lógica PDF",["14","15","4","16","17"],{"Webhook Formulario":"18","1. Guardar Lead":"19","2. Email Confirmación":"20","Esperar 15 Min1":"21","Generar Lógica PDF":"22"},{},{"level":"23","tags":"24","description":"25","lineNumber":116,"message":"26","stack":"27"},{},["28"],{},{},{},"Webhook Formulario","Esperar 15 Min1","2. Email Confirmación","1. Guardar Lead",["29"],["30"],["31"],["32"],["33"],"error",{},"TypeError","Cannot read properties of undefined (reading 'empresa') [line 116]","TypeError: Cannot read properties of undefined (reading 'empresa')\n    at VmCodeWrapper (evalmachine.<anonymous>:116:65)\n    at evalmachine.<anonymous>:176:2\n    at Script.runInContext (node:vm:149:12)\n    at runInContext (node:vm:301:6)\n    at result (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+task-runner@file+packages+@n8n+task-runner_@opentelemetry+api@1.9.0_@opentelemetry_5147392a3f2dab4b87aa45b14b25796a/node_modules/@n8n/task-runner/dist/js-task-runner/js-task-runner.js:176:61)\n    at new Promise (<anonymous>)\n    at JsTaskRunner.runForAllItems (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+task-runner@file+packages+@n8n+task-runner_@opentelemetry+api@1.9.0_@opentelemetry_5147392a3f2dab4b87aa45b14b25796a/node_modules/@n8n/task-runner/dist/js-task-runner/js-task-runner.js:169:34)\n    at JsTaskRunner.executeTask (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+task-runner@file+packages+@n8n+task-runner_@opentelemetry+api@1.9.0_@opentelemetry_5147392a3f2dab4b87aa45b14b25796a/node_modules/@n8n/task-runner/dist/js-task-runner/js-task-runner.js:119:26)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.waitingForSettings (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+task-runner@file+packages+@n8n+task-runner_@opentelemetry+api@1.9.0_@opentelemetry_5147392a3f2dab4b87aa45b14b25796a/node_modules/@n8n/task-runner/dist/task-runner.js:256:17)",{"node":"34","data":"35","source":"36"},{"startTime":1767656689593,"executionIndex":0,"source":"37","hints":"38","executionTime":1,"executionStatus":"39","data":"40"},{"startTime":1767656811524,"executionIndex":1,"source":"41","hints":"42","executionTime":2533,"executionStatus":"39","data":"43"},{"startTime":1767656845503,"executionIndex":2,"source":"44","hints":"45","executionTime":1604,"executionStatus":"39","data":"46"},{"startTime":1767657537533,"executionIndex":3,"source":"47","hints":"48","executionTime":15002,"executionStatus":"39","data":"49"},{"startTime":1767657979230,"executionIndex":4,"source":"50","hints":"51","executionTime":77,"executionStatus":"23","error":"52"},{"parameters":"53","id":"54","name":"4","type":"55","typeVersion":2,"position":"56"},{"main":"57"},{"main":"50"},[],[],"success",{"main":"58"},["59"],[],{"main":"60"},["61"],[],{"main":"62"},["63"],[],{"main":"64"},["65"],[],{"level":"23","tags":"24","description":"25","lineNumber":116,"message":"26","stack":"27"},{"mode":"66","language":"67","jsCode":"68","notice":"69"},"f1b4a932-5223-4200-a86e-4fda06ead960","n8n-nodes-base.code",[-2624,256],["70"],["71"],{"previousNode":"14","previousNodeOutput":0,"previousNodeRun":0},["72"],{"previousNode":"17","previousNodeOutput":0,"previousNodeRun":0},["73"],{"previousNode":"16","previousNodeOutput":0,"previousNodeRun":0},["74"],{"previousNode":"15","previousNodeOutput":0,"previousNodeRun":0},"runOnceForAllItems","javaScript","// 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>${$json.body.empresa}</strong></p>\n    <p><span class=\"label\">CUIT / ID:</span> ${$json.body.cuit ? $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> ${$json.body.nombre_reserva}</p>\n    <p><span class=\"label\">Email:</span> ${$json.body.email_responsable}</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}];","",["75"],["76"],["77"],["78"],["79"],{"json":"80","pairedItem":"81"},{"json":"82","pairedItem":"83"},{"json":"84","pairedItem":"85"},{"json":"86","pairedItem":"87"},{"json":"80","pairedItem":"88"},{"accepted":"89","rejected":"90","ehlo":"91","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"92","envelope":"93","messageId":"94"},{"item":0},{"headers":"95","params":"96","query":"97","body":"98","webhookUrl":"99","executionMode":"100"},{"item":0},{"Fecha":"101","Nombre":"102","Apellido":"103","Empresa":"104","CUIT":"69","Email":"105","Teléfono":"106","Plan":"107","Cursos":"108"},{"item":0},{"accepted":"109","rejected":"110","ehlo":"111","envelopeTime":498,"messageTime":261,"messageSize":1174,"response":"92","envelope":"112","messageId":"94"},{"item":0},{"item":0},["105"],[],["113","114","115","116","117","118","119","120"],"250 2.0.0 Ok: queued as 4dlWDt4cDXz1xnX",{"from":"121","to":"122"},"<fd2e0a66-ca68-ae80-e3d2-26411b98c8bf@info.excelcertify.com>",{"host":"123","user-agent":"124","content-length":"125","accept":"126","accept-encoding":"127","accept-language":"128","content-type":"129","origin":"130","priority":"131","referer":"132","sec-ch-ua":"133","sec-ch-ua-mobile":"134","sec-ch-ua-platform":"135","sec-fetch-dest":"136","sec-fetch-mode":"137","sec-fetch-site":"138","x-forwarded-for":"139","x-forwarded-host":"123","x-forwarded-port":"140","x-forwarded-proto":"141","x-forwarded-server":"142","x-real-ip":"139"},{},{},{"nombre":"102","apellido":"103","empresa":"104","cuit":"69","email":"105","telefono":"106","plan_detalle":"107","cursos[]":"143","cursos":"108"},"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",["105"],[],["113","114","115","116","117","118","119","120"],{"from":"121","to":"144"},"PIPELINING","SIZE 48811212","ETRN","AUTH PLAIN LOGIN","ENHANCEDSTATUSCODES","8BITMIME","DSN","CHUNKING","avisos@info.excelcertify.com",["105"],"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",["105"]]


