From 2a1db1003f047da9ff9e38767118ab7392ade777 Mon Sep 17 00:00:00 2001 From: EidanThen Date: Tue, 16 Jun 2026 21:02:21 +0000 Subject: [PATCH] Update glmway-workflow.json --- glmway-workflow.json | 2832 ++++++++++++++++++++++++++++++++---------- 1 file changed, 2189 insertions(+), 643 deletions(-) diff --git a/glmway-workflow.json b/glmway-workflow.json index b210179..f83a813 100644 --- a/glmway-workflow.json +++ b/glmway-workflow.json @@ -1,6 +1,6 @@ { "$json": { - "updatedAt": "2026-06-16T19:03:50.744Z", + "updatedAt": "2026-06-16T21:02:08.912Z", "createdAt": "2026-06-08T13:50:12.174Z", "id": "F1iPg8hktNAebZua", "name": "GLMWay", @@ -30,7 +30,7 @@ "typeVersion": 1, "position": [ 2368, - 640 + 800 ], "id": "a2082638-94e3-4a91-aeac-f7849833a6a1", "name": "When clicking ‘Execute workflow’" @@ -50,7 +50,7 @@ "typeVersion": 4.4, "position": [ 3328, - 752 + 912 ], "id": "e428eaaf-f678-45ac-bbcc-926f8bd574b7", "name": "Subir archivo", @@ -77,7 +77,7 @@ "typeVersion": 4.4, "position": [ 2720, - 640 + 800 ], "id": "58d2c064-8982-42b0-8f1a-a10d018dff94", "name": "Obtener archivo", @@ -104,7 +104,7 @@ "typeVersion": 4.4, "position": [ 3328, - 544 + 704 ], "id": "f804d797-946f-4673-8291-308d47ede436", "name": "Actualizar archivo", @@ -130,7 +130,7 @@ "typeVersion": 1, "position": [ 2976, - 544 + 704 ], "id": "a6420476-f217-4079-b7a0-194969a2dac2", "name": "Get a workflow1", @@ -156,7 +156,7 @@ "typeVersion": 1, "position": [ 2976, - 752 + 912 ], "id": "f96e2477-f9db-4d36-a162-836d05dcd8ab", "name": "Get a workflow2", @@ -197,7 +197,7 @@ "typeVersion": 3.4, "position": [ 2544, - 640 + 800 ], "id": "fa4f3a95-6fe7-41c4-9a90-f4a3f58e06a8", "name": "Valores" @@ -210,7 +210,7 @@ "typeVersion": 2, "position": [ 3152, - 544 + 704 ], "id": "5d50d650-f0b6-4046-b9c1-974664b655f6", "name": "Code in JavaScript2" @@ -223,7 +223,7 @@ "typeVersion": 2, "position": [ 3152, - 752 + 912 ], "id": "30ffb25f-3ad7-465d-9630-887828df95f6", "name": "Code in JavaScript4" @@ -247,7 +247,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 2480, + 2544, -352 ], "id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be", @@ -411,7 +411,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2528, + 2592, -176 ], "id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2", @@ -506,8 +506,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - -384 + -656, + 1888 ], "id": "92aaf072-5cf8-4ffd-b641-20fa5fb88103", "name": "Comenzo evento ingles", @@ -541,8 +541,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - -208 + -656, + 2064 ], "id": "34eb762f-b9c7-4a72-94ce-3ce246c7c790", "name": "Comenzo evento español", @@ -576,8 +576,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - 160 + -656, + 2432 ], "id": "e0c4da60-bbbe-4cc1-b340-1749e204b6b2", "name": "Termino evento español", @@ -611,8 +611,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - -16 + -656, + 2256 ], "id": "cd1a89d4-21e5-475e-93ed-4f00bbfd0190", "name": "Termino evento ingles", @@ -694,8 +694,8 @@ "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.3, "position": [ - 2720, - 1024 + 2528, + 1584 ], "id": "7f7d71b2-6c53-49a2-92d8-e66b2d0bff54", "name": "Schedule Trigger" @@ -719,7 +719,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2336, + 2400, -224 ], "id": "77e81486-bffe-457d-8bc0-442c25ff4512", @@ -988,8 +988,8 @@ }, "type": "n8n-nodes-base.stickyNote", "position": [ - 1216, - 16 + 1104, + -32 ], "typeVersion": 1, "id": "719365c8-8099-4108-a910-83b651d81181", @@ -1165,14 +1165,14 @@ { "parameters": { "content": "## Recordatorio a nuevo ingreso 24 horas antes de la sesion\n", - "height": 544, - "width": 1392, + "height": 464, + "width": 1728, "color": 6 }, "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 768 + 736 ], "typeVersion": 1, "id": "ba58d863-3211-4f53-b087-eb53ba839499", @@ -1181,14 +1181,14 @@ { "parameters": { "content": "## Recordatorio a coordinador RRHH 48 horas antes de la sesion\n", - "height": 544, - "width": 1392, + "height": 496, + "width": 1728, "color": 6 }, "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 1424 + 1280 ], "typeVersion": 1, "id": "e32bdd94-d61e-4b43-bf60-7acab8c0d3ae", @@ -1204,7 +1204,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 2768 + 2672 ], "typeVersion": 1, "id": "6d5c0fe5-5ab1-4cdc-bfd2-197dc2144274", @@ -1214,7 +1214,7 @@ "parameters": { "content": "## Notificacion inicial\n\nEnvia notificacion de sesion en el primer dia de trabajo del empleado", "height": 608, - "width": 2016, + "width": 2448, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -1277,8 +1277,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - 320 + -656, + 2592 ], "id": "35ec709a-30fd-4e3b-8492-cf6d8928e372", "name": "Prueba", @@ -1291,9 +1291,9 @@ }, { "parameters": { - "content": "## Completar datos ", + "content": "## Completar datos y enviar invitacion", "height": 544, - "width": 1392, + "width": 3328, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -1346,7 +1346,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 736, + 944, 352 ], "id": "15a1892d-01e8-432c-91f1-db236317cbca", @@ -1442,8 +1442,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1360, - 272 + 1136, + 352 ], "id": "ce9f31d4-454e-4e31-9a22-8173b3fae392", "name": "Pais?1" @@ -1466,7 +1466,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2112, + 2176, -64 ], "id": "00c87312-256a-4738-856d-e92b9e144c75", @@ -1496,7 +1496,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2112, + 2176, -240 ], "id": "b3c26eeb-2ff9-42c9-b5cc-fe0776e53c46", @@ -1535,8 +1535,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 1120, - 352 + 2432, + 368 ], "id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4", "name": "Hay coordinador?1" @@ -1580,7 +1580,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 1360, + 2608, 448 ], "id": "67928478-7604-45a4-9ab0-851079e1470c", @@ -1600,8 +1600,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 2304, - 368 + 2080, + 448 ], "id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b", "name": "Send a message espanol1", @@ -1627,8 +1627,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 2304, - 192 + 2080, + 272 ], "id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4", "name": "Send a message ingles1", @@ -1793,7 +1793,7 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 2480, + 2784, 368 ], "id": "98185de1-e81a-440f-8951-f98bd78c707b", @@ -1802,7 +1802,7 @@ }, { "parameters": { - "content": "## Enviar listado de inscritos al facilitador antes de iniciar la sesion\n", + "content": "## Enviar listado de inscritos al facilitador antes de iniciar el evento", "height": 544, "width": 1392, "color": 6 @@ -1821,7 +1821,7 @@ "sendTo": "eidan.then14@gmail.com", "subject": "Entrenamiento #TheGLMWay", "emailType": "text", - "message": "=Hola, GLMer!\n\nEn este entrenamiento queremos transmitirte nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\nTe esperamos puntual y con todas las ganas de aprender.\n\nNos vemos en el enlace!\n\n{{ $json.conferenceData.entryPoints[0].uri }}", + "message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}", "options": { "appendAttribution": false } @@ -1829,8 +1829,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 992, - 1104 + 800, + 928 ], "id": "10b2cb4e-274d-4913-9345-2c024c071f4c", "name": "Send a message espanol2", @@ -1848,7 +1848,7 @@ "sendTo": "eidan.then14@gmail.com", "subject": "#TheGLMWay Training", "emailType": "text", - "message": "=Hello, GLMer!\n\nIn this training we want to share our culture, our DNA, and why we are different from the rest.\n\nWe look forward to seeing you on time and eager to learn.\n\nSee you at the link!\n\n{{ $json.conferenceData.entryPoints[0].uri }}", + "message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}", "options": { "appendAttribution": false } @@ -1856,8 +1856,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 992, - 928 + 800, + 752 ], "id": "1dc76989-8c58-4ffe-9e1c-5113a59d346c", "name": "Send a message ingles2", @@ -1884,7 +1884,7 @@ "typeVersion": 1.3, "position": [ -352, - 1008 + 928 ], "id": "60708d5c-0cd7-45fc-bb67-ed050c1f8022", "name": "Schedule Trigger2" @@ -1917,34 +1917,6 @@ } } }, - { - "parameters": { - "operation": "get", - "tableId": "inscritos_glmway", - "filters": { - "conditions": [ - { - "keyName": "estado", - "keyValue": "activo" - } - ] - } - }, - "type": "n8n-nodes-base.supabase", - "typeVersion": 1, - "position": [ - -176, - 1008 - ], - "id": "34aa0bc5-0feb-46e3-871b-27a1cc418675", - "name": "Obtener activos", - "credentials": { - "supabaseApi": { - "id": "2PlsR6rpK7rQTIEn", - "name": "Sofia test - Supabase account" - } - } - }, { "parameters": { "documentId": { @@ -2024,8 +1996,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 960, - 352 + 2272, + 368 ], "id": "3a6f198b-e136-49fb-a171-78164e10b600", "name": "Obtener coordinador1", @@ -2037,36 +2009,6 @@ } } }, - { - "parameters": { - "tableId": "inscritos_glmway", - "fieldsUi": { - "fieldValues": [ - { - "fieldId": "empleado_id" - }, - { - "fieldId": "estado", - "fieldValue": "notificado" - } - ] - } - }, - "type": "n8n-nodes-base.supabase", - "typeVersion": 1, - "position": [ - 1216, - 832 - ], - "id": "ddf0a273-d3bc-44cc-888b-d789ce72ff77", - "name": "Actualizar estado a notificado", - "credentials": { - "supabaseApi": { - "id": "2PlsR6rpK7rQTIEn", - "name": "Sofia test - Supabase account" - } - } - }, { "parameters": { "options": {} @@ -2075,7 +2017,7 @@ "typeVersion": 3, "position": [ 0, - 1008 + 928 ], "id": "9e8fd238-541e-455b-8ae5-6a3097eb38a0", "name": "Loop Over Items1" @@ -2087,8 +2029,8 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 1184, - 1104 + 1200, + 1072 ], "id": "ee5bb9bc-b8cb-493f-8463-ae0a24cf1f0d", "name": "Wait1", @@ -2106,7 +2048,7 @@ "conditions": [ { "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Jamaica", "operator": { "type": "string", @@ -2115,7 +2057,7 @@ }, { "id": "32931394-f4ea-4055-b866-906a81988173", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Trinidad and Tobago", "operator": { "type": "string", @@ -2124,7 +2066,7 @@ }, { "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Barbados", "operator": { "type": "string", @@ -2133,7 +2075,7 @@ }, { "id": "28e49217-0c1a-4462-9642-676e54926d3e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Saint Thomas", "operator": { "type": "string", @@ -2142,7 +2084,7 @@ }, { "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "St. Croix", "operator": { "type": "string", @@ -2151,7 +2093,7 @@ }, { "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Tobago", "operator": { "type": "string", @@ -2160,7 +2102,7 @@ }, { "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Guyana", "operator": { "type": "string", @@ -2169,7 +2111,7 @@ }, { "id": "35a50a33-a2b5-4116-9336-11300357569e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Aruba", "operator": { "type": "string", @@ -2184,8 +2126,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 592, - 1008 + 608, + 832 ], "id": "4d94c907-8ab1-4213-be20-9e24173cf0a3", "name": "Pais?2" @@ -2208,8 +2150,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 800, - 1104 + 1664, + 1248 ], "id": "7dd9a706-4d80-45c6-942a-c703eb074a20", "name": "Entrenamiento español2", @@ -2238,8 +2180,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 800, - 928 + 1664, + 1072 ], "id": "d8253a7a-4e37-4c14-b4da-e0029571cd21", "name": "Entrenamiento ingles5", @@ -2252,13 +2194,13 @@ }, { "parameters": { - "jsCode": "const hireDate = $json.hireDate;\n\n// Fecha de hoy en formato YYYY-MM-DD\nconst today = new Date().toISOString().split('T')[0];\n\n// True si hireDate es hoy o anterior\nconst isValid = hireDate <= today;\n\nreturn [\n {\n json: {\n hireDate,\n today,\n isValid\n }\n }\n];" + "jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\n\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días) o mañana (1 día)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 1;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 208, - 1008 + 928 ], "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", "name": "Calcular fecha hireDate2" @@ -2452,8 +2394,8 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1584, - 192 + 1360, + 272 ], "id": "430a2b66-f0f3-4032-bca1-29b01bd8c577", "name": "Crear variable idioma ES1" @@ -2475,34 +2417,34 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1584, - 368 + 1360, + 448 ], "id": "9d53a7e1-6dab-494b-8064-6c3063f5596f", "name": "Crear variable idioma EN1" }, { "parameters": { - "jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" + "jsCode": "const hireDate = new Date(\n $('Entra hoy?1').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1968, - 192 + 1744, + 272 ], "id": "ee31fd24-d703-44b3-b65b-75234564d29f", "name": "Calcular sesion mas cercana2" }, { "parameters": { - "jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" + "jsCode": "const hireDate = new Date(\n $('Entra hoy?1').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1968, - 368 + 1744, + 448 ], "id": "24f2e53d-9280-445b-b37e-776b41ca53e2", "name": "Calcular sesion mas cercana3" @@ -2542,7 +2484,7 @@ }, { "fieldId": "estado", - "fieldValue": "activo" + "fieldValue": "notificado" }, { "fieldId": "sesion_id", @@ -2601,7 +2543,7 @@ }, { "fieldId": "estado", - "fieldValue": "activo" + "fieldValue": "notificado" }, { "fieldId": "sesion_id", @@ -2641,8 +2583,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1776, - 192 + 1552, + 272 ], "id": "f034ee45-742b-4f18-9003-333a4c087cf7", "name": "Obtener sesiones español1", @@ -2669,8 +2611,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1776, - 368 + 1552, + 448 ], "id": "2c35fe0e-1f32-4263-9c02-c392cb77e0e5", "name": "Obtener sesiones ingles1", @@ -2683,7 +2625,65 @@ }, { "parameters": { + "amount": 2 + }, + "type": "n8n-nodes-base.wait", + "typeVersion": 1.1, + "position": [ + 1136, + 496 + ], + "id": "960e74ae-583b-4802-ab72-3b402c095d9b", + "name": "Wait2", + "webhookId": "1211d7da-55b9-4a73-837d-55934076a799" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "d7d68505-8c34-44cd-b771-56bef28ada41", + "leftValue": "={{ $('Get an employee1').item.json.workEmail }}", + "rightValue": "", + "operator": { + "type": "string", + "operation": "notEmpty", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.3, + "position": [ + 752, + 352 + ], + "id": "a2a81e91-f617-490a-b1ce-5737944fa23b", + "name": "Tiene correo?" + }, + { + "parameters": { + "operation": "update", "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Get an employee1').item.json.id }}" + } + ] + }, "fieldsUi": { "fieldValues": [ { @@ -2716,7 +2716,7 @@ }, { "fieldId": "estado", - "fieldValue": "activo" + "fieldValue": "notificado" }, { "fieldId": "sesion_id", @@ -2728,11 +2728,11 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 2128, - 192 + 1904, + 272 ], "id": "16d364da-e6fc-4943-bd64-f83ccab66b9f", - "name": "Guardar datos del empleado y sesion asignada2", + "name": "Actualizar datos del empleado y sesion asignada2", "credentials": { "supabaseApi": { "id": "2PlsR6rpK7rQTIEn", @@ -2742,7 +2742,17 @@ }, { "parameters": { + "operation": "update", "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Get an employee1').item.json.id }}" + } + ] + }, "fieldsUi": { "fieldValues": [ { @@ -2775,7 +2785,7 @@ }, { "fieldId": "estado", - "fieldValue": "activo" + "fieldValue": "notificado" }, { "fieldId": "sesion_id", @@ -2787,17 +2797,424 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 2128, - 368 + 1904, + 448 ], "id": "d1e51972-c9b0-4dbd-a208-c033e1ca8351", - "name": "Guardar datos del empleado y sesion asignada3", + "name": "Actualizar datos del empleado y sesion asignada3", "credentials": { "supabaseApi": { "id": "2PlsR6rpK7rQTIEn", "name": "Sofia test - Supabase account" } } + }, + { + "parameters": { + "operation": "get", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "estado", + "keyValue": "notificado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + -176, + 928 + ], + "id": "34aa0bc5-0feb-46e3-871b-27a1cc418675", + "name": "Obtener notificados", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", + "leftValue": "={{ $json.isValid }}", + "rightValue": "Jamaica", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "or" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 416, + 928 + ], + "id": "107b41cb-06d5-4e7e-863b-dace19c8d1e9", + "name": "Falta 24h para el evento?" + }, + { + "parameters": { + "operation": "update", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Loop Over Items1').item.json.empleado_id }}" + } + ] + }, + "fieldsUi": { + "fieldValues": [ + { + "fieldId": "estado", + "fieldValue": "recordado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1008, + 848 + ], + "id": "ddf0a273-d3bc-44cc-888b-d789ce72ff77", + "name": "Actualizar estado a recordado", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "sendTo": "eidan.then14@gmail.com", + "subject": "Entrenamiento #TheGLMWay", + "emailType": "text", + "message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}", + "options": { + "appendAttribution": false + } + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.2, + "position": [ + 816, + 1488 + ], + "id": "39331d88-6f2b-4df1-ac76-dda9ff47dfec", + "name": "Send a message espanol3", + "webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2", + "credentials": { + "gmailOAuth2": { + "id": "QWNicjw1khRm5BVI", + "name": "Eidan - Gmail account" + } + }, + "disabled": true + }, + { + "parameters": { + "sendTo": "eidan.then14@gmail.com", + "subject": "#TheGLMWay Training", + "emailType": "text", + "message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}", + "options": { + "appendAttribution": false + } + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.2, + "position": [ + 816, + 1312 + ], + "id": "9d4f57a4-ac2f-49bd-b5fa-50658a8d928e", + "name": "Send a message ingles3", + "webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2", + "credentials": { + "gmailOAuth2": { + "id": "QWNicjw1khRm5BVI", + "name": "Eidan - Gmail account" + } + }, + "disabled": true + }, + { + "parameters": { + "rule": { + "interval": [ + { + "triggerAtHour": 9 + } + ] + } + }, + "type": "n8n-nodes-base.scheduleTrigger", + "typeVersion": 1.3, + "position": [ + -352, + 1488 + ], + "id": "6951af7d-5098-4156-81bd-8f67034fcf70", + "name": "Schedule Trigger3" + }, + { + "parameters": { + "options": {} + }, + "type": "n8n-nodes-base.splitInBatches", + "typeVersion": 3, + "position": [ + 0, + 1488 + ], + "id": "7545364a-df0a-4420-a1af-5bcd4f8c9602", + "name": "Loop Over Items2" + }, + { + "parameters": { + "amount": 2 + }, + "type": "n8n-nodes-base.wait", + "typeVersion": 1.1, + "position": [ + 1200, + 1616 + ], + "id": "617ab85d-23a6-4546-9331-eff343d9b1c5", + "name": "Wait3", + "webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Jamaica", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "32931394-f4ea-4055-b866-906a81988173", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Trinidad and Tobago", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Barbados", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "28e49217-0c1a-4462-9642-676e54926d3e", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Saint Thomas", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "St. Croix", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Tobago", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Guyana", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "35a50a33-a2b5-4116-9336-11300357569e", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Aruba", + "operator": { + "type": "string", + "operation": "equals" + } + } + ], + "combinator": "or" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 624, + 1392 + ], + "id": "13ee807a-f1cd-48ef-921b-7b5c260ba116", + "name": "Pais?3" + }, + { + "parameters": { + "jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\n\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días) o mañana (1 día)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 1;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 208, + 1488 + ], + "id": "3e2b4cde-d7aa-4879-aa55-f1a169c16bd3", + "name": "Calcular fecha hireDate3" + }, + { + "parameters": { + "operation": "get", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "estado", + "keyValue": "notificado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + -176, + 1488 + ], + "id": "0457dbf8-9c04-4f2d-9928-4f770eb51cc0", + "name": "Obtener notificados1", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "update", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Loop Over Items2').item.json.empleado_id }}" + } + ] + }, + "fieldsUi": { + "fieldValues": [ + { + "fieldId": "estado", + "fieldValue": "recordado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1024, + 1408 + ], + "id": "0881ba84-bd04-4e91-9c09-0ba18e28ed28", + "name": "Actualizar estado a recordado1", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", + "leftValue": "={{ $json.isValid }}", + "rightValue": "Jamaica", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "or" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 432, + 1488 + ], + "id": "0fea4950-f873-4375-8964-45cfc3fead02", + "name": "Falta 48h para el evento?1" } ], "connections": { @@ -3045,7 +3462,7 @@ "main": [ [ { - "node": "Entra hoy?1", + "node": "Tiene correo?", "type": "main", "index": 0 } @@ -3056,12 +3473,18 @@ "main": [ [ { - "node": "Obtener coordinador1", + "node": "Pais?1", "type": "main", "index": 0 } ], - [] + [ + { + "node": "Wait2", + "type": "main", + "index": 0 + } + ] ] }, "Pais?1": { @@ -3096,7 +3519,7 @@ "main": [ [ { - "node": "Pais?1", + "node": "Wait", "type": "main", "index": 0 } @@ -3132,7 +3555,7 @@ "main": [ [ { - "node": "Wait", + "node": "Obtener coordinador1", "type": "main", "index": 0 } @@ -3143,7 +3566,7 @@ "main": [ [ { - "node": "Wait", + "node": "Obtener coordinador1", "type": "main", "index": 0 } @@ -3165,7 +3588,7 @@ "main": [ [ { - "node": "Obtener activos", + "node": "Obtener notificados", "type": "main", "index": 0 } @@ -3205,17 +3628,6 @@ ] ] }, - "Obtener activos": { - "main": [ - [ - { - "node": "Loop Over Items1", - "type": "main", - "index": 0 - } - ] - ] - }, "Loop Over Items1": { "main": [ [], @@ -3229,24 +3641,6 @@ ] }, "Pais?2": { - "main": [ - [ - { - "node": "Entrenamiento ingles5", - "type": "main", - "index": 0 - } - ], - [ - { - "node": "Entrenamiento español2", - "type": "main", - "index": 0 - } - ] - ] - }, - "Entrenamiento ingles5": { "main": [ [ { @@ -3254,11 +3648,7 @@ "type": "main", "index": 0 } - ] - ] - }, - "Entrenamiento español2": { - "main": [ + ], [ { "node": "Send a message espanol2", @@ -3268,11 +3658,21 @@ ] ] }, + "Entrenamiento ingles5": { + "main": [ + [] + ] + }, + "Entrenamiento español2": { + "main": [ + [] + ] + }, "Send a message espanol2": { "main": [ [ { - "node": "Wait1", + "node": "Actualizar estado a recordado", "type": "main", "index": 0 } @@ -3283,7 +3683,7 @@ "main": [ [ { - "node": "Wait1", + "node": "Actualizar estado a recordado", "type": "main", "index": 0 } @@ -3382,7 +3782,7 @@ "main": [ [ { - "node": "Guardar datos del empleado y sesion asignada2", + "node": "Actualizar datos del empleado y sesion asignada2", "type": "main", "index": 0 } @@ -3393,7 +3793,7 @@ "main": [ [ { - "node": "Guardar datos del empleado y sesion asignada3", + "node": "Actualizar datos del empleado y sesion asignada3", "type": "main", "index": 0 } @@ -3444,7 +3844,47 @@ ] ] }, - "Guardar datos del empleado y sesion asignada2": { + "Alerta no hay coordinador RRHH1": { + "main": [ + [ + { + "node": "Wait", + "type": "main", + "index": 0 + } + ] + ] + }, + "Wait2": { + "main": [ + [ + { + "node": "Loop Over Items", + "type": "main", + "index": 0 + } + ] + ] + }, + "Tiene correo?": { + "main": [ + [ + { + "node": "Entra hoy?1", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Wait2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar datos del empleado y sesion asignada2": { "main": [ [ { @@ -3455,7 +3895,7 @@ ] ] }, - "Guardar datos del empleado y sesion asignada3": { + "Actualizar datos del empleado y sesion asignada3": { "main": [ [ { @@ -3465,11 +3905,203 @@ } ] ] + }, + "Obtener notificados": { + "main": [ + [ + { + "node": "Loop Over Items1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular fecha hireDate2": { + "main": [ + [ + { + "node": "Falta 24h para el evento?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Falta 24h para el evento?": { + "main": [ + [ + { + "node": "Pais?2", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Wait1": { + "main": [ + [ + { + "node": "Loop Over Items1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar estado a recordado": { + "main": [ + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message espanol3": { + "main": [ + [ + { + "node": "Actualizar estado a recordado1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message ingles3": { + "main": [ + [ + { + "node": "Actualizar estado a recordado1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Schedule Trigger3": { + "main": [ + [ + { + "node": "Obtener notificados1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Loop Over Items2": { + "main": [ + [], + [ + { + "node": "Calcular fecha hireDate3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Wait3": { + "main": [ + [ + { + "node": "Loop Over Items2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Pais?3": { + "main": [ + [ + { + "node": "Send a message ingles3", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Send a message espanol3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular fecha hireDate3": { + "main": [ + [ + { + "node": "Falta 48h para el evento?1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener notificados1": { + "main": [ + [ + { + "node": "Loop Over Items2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar estado a recordado1": { + "main": [ + [ + { + "node": "Wait3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Falta 48h para el evento?1": { + "main": [ + [ + { + "node": "Pais?3", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Wait3", + "type": "main", + "index": 0 + } + ] + ] } }, "settings": { "executionOrder": "v1", - "binaryMode": "separate" + "binaryMode": "separate", + "timeSavedMode": "fixed", + "errorWorkflow": "lX5ITf9s4TSQglsM", + "timezone": "America/Santo_Domingo", + "callerPolicy": "workflowsFromSameOwner", + "availableInMCP": false }, "staticData": { "node:Gmail Trigger": { @@ -3484,22 +4116,25 @@ "recurrenceRules": [] }, "node:Comenzo evento ingles": { - "lastTimeChecked": "2026-06-16T18:59:53Z" + "lastTimeChecked": "2026-06-16T21:02:11Z" }, "node:Comenzo evento español": { - "lastTimeChecked": "2026-06-16T18:59:35Z" + "lastTimeChecked": "2026-06-16T21:02:11Z" }, "node:Termino evento español": { - "lastTimeChecked": "2026-06-16T18:59:55Z" + "lastTimeChecked": "2026-06-16T21:02:11Z" }, "node:Termino evento ingles": { - "lastTimeChecked": "2026-06-16T18:59:24Z" + "lastTimeChecked": "2026-06-16T21:02:11Z" }, "node:Prueba": { - "lastTimeChecked": "2026-06-16T18:59:48Z" + "lastTimeChecked": "2026-06-16T21:02:11Z" }, "node:Schedule Trigger2": { "recurrenceRules": [] + }, + "node:Schedule Trigger3": { + "recurrenceRules": [] } }, "meta": { @@ -3528,58 +4163,12 @@ "item": 0 } } - ], - "Webhook": [ - { - "json": { - "headers": { - "host": "agenteit.digitalcompass.agency", - "user-agent": "BambooHR-WebHooks/1.0 (+https://www.bamboohr.com)", - "content-length": "120", - "accept": "*/*", - "content-type": "application/json", - "traceparent": "00-6a3182fd000000003d3f8c5e01d64e07-a069172f6115fc0b-01", - "tracestate": "dd=t.dm:-0", - "x-bamboohr-signature": "1cb414a4f31d6fd150568f0ba46b351b04dd69c7cc8782d1a2cfabf9be9337a5", - "x-bamboohr-timestamp": "1781629694", - "x-datadog-parent-id": "11558795410882821131", - "x-datadog-sampling-priority": "1", - "x-datadog-tags": "_dd.p.tid=6a3182fd00000000,_dd.p.dm=-0", - "x-datadog-trace-id": "4413400495232011783", - "x-forwarded-for": "3.133.139.186", - "x-forwarded-host": "agenteit.digitalcompass.agency", - "x-forwarded-port": "443", - "x-forwarded-proto": "https", - "x-forwarded-server": "07b4f09d2c65", - "x-real-ip": "3.133.139.186", - "accept-encoding": "gzip" - }, - "params": {}, - "query": {}, - "body": { - "employees": [ - { - "changedFields": [], - "fields": {}, - "id": "50757", - "action": "Created", - "timestamp": "2026-06-16T11:06:03-06:00" - } - ] - }, - "webhookUrl": "https://agenteit.digitalcompass.agency/webhook/glmway", - "executionMode": "production" - }, - "pairedItem": { - "item": 0 - } - } ] }, - "versionId": "f1b6fe30-bd1c-4b2d-b068-bc62b9366442", - "activeVersionId": "4d030ff9-09d2-42ac-89c7-09d45d3f6db3", - "versionCounter": 1257, - "triggerCount": 9, + "versionId": "6f31b460-301a-454a-968b-86ead1a077c9", + "activeVersionId": "6f31b460-301a-454a-968b-86ead1a077c9", + "versionCounter": 1451, + "triggerCount": 10, "shared": [ { "updatedAt": "2026-06-08T13:50:12.177Z", @@ -3601,9 +4190,9 @@ ], "tags": [], "activeVersion": { - "updatedAt": "2026-06-16T17:37:00.000Z", - "createdAt": "2026-06-16T17:36:40.912Z", - "versionId": "4d030ff9-09d2-42ac-89c7-09d45d3f6db3", + "updatedAt": "2026-06-16T21:02:12.000Z", + "createdAt": "2026-06-16T21:01:48.335Z", + "versionId": "6f31b460-301a-454a-968b-86ead1a077c9", "workflowId": "F1iPg8hktNAebZua", "nodes": [ { @@ -3628,7 +4217,7 @@ "typeVersion": 1, "position": [ 2368, - 640 + 800 ], "id": "a2082638-94e3-4a91-aeac-f7849833a6a1", "name": "When clicking ‘Execute workflow’" @@ -3648,7 +4237,7 @@ "typeVersion": 4.4, "position": [ 3328, - 752 + 912 ], "id": "e428eaaf-f678-45ac-bbcc-926f8bd574b7", "name": "Subir archivo", @@ -3675,7 +4264,7 @@ "typeVersion": 4.4, "position": [ 2720, - 640 + 800 ], "id": "58d2c064-8982-42b0-8f1a-a10d018dff94", "name": "Obtener archivo", @@ -3702,7 +4291,7 @@ "typeVersion": 4.4, "position": [ 3328, - 544 + 704 ], "id": "f804d797-946f-4673-8291-308d47ede436", "name": "Actualizar archivo", @@ -3728,7 +4317,7 @@ "typeVersion": 1, "position": [ 2976, - 544 + 704 ], "id": "a6420476-f217-4079-b7a0-194969a2dac2", "name": "Get a workflow1", @@ -3754,7 +4343,7 @@ "typeVersion": 1, "position": [ 2976, - 752 + 912 ], "id": "f96e2477-f9db-4d36-a162-836d05dcd8ab", "name": "Get a workflow2", @@ -3795,7 +4384,7 @@ "typeVersion": 3.4, "position": [ 2544, - 640 + 800 ], "id": "fa4f3a95-6fe7-41c4-9a90-f4a3f58e06a8", "name": "Valores" @@ -3808,7 +4397,7 @@ "typeVersion": 2, "position": [ 3152, - 544 + 704 ], "id": "5d50d650-f0b6-4046-b9c1-974664b655f6", "name": "Code in JavaScript2" @@ -3821,7 +4410,7 @@ "typeVersion": 2, "position": [ 3152, - 752 + 912 ], "id": "30ffb25f-3ad7-465d-9630-887828df95f6", "name": "Code in JavaScript4" @@ -3845,8 +4434,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 2320, - -368 + 2544, + -352 ], "id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be", "name": "Informacion del supervisor", @@ -4009,8 +4598,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2368, - -192 + 2592, + -176 ], "id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2", "name": "Get many events1", @@ -4039,8 +4628,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1616, - -224 + 1872, + -528 ], "id": "2cd687f2-a8b5-4c46-854a-4f60b4d7107f", "name": "Entrenamiento español", @@ -4069,8 +4658,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1616, - -400 + 1872, + -704 ], "id": "01099730-b224-4b81-98cc-b924e2b02367", "name": "Entrenamiento ingles", @@ -4104,8 +4693,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - -384 + -656, + 1888 ], "id": "92aaf072-5cf8-4ffd-b641-20fa5fb88103", "name": "Comenzo evento ingles", @@ -4139,8 +4728,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - -208 + -656, + 2064 ], "id": "34eb762f-b9c7-4a72-94ce-3ce246c7c790", "name": "Comenzo evento español", @@ -4174,8 +4763,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - 160 + -656, + 2432 ], "id": "e0c4da60-bbbe-4cc1-b340-1749e204b6b2", "name": "Termino evento español", @@ -4209,8 +4798,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - -16 + -656, + 2256 ], "id": "cd1a89d4-21e5-475e-93ed-4f00bbfd0190", "name": "Termino evento ingles", @@ -4263,8 +4852,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 2144, - -592 + 2304, + -576 ], "id": "ed7dc4ef-e1fe-4305-ba7e-a98b617ee095", "name": "Get row(s) in sheet2", @@ -4292,8 +4881,8 @@ "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.3, "position": [ - 2720, - 1024 + 2528, + 1584 ], "id": "7f7d71b2-6c53-49a2-92d8-e66b2d0bff54", "name": "Schedule Trigger" @@ -4317,8 +4906,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2176, - -240 + 2400, + -224 ], "id": "77e81486-bffe-457d-8bc0-442c25ff4512", "name": "Entrenamiento ingles1", @@ -4423,8 +5012,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 2208, - -752 + 2368, + -736 ], "id": "deb40073-dc0e-41e4-ad7c-6df18de25b4f", "name": "Empleado le falta info?" @@ -4510,61 +5099,6 @@ "id": "20e1c800-bf0b-4484-b836-14bc7154e4e7", "name": "Schedule Trigger1" }, - { - "parameters": { - "tableId": "inscritos_glmway", - "fieldsUi": { - "fieldValues": [ - { - "fieldId": "empleado_id", - "fieldValue": "={{ $('Informacion extra del empleado').item.json.id }}" - }, - { - "fieldId": "nombre", - "fieldValue": "={{ $('Get an employee').item.json.displayName }}" - }, - { - "fieldId": "email", - "fieldValue": "={{ $('Get an employee').item.json.workEmail }}" - }, - { - "fieldId": "departamento", - "fieldValue": "={{ $('Get an employee').item.json.department }}" - }, - { - "fieldId": "supervisor_id", - "fieldValue": "={{ $('Informacion extra del empleado').item.json.supervisorEId }}" - }, - { - "fieldId": "fecha_ingreso", - "fieldValue": "={{ $('Informacion extra del empleado').item.json.hireDate }}" - }, - { - "fieldId": "fecha_inscripcion", - "fieldValue": "={{ $json.today }}" - }, - { - "fieldId": "estado", - "fieldValue": "activo" - } - ] - } - }, - "type": "n8n-nodes-base.supabase", - "typeVersion": 1, - "position": [ - 1744, - -560 - ], - "id": "dcdef9fc-9c61-45dd-9604-56037eac4c31", - "name": "Insertar a inscritos (activo)", - "credentials": { - "supabaseApi": { - "id": "2PlsR6rpK7rQTIEn", - "name": "Sofia test - Supabase account" - } - } - }, { "parameters": { "tableId": "inscritos_glmway", @@ -4641,8 +5175,8 @@ }, "type": "n8n-nodes-base.stickyNote", "position": [ - 1216, - 16 + 1104, + -32 ], "typeVersion": 1, "id": "719365c8-8099-4108-a910-83b651d81181", @@ -4774,7 +5308,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1808, + 1872, -224 ], "id": "e6c3acf5-d54b-4e00-b7a9-74038d27e387", @@ -4801,7 +5335,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1808, + 1872, -400 ], "id": "f173c8d1-9311-405c-a7ee-164726df32f1", @@ -4818,14 +5352,14 @@ { "parameters": { "content": "## Recordatorio a nuevo ingreso 24 horas antes de la sesion\n", - "height": 544, - "width": 1392, + "height": 464, + "width": 1728, "color": 6 }, "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 768 + 736 ], "typeVersion": 1, "id": "ba58d863-3211-4f53-b087-eb53ba839499", @@ -4834,14 +5368,14 @@ { "parameters": { "content": "## Recordatorio a coordinador RRHH 48 horas antes de la sesion\n", - "height": 544, - "width": 1392, + "height": 496, + "width": 1728, "color": 6 }, "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 1424 + 1280 ], "typeVersion": 1, "id": "e32bdd94-d61e-4b43-bf60-7acab8c0d3ae", @@ -4857,7 +5391,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 2768 + 2672 ], "typeVersion": 1, "id": "6d5c0fe5-5ab1-4cdc-bfd2-197dc2144274", @@ -4867,7 +5401,7 @@ "parameters": { "content": "## Notificacion inicial\n\nEnvia notificacion de sesion en el primer dia de trabajo del empleado", "height": 608, - "width": 2016, + "width": 2448, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -4930,8 +5464,8 @@ "type": "n8n-nodes-base.googleCalendarTrigger", "typeVersion": 1, "position": [ - -704, - 320 + -656, + 2592 ], "id": "35ec709a-30fd-4e3b-8492-cf6d8928e372", "name": "Prueba", @@ -4944,9 +5478,9 @@ }, { "parameters": { - "content": "## Completar datos ", + "content": "## Completar datos y enviar invitacion", "height": 544, - "width": 1392, + "width": 3328, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -4999,7 +5533,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 736, + 944, 352 ], "id": "15a1892d-01e8-432c-91f1-db236317cbca", @@ -5095,8 +5629,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1504, - 272 + 1136, + 352 ], "id": "ce9f31d4-454e-4e31-9a22-8173b3fae392", "name": "Pais?1" @@ -5119,8 +5653,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1712, - 368 + 2176, + -64 ], "id": "00c87312-256a-4738-856d-e92b9e144c75", "name": "Entrenamiento español1", @@ -5149,8 +5683,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1712, - 192 + 2176, + -240 ], "id": "b3c26eeb-2ff9-42c9-b5cc-fe0776e53c46", "name": "Entrenamiento ingles4", @@ -5188,8 +5722,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 1264, - 352 + 2432, + 368 ], "id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4", "name": "Hay coordinador?1" @@ -5233,7 +5767,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 1504, + 2608, 448 ], "id": "67928478-7604-45a4-9ab0-851079e1470c", @@ -5253,8 +5787,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1904, - 368 + 2080, + 448 ], "id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b", "name": "Send a message espanol1", @@ -5280,8 +5814,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1904, - 192 + 2080, + 272 ], "id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4", "name": "Send a message ingles1", @@ -5446,7 +5980,7 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 2144, + 2784, 368 ], "id": "98185de1-e81a-440f-8951-f98bd78c707b", @@ -5455,7 +5989,7 @@ }, { "parameters": { - "content": "## Enviar listado de inscritos al facilitador antes de iniciar la sesion\n", + "content": "## Enviar listado de inscritos al facilitador antes de iniciar el evento", "height": 544, "width": 1392, "color": 6 @@ -5474,7 +6008,7 @@ "sendTo": "eidan.then14@gmail.com", "subject": "Entrenamiento #TheGLMWay", "emailType": "text", - "message": "=Hola, GLMer!\n\nEn este entrenamiento queremos transmitirte nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\nTe esperamos puntual y con todas las ganas de aprender.\n\nNos vemos en el enlace!\n\n{{ $json.conferenceData.entryPoints[0].uri }}", + "message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}", "options": { "appendAttribution": false } @@ -5482,8 +6016,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 992, - 1104 + 800, + 928 ], "id": "10b2cb4e-274d-4913-9345-2c024c071f4c", "name": "Send a message espanol2", @@ -5501,7 +6035,7 @@ "sendTo": "eidan.then14@gmail.com", "subject": "#TheGLMWay Training", "emailType": "text", - "message": "=Hello, GLMer!\n\nIn this training we want to share our culture, our DNA, and why we are different from the rest.\n\nWe look forward to seeing you on time and eager to learn.\n\nSee you at the link!\n\n{{ $json.conferenceData.entryPoints[0].uri }}", + "message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}", "options": { "appendAttribution": false } @@ -5509,8 +6043,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 992, - 928 + 800, + 752 ], "id": "1dc76989-8c58-4ffe-9e1c-5113a59d346c", "name": "Send a message ingles2", @@ -5537,7 +6071,7 @@ "typeVersion": 1.3, "position": [ -352, - 1008 + 928 ], "id": "60708d5c-0cd7-45fc-bb67-ed050c1f8022", "name": "Schedule Trigger2" @@ -5570,34 +6104,6 @@ } } }, - { - "parameters": { - "operation": "get", - "tableId": "inscritos_glmway", - "filters": { - "conditions": [ - { - "keyName": "estado", - "keyValue": "activo" - } - ] - } - }, - "type": "n8n-nodes-base.supabase", - "typeVersion": 1, - "position": [ - -176, - 1008 - ], - "id": "34aa0bc5-0feb-46e3-871b-27a1cc418675", - "name": "Obtener activos", - "credentials": { - "supabaseApi": { - "id": "2PlsR6rpK7rQTIEn", - "name": "Sofia test - Supabase account" - } - } - }, { "parameters": { "documentId": { @@ -5644,71 +6150,6 @@ } } }, - { - "parameters": { - "operation": "update", - "tableId": "inscritos_glmway", - "filters": { - "conditions": [ - { - "keyName": "empleado_id", - "condition": "eq", - "keyValue": "={{ $('Get an employee1').item.json.id }}" - } - ] - }, - "fieldsUi": { - "fieldValues": [ - { - "fieldId": "email", - "fieldValue": "={{ $('Get an employee1').item.json.workEmail }}" - }, - { - "fieldId": "departamento", - "fieldValue": "={{ $('Get an employee1').item.json.department }}" - }, - { - "fieldId": "supervisor_id", - "fieldValue": "={{ $('Informacion extra del empleado1').item.json.supervisorEId }}" - }, - { - "fieldId": "estado", - "fieldValue": "activo" - }, - { - "fieldId": "fecha_inscripcion", - "fieldValue": "={{ $json.today }}" - }, - { - "fieldId": "division", - "fieldValue": "={{ $('Get an employee1').item.json.division }}" - }, - { - "fieldId": "puesto", - "fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}" - }, - { - "fieldId": "pais", - "fieldValue": "={{ $('Get an employee1').item.json.location }}" - } - ] - } - }, - "type": "n8n-nodes-base.supabase", - "typeVersion": 1, - "position": [ - 944, - 352 - ], - "id": "e67b21c3-ab44-4d27-ada0-719197b5c3df", - "name": "Actualizar datos de empleado", - "credentials": { - "supabaseApi": { - "id": "2PlsR6rpK7rQTIEn", - "name": "Sofia test - Supabase account" - } - } - }, { "parameters": { "documentId": { @@ -5742,8 +6183,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 1104, - 352 + 2272, + 368 ], "id": "3a6f198b-e136-49fb-a171-78164e10b600", "name": "Obtener coordinador1", @@ -5755,36 +6196,6 @@ } } }, - { - "parameters": { - "tableId": "inscritos_glmway", - "fieldsUi": { - "fieldValues": [ - { - "fieldId": "empleado_id" - }, - { - "fieldId": "estado", - "fieldValue": "notificado" - } - ] - } - }, - "type": "n8n-nodes-base.supabase", - "typeVersion": 1, - "position": [ - 1216, - 832 - ], - "id": "ddf0a273-d3bc-44cc-888b-d789ce72ff77", - "name": "Actualizar estado a notificado", - "credentials": { - "supabaseApi": { - "id": "2PlsR6rpK7rQTIEn", - "name": "Sofia test - Supabase account" - } - } - }, { "parameters": { "options": {} @@ -5793,7 +6204,7 @@ "typeVersion": 3, "position": [ 0, - 1008 + 928 ], "id": "9e8fd238-541e-455b-8ae5-6a3097eb38a0", "name": "Loop Over Items1" @@ -5805,8 +6216,8 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 1184, - 1104 + 1200, + 1072 ], "id": "ee5bb9bc-b8cb-493f-8463-ae0a24cf1f0d", "name": "Wait1", @@ -5824,7 +6235,7 @@ "conditions": [ { "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Jamaica", "operator": { "type": "string", @@ -5833,7 +6244,7 @@ }, { "id": "32931394-f4ea-4055-b866-906a81988173", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Trinidad and Tobago", "operator": { "type": "string", @@ -5842,7 +6253,7 @@ }, { "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Barbados", "operator": { "type": "string", @@ -5851,7 +6262,7 @@ }, { "id": "28e49217-0c1a-4462-9642-676e54926d3e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Saint Thomas", "operator": { "type": "string", @@ -5860,7 +6271,7 @@ }, { "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "St. Croix", "operator": { "type": "string", @@ -5869,7 +6280,7 @@ }, { "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Tobago", "operator": { "type": "string", @@ -5878,7 +6289,7 @@ }, { "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Guyana", "operator": { "type": "string", @@ -5887,7 +6298,7 @@ }, { "id": "35a50a33-a2b5-4116-9336-11300357569e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ $('Obtener notificados').item.json.pais }}", "rightValue": "Aruba", "operator": { "type": "string", @@ -5902,8 +6313,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 592, - 1008 + 608, + 832 ], "id": "4d94c907-8ab1-4213-be20-9e24173cf0a3", "name": "Pais?2" @@ -5926,8 +6337,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 800, - 1104 + 1664, + 1248 ], "id": "7dd9a706-4d80-45c6-942a-c703eb074a20", "name": "Entrenamiento español2", @@ -5956,8 +6367,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 800, - 928 + 1664, + 1072 ], "id": "d8253a7a-4e37-4c14-b4da-e0029571cd21", "name": "Entrenamiento ingles5", @@ -5970,13 +6381,13 @@ }, { "parameters": { - "jsCode": "const hireDate = $json.hireDate;\n\n// Fecha de hoy en formato YYYY-MM-DD\nconst today = new Date().toISOString().split('T')[0];\n\n// True si hireDate es hoy o anterior\nconst isValid = hireDate <= today;\n\nreturn [\n {\n json: {\n hireDate,\n today,\n isValid\n }\n }\n];" + "jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\n\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días) o mañana (1 día)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 1;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 208, - 1008 + 928 ], "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", "name": "Calcular fecha hireDate2" @@ -6071,6 +6482,160 @@ "id": "971ae719-5692-4f87-9a57-2287ee44783d", "name": "Crear variable idioma EN" }, + { + "parameters": { + "operation": "get", + "tableId": "sesiones_glmway", + "filters": { + "conditions": [ + { + "keyName": "idioma", + "keyValue": "={{ $json.idioma }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1344, + -400 + ], + "id": "cb9e8a10-a1e7-40c7-8447-2379b0191a8f", + "name": "Obtener sesiones español", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "get", + "tableId": "sesiones_glmway", + "filters": { + "conditions": [ + { + "keyName": "idioma", + "keyValue": "={{ $json.idioma }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1344, + -224 + ], + "id": "5ca790ee-4944-4868-98af-89837ac39422", + "name": "Obtener sesiones ingles", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 1536, + -400 + ], + "id": "c2db5e62-7741-4ff2-ad31-71c108dd7386", + "name": "Calcular sesion mas cercana" + }, + { + "parameters": { + "jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 1536, + -224 + ], + "id": "bde8fba9-0d6c-4299-8971-dcd8e0e740b4", + "name": "Calcular sesion mas cercana1" + }, + { + "parameters": { + "assignments": { + "assignments": [ + { + "id": "1e6f83ce-19e7-4dd9-ba34-a11836a6181e", + "name": "idioma", + "value": "ES", + "type": "string" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.set", + "typeVersion": 3.4, + "position": [ + 1360, + 272 + ], + "id": "430a2b66-f0f3-4032-bca1-29b01bd8c577", + "name": "Crear variable idioma ES1" + }, + { + "parameters": { + "assignments": { + "assignments": [ + { + "id": "b0610214-1357-4e55-be5f-75c159d3b717", + "name": "idioma", + "value": "EN", + "type": "string" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.set", + "typeVersion": 3.4, + "position": [ + 1360, + 448 + ], + "id": "9d53a7e1-6dab-494b-8064-6c3063f5596f", + "name": "Crear variable idioma EN1" + }, + { + "parameters": { + "jsCode": "const hireDate = new Date(\n $('Entra hoy?1').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 1744, + 272 + ], + "id": "ee31fd24-d703-44b3-b65b-75234564d29f", + "name": "Calcular sesion mas cercana2" + }, + { + "parameters": { + "jsCode": "const hireDate = new Date(\n $('Entra hoy?1').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 1744, + 448 + ], + "id": "24f2e53d-9280-445b-b37e-776b41ca53e2", + "name": "Calcular sesion mas cercana3" + }, { "parameters": { "tableId": "inscritos_glmway", @@ -6101,12 +6666,16 @@ "fieldValue": "={{ $('Informacion extra del empleado').item.json.hireDate }}" }, { - "fieldId": "fecha_inscripcion", - "fieldValue": "={{ $json.today }}" + "fieldId": "fecha_sesion_inscrito", + "fieldValue": "={{ $json.session.fecha_sesion }}" }, { "fieldId": "estado", - "fieldValue": "activo" + "fieldValue": "notificado" + }, + { + "fieldId": "sesion_id", + "fieldValue": "={{ $json.session.id }}" } ] } @@ -6114,11 +6683,11 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1344, + 1696, -400 ], - "id": "cb9e8a10-a1e7-40c7-8447-2379b0191a8f", - "name": "Obtener sesiones español", + "id": "dcdef9fc-9c61-45dd-9604-56037eac4c31", + "name": "Guardar datos del empleado y sesion asignada", "credentials": { "supabaseApi": { "id": "2PlsR6rpK7rQTIEn", @@ -6156,12 +6725,16 @@ "fieldValue": "={{ $('Informacion extra del empleado').item.json.hireDate }}" }, { - "fieldId": "fecha_inscripcion", - "fieldValue": "={{ $json.today }}" + "fieldId": "fecha_sesion_inscrito", + "fieldValue": "={{ $json.session.fecha_sesion }}" }, { "fieldId": "estado", - "fieldValue": "activo" + "fieldValue": "notificado" + }, + { + "fieldId": "sesion_id", + "fieldValue": "={{ $json.session.id }}" } ] } @@ -6169,17 +6742,666 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1344, + 1696, -224 ], - "id": "948bae7c-af74-4d8e-8efe-f7caa4ee3db0", - "name": "Obtener sesiones ingles", + "id": "7530270a-b32e-419e-8fc5-b29fa07dda39", + "name": "Guardar datos del empleado y sesion asignada1", "credentials": { "supabaseApi": { "id": "2PlsR6rpK7rQTIEn", "name": "Sofia test - Supabase account" } } + }, + { + "parameters": { + "operation": "get", + "tableId": "sesiones_glmway", + "filters": { + "conditions": [ + { + "keyName": "idioma", + "keyValue": "={{ $json.idioma }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1552, + 272 + ], + "id": "f034ee45-742b-4f18-9003-333a4c087cf7", + "name": "Obtener sesiones español1", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "get", + "tableId": "sesiones_glmway", + "filters": { + "conditions": [ + { + "keyName": "idioma", + "keyValue": "={{ $json.idioma }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1552, + 448 + ], + "id": "2c35fe0e-1f32-4263-9c02-c392cb77e0e5", + "name": "Obtener sesiones ingles1", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "amount": 2 + }, + "type": "n8n-nodes-base.wait", + "typeVersion": 1.1, + "position": [ + 1136, + 496 + ], + "id": "960e74ae-583b-4802-ab72-3b402c095d9b", + "name": "Wait2", + "webhookId": "1211d7da-55b9-4a73-837d-55934076a799" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "d7d68505-8c34-44cd-b771-56bef28ada41", + "leftValue": "={{ $('Get an employee1').item.json.workEmail }}", + "rightValue": "", + "operator": { + "type": "string", + "operation": "notEmpty", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.3, + "position": [ + 752, + 352 + ], + "id": "a2a81e91-f617-490a-b1ce-5737944fa23b", + "name": "Tiene correo?" + }, + { + "parameters": { + "operation": "update", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Get an employee1').item.json.id }}" + } + ] + }, + "fieldsUi": { + "fieldValues": [ + { + "fieldId": "empleado_id", + "fieldValue": "={{ $('Informacion extra del empleado1').item.json.id }}" + }, + { + "fieldId": "nombre", + "fieldValue": "={{ $('Get an employee1').item.json.displayName }}" + }, + { + "fieldId": "email", + "fieldValue": "={{ $('Get an employee1').item.json.workEmail }}" + }, + { + "fieldId": "departamento", + "fieldValue": "={{ $('Get an employee1').item.json.department }}" + }, + { + "fieldId": "supervisor_id", + "fieldValue": "={{ $('Informacion extra del empleado1').item.json.supervisorEId }}" + }, + { + "fieldId": "fecha_ingreso", + "fieldValue": "={{ $('Informacion extra del empleado1').item.json.hireDate }}" + }, + { + "fieldId": "fecha_sesion_inscrito", + "fieldValue": "={{ $json.session.fecha_sesion }}" + }, + { + "fieldId": "estado", + "fieldValue": "notificado" + }, + { + "fieldId": "sesion_id", + "fieldValue": "={{ $json.session.id }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1904, + 272 + ], + "id": "16d364da-e6fc-4943-bd64-f83ccab66b9f", + "name": "Actualizar datos del empleado y sesion asignada2", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "update", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Get an employee1').item.json.id }}" + } + ] + }, + "fieldsUi": { + "fieldValues": [ + { + "fieldId": "empleado_id", + "fieldValue": "={{ $('Informacion extra del empleado1').item.json.id }}" + }, + { + "fieldId": "nombre", + "fieldValue": "={{ $('Get an employee1').item.json.displayName }}" + }, + { + "fieldId": "email", + "fieldValue": "={{ $('Get an employee1').item.json.workEmail }}" + }, + { + "fieldId": "departamento", + "fieldValue": "={{ $('Get an employee1').item.json.department }}" + }, + { + "fieldId": "supervisor_id", + "fieldValue": "={{ $('Informacion extra del empleado1').item.json.supervisorEId }}" + }, + { + "fieldId": "fecha_ingreso", + "fieldValue": "={{ $('Informacion extra del empleado1').item.json.hireDate }}" + }, + { + "fieldId": "fecha_sesion_inscrito", + "fieldValue": "={{ $json.session.fecha_sesion }}" + }, + { + "fieldId": "estado", + "fieldValue": "notificado" + }, + { + "fieldId": "sesion_id", + "fieldValue": "={{ $json.session.id }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1904, + 448 + ], + "id": "d1e51972-c9b0-4dbd-a208-c033e1ca8351", + "name": "Actualizar datos del empleado y sesion asignada3", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "get", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "estado", + "keyValue": "notificado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + -176, + 928 + ], + "id": "34aa0bc5-0feb-46e3-871b-27a1cc418675", + "name": "Obtener notificados", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", + "leftValue": "={{ $json.isValid }}", + "rightValue": "Jamaica", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "or" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 416, + 928 + ], + "id": "107b41cb-06d5-4e7e-863b-dace19c8d1e9", + "name": "Falta 24h para el evento?" + }, + { + "parameters": { + "operation": "update", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Loop Over Items1').item.json.empleado_id }}" + } + ] + }, + "fieldsUi": { + "fieldValues": [ + { + "fieldId": "estado", + "fieldValue": "recordado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1008, + 848 + ], + "id": "ddf0a273-d3bc-44cc-888b-d789ce72ff77", + "name": "Actualizar estado a recordado", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "sendTo": "eidan.then14@gmail.com", + "subject": "Entrenamiento #TheGLMWay", + "emailType": "text", + "message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}", + "options": { + "appendAttribution": false + } + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.2, + "position": [ + 816, + 1488 + ], + "id": "39331d88-6f2b-4df1-ac76-dda9ff47dfec", + "name": "Send a message espanol3", + "webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2", + "credentials": { + "gmailOAuth2": { + "id": "QWNicjw1khRm5BVI", + "name": "Eidan - Gmail account" + } + }, + "disabled": true + }, + { + "parameters": { + "sendTo": "eidan.then14@gmail.com", + "subject": "#TheGLMWay Training", + "emailType": "text", + "message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}", + "options": { + "appendAttribution": false + } + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.2, + "position": [ + 816, + 1312 + ], + "id": "9d4f57a4-ac2f-49bd-b5fa-50658a8d928e", + "name": "Send a message ingles3", + "webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2", + "credentials": { + "gmailOAuth2": { + "id": "QWNicjw1khRm5BVI", + "name": "Eidan - Gmail account" + } + }, + "disabled": true + }, + { + "parameters": { + "rule": { + "interval": [ + { + "triggerAtHour": 9 + } + ] + } + }, + "type": "n8n-nodes-base.scheduleTrigger", + "typeVersion": 1.3, + "position": [ + -352, + 1488 + ], + "id": "6951af7d-5098-4156-81bd-8f67034fcf70", + "name": "Schedule Trigger3" + }, + { + "parameters": { + "options": {} + }, + "type": "n8n-nodes-base.splitInBatches", + "typeVersion": 3, + "position": [ + 0, + 1488 + ], + "id": "7545364a-df0a-4420-a1af-5bcd4f8c9602", + "name": "Loop Over Items2" + }, + { + "parameters": { + "amount": 2 + }, + "type": "n8n-nodes-base.wait", + "typeVersion": 1.1, + "position": [ + 1200, + 1616 + ], + "id": "617ab85d-23a6-4546-9331-eff343d9b1c5", + "name": "Wait3", + "webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Jamaica", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "32931394-f4ea-4055-b866-906a81988173", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Trinidad and Tobago", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Barbados", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "28e49217-0c1a-4462-9642-676e54926d3e", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Saint Thomas", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "St. Croix", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Tobago", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Guyana", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "35a50a33-a2b5-4116-9336-11300357569e", + "leftValue": "={{ $('Obtener notificados1').item.json.pais }}", + "rightValue": "Aruba", + "operator": { + "type": "string", + "operation": "equals" + } + } + ], + "combinator": "or" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 624, + 1392 + ], + "id": "13ee807a-f1cd-48ef-921b-7b5c260ba116", + "name": "Pais?3" + }, + { + "parameters": { + "jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\n\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días) o mañana (1 día)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 1;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 208, + 1488 + ], + "id": "3e2b4cde-d7aa-4879-aa55-f1a169c16bd3", + "name": "Calcular fecha hireDate3" + }, + { + "parameters": { + "operation": "get", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "estado", + "keyValue": "notificado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + -176, + 1488 + ], + "id": "0457dbf8-9c04-4f2d-9928-4f770eb51cc0", + "name": "Obtener notificados1", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "update", + "tableId": "inscritos_glmway", + "filters": { + "conditions": [ + { + "keyName": "empleado_id", + "condition": "eq", + "keyValue": "={{ $('Loop Over Items2').item.json.empleado_id }}" + } + ] + }, + "fieldsUi": { + "fieldValues": [ + { + "fieldId": "estado", + "fieldValue": "recordado" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1024, + 1408 + ], + "id": "0881ba84-bd04-4e91-9c09-0ba18e28ed28", + "name": "Actualizar estado a recordado1", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", + "leftValue": "={{ $json.isValid }}", + "rightValue": "Jamaica", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "or" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 432, + 1488 + ], + "id": "0fea4950-f873-4375-8964-45cfc3fead02", + "name": "Falta 48h para el evento?1" } ], "connections": { @@ -6350,11 +7572,6 @@ ] ] }, - "Insertar a inscritos (activo)": { - "main": [ - [] - ] - }, "Hay coordinador?": { "main": [ [ @@ -6420,31 +7637,19 @@ }, "Entrenamiento ingles": { "main": [ - [ - { - "node": "Send a message ingles", - "type": "main", - "index": 0 - } - ] + [] ] }, "Entrenamiento español": { "main": [ - [ - { - "node": "Send a message espanol", - "type": "main", - "index": 0 - } - ] + [] ] }, "Calcular fecha hireDate1": { "main": [ [ { - "node": "Entra hoy?1", + "node": "Tiene correo?", "type": "main", "index": 0 } @@ -6455,26 +7660,32 @@ "main": [ [ { - "node": "Actualizar datos de empleado", + "node": "Pais?1", "type": "main", "index": 0 } ], - [] + [ + { + "node": "Wait2", + "type": "main", + "index": 0 + } + ] ] }, "Pais?1": { "main": [ [ { - "node": "Entrenamiento ingles4", + "node": "Crear variable idioma ES1", "type": "main", "index": 0 } ], [ { - "node": "Entrenamiento español1", + "node": "Crear variable idioma EN1", "type": "main", "index": 0 } @@ -6483,31 +7694,19 @@ }, "Entrenamiento español1": { "main": [ - [ - { - "node": "Send a message espanol1", - "type": "main", - "index": 0 - } - ] + [] ] }, "Entrenamiento ingles4": { "main": [ - [ - { - "node": "Send a message ingles1", - "type": "main", - "index": 0 - } - ] + [] ] }, "Hay coordinador?1": { "main": [ [ { - "node": "Pais?1", + "node": "Wait", "type": "main", "index": 0 } @@ -6543,7 +7742,7 @@ "main": [ [ { - "node": "Wait", + "node": "Obtener coordinador1", "type": "main", "index": 0 } @@ -6554,7 +7753,7 @@ "main": [ [ { - "node": "Wait", + "node": "Obtener coordinador1", "type": "main", "index": 0 } @@ -6576,7 +7775,7 @@ "main": [ [ { - "node": "Obtener activos", + "node": "Obtener notificados", "type": "main", "index": 0 } @@ -6605,17 +7804,6 @@ ] ] }, - "Actualizar datos de empleado": { - "main": [ - [ - { - "node": "Obtener coordinador1", - "type": "main", - "index": 0 - } - ] - ] - }, "Obtener coordinador1": { "main": [ [ @@ -6627,17 +7815,6 @@ ] ] }, - "Obtener activos": { - "main": [ - [ - { - "node": "Loop Over Items1", - "type": "main", - "index": 0 - } - ] - ] - }, "Loop Over Items1": { "main": [ [], @@ -6651,24 +7828,6 @@ ] }, "Pais?2": { - "main": [ - [ - { - "node": "Entrenamiento ingles5", - "type": "main", - "index": 0 - } - ], - [ - { - "node": "Entrenamiento español2", - "type": "main", - "index": 0 - } - ] - ] - }, - "Entrenamiento ingles5": { "main": [ [ { @@ -6676,11 +7835,7 @@ "type": "main", "index": 0 } - ] - ] - }, - "Entrenamiento español2": { - "main": [ + ], [ { "node": "Send a message espanol2", @@ -6690,11 +7845,21 @@ ] ] }, + "Entrenamiento ingles5": { + "main": [ + [] + ] + }, + "Entrenamiento español2": { + "main": [ + [] + ] + }, "Send a message espanol2": { "main": [ [ { - "node": "Wait1", + "node": "Actualizar estado a recordado", "type": "main", "index": 0 } @@ -6705,7 +7870,7 @@ "main": [ [ { - "node": "Wait1", + "node": "Actualizar estado a recordado", "type": "main", "index": 0 } @@ -6733,18 +7898,399 @@ } ] ] + }, + "Obtener sesiones español": { + "main": [ + [ + { + "node": "Calcular sesion mas cercana", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener sesiones ingles": { + "main": [ + [ + { + "node": "Calcular sesion mas cercana1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular sesion mas cercana": { + "main": [ + [ + { + "node": "Guardar datos del empleado y sesion asignada", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular sesion mas cercana1": { + "main": [ + [ + { + "node": "Guardar datos del empleado y sesion asignada1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Crear variable idioma ES1": { + "main": [ + [ + { + "node": "Obtener sesiones español1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Crear variable idioma EN1": { + "main": [ + [ + { + "node": "Obtener sesiones ingles1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular sesion mas cercana2": { + "main": [ + [ + { + "node": "Actualizar datos del empleado y sesion asignada2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular sesion mas cercana3": { + "main": [ + [ + { + "node": "Actualizar datos del empleado y sesion asignada3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Guardar datos del empleado y sesion asignada": { + "main": [ + [ + { + "node": "Send a message ingles", + "type": "main", + "index": 0 + } + ] + ] + }, + "Guardar datos del empleado y sesion asignada1": { + "main": [ + [ + { + "node": "Send a message espanol", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener sesiones español1": { + "main": [ + [ + { + "node": "Calcular sesion mas cercana2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener sesiones ingles1": { + "main": [ + [ + { + "node": "Calcular sesion mas cercana3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Alerta no hay coordinador RRHH1": { + "main": [ + [ + { + "node": "Wait", + "type": "main", + "index": 0 + } + ] + ] + }, + "Wait2": { + "main": [ + [ + { + "node": "Loop Over Items", + "type": "main", + "index": 0 + } + ] + ] + }, + "Tiene correo?": { + "main": [ + [ + { + "node": "Entra hoy?1", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Wait2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar datos del empleado y sesion asignada2": { + "main": [ + [ + { + "node": "Send a message ingles1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar datos del empleado y sesion asignada3": { + "main": [ + [ + { + "node": "Send a message espanol1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener notificados": { + "main": [ + [ + { + "node": "Loop Over Items1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular fecha hireDate2": { + "main": [ + [ + { + "node": "Falta 24h para el evento?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Falta 24h para el evento?": { + "main": [ + [ + { + "node": "Pais?2", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Wait1": { + "main": [ + [ + { + "node": "Loop Over Items1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar estado a recordado": { + "main": [ + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message espanol3": { + "main": [ + [ + { + "node": "Actualizar estado a recordado1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message ingles3": { + "main": [ + [ + { + "node": "Actualizar estado a recordado1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Schedule Trigger3": { + "main": [ + [ + { + "node": "Obtener notificados1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Loop Over Items2": { + "main": [ + [], + [ + { + "node": "Calcular fecha hireDate3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Wait3": { + "main": [ + [ + { + "node": "Loop Over Items2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Pais?3": { + "main": [ + [ + { + "node": "Send a message ingles3", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Send a message espanol3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular fecha hireDate3": { + "main": [ + [ + { + "node": "Falta 48h para el evento?1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener notificados1": { + "main": [ + [ + { + "node": "Loop Over Items2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar estado a recordado1": { + "main": [ + [ + { + "node": "Wait3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Falta 48h para el evento?1": { + "main": [ + [ + { + "node": "Pais?3", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Wait3", + "type": "main", + "index": 0 + } + ] + ] } }, "authors": "Eidan Then", - "name": "Version 4d030ff9", + "name": "Version 6f31b460", "description": "", "autosaved": true, "workflowPublishHistory": [ { - "createdAt": "2026-06-16T17:37:00.662Z", - "id": 1445, + "createdAt": "2026-06-16T21:02:12.033Z", + "id": 1470, "workflowId": "F1iPg8hktNAebZua", - "versionId": "4d030ff9-09d2-42ac-89c7-09d45d3f6db3", + "versionId": "6f31b460-301a-454a-968b-86ead1a077c9", "event": "activated", "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" }