From a2933286059dfc860e312b869bc1febc6f1f50f9 Mon Sep 17 00:00:00 2001 From: EidanThen Date: Wed, 17 Jun 2026 14:04:16 +0000 Subject: [PATCH] Update glmway-workflow.json --- glmway-workflow.json | 1036 ++++++++++++++++++------------------------ 1 file changed, 450 insertions(+), 586 deletions(-) diff --git a/glmway-workflow.json b/glmway-workflow.json index f83a813..30ae0fa 100644 --- a/glmway-workflow.json +++ b/glmway-workflow.json @@ -1,6 +1,6 @@ { "$json": { - "updatedAt": "2026-06-16T21:02:08.912Z", + "updatedAt": "2026-06-17T14:02:01.426Z", "createdAt": "2026-06-08T13:50:12.174Z", "id": "F1iPg8hktNAebZua", "name": "GLMWay", @@ -247,8 +247,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 2544, - -352 + 2608, + -960 ], "id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be", "name": "Informacion del supervisor", @@ -326,7 +326,7 @@ "typeVersion": 4.4, "position": [ 1280, - -1248 + -1408 ], "id": "a52ef26c-a5d6-4bb5-9a99-61fa25206105", "name": "Informacion del supervisor1", @@ -359,7 +359,7 @@ "typeVersion": 4.4, "position": [ 1632, - -1184 + -1344 ], "id": "0088cd80-6150-4577-89a9-b28b06fea6b4", "name": "Informacion del empleado1", @@ -411,8 +411,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2592, - -176 + 2656, + -784 ], "id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2", "name": "Get many events1", @@ -442,7 +442,7 @@ "typeVersion": 1.3, "position": [ 1872, - -528 + -688 ], "id": "2cd687f2-a8b5-4c46-854a-4f60b4d7107f", "name": "Entrenamiento español", @@ -472,7 +472,7 @@ "typeVersion": 1.3, "position": [ 1872, - -704 + -864 ], "id": "01099730-b224-4b81-98cc-b924e2b02367", "name": "Entrenamiento ingles", @@ -665,8 +665,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 2304, - -576 + 2368, + -1184 ], "id": "ed7dc4ef-e1fe-4305-ba7e-a98b617ee095", "name": "Get row(s) in sheet2", @@ -719,8 +719,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2400, - -224 + 2464, + -832 ], "id": "77e81486-bffe-457d-8bc0-442c25ff4512", "name": "Entrenamiento ingles1", @@ -791,7 +791,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 688, + 912, -240 ], "id": "8a2be7cc-85ad-4e44-92a7-fe3f94df703f", @@ -825,8 +825,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 2368, - -736 + 2432, + -1344 ], "id": "deb40073-dc0e-41e4-ad7c-6df18de25b4f", "name": "Empleado le falta info?" @@ -887,7 +887,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 336, + 560, -144 ], "id": "cb43a2bb-7743-4994-a7b2-209cd0934cd7", @@ -942,12 +942,24 @@ "fieldValue": "={{ $('Informacion extra del empleado').item.json.hireDate }}" }, { - "fieldId": "fecha_inscripcion", + "fieldId": "fecha_sesion_inscrito", "fieldValue": "={{ null }}" }, { "fieldId": "estado", "fieldValue": "inactivo" + }, + { + "fieldId": "puesto", + "fieldValue": "={{ $('Get an employee').item.json.jobTitle }}" + }, + { + "fieldId": "division", + "fieldValue": "={{ $('Get an employee').item.json.division }}" + }, + { + "fieldId": "pais", + "fieldValue": "={{ $('Get an employee').item.json.location }}" } ] } @@ -955,7 +967,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 528, + 752, -32 ], "id": "0a800bb8-d5f1-443e-b3b1-3ca9546eb28f", @@ -988,7 +1000,7 @@ }, "type": "n8n-nodes-base.stickyNote", "position": [ - 1104, + 1328, -32 ], "typeVersion": 1, @@ -1034,7 +1046,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 928, + 1152, -144 ], "id": "09ce1f03-3dfb-4108-9d25-6c05ac622a6f", @@ -1121,7 +1133,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1872, + 2096, -224 ], "id": "e6c3acf5-d54b-4e00-b7a9-74038d27e387", @@ -1148,7 +1160,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1872, + 2096, -400 ], "id": "f173c8d1-9311-405c-a7ee-164726df32f1", @@ -1204,7 +1216,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 2672 + 2528 ], "typeVersion": 1, "id": "6d5c0fe5-5ab1-4cdc-bfd2-197dc2144274", @@ -1214,7 +1226,7 @@ "parameters": { "content": "## Notificacion inicial\n\nEnvia notificacion de sesion en el primer dia de trabajo del empleado", "height": 608, - "width": 2448, + "width": 2672, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -1245,7 +1257,7 @@ "typeVersion": 1.3, "position": [ 1200, - -736 + -896 ], "id": "e0cc1e60-9379-45fb-b7f4-6def9c3e9601", "name": "Entrenamiento ingles3", @@ -1364,74 +1376,12 @@ "conditions": [ { "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Get an employee1').item.json.location) }}", "rightValue": "Jamaica", "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "32931394-f4ea-4055-b866-906a81988173", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Trinidad and Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Barbados", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "28e49217-0c1a-4462-9642-676e54926d3e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Saint Thomas", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "St. Croix", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Guyana", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "35a50a33-a2b5-4116-9336-11300357569e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Aruba", - "operator": { - "type": "string", - "operation": "equals" + "type": "boolean", + "operation": "true", + "singleValue": true } } ], @@ -1466,8 +1416,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2176, - -64 + 2240, + -672 ], "id": "00c87312-256a-4738-856d-e92b9e144c75", "name": "Entrenamiento español1", @@ -1496,8 +1446,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2176, - -240 + 2240, + -848 ], "id": "b3c26eeb-2ff9-42c9-b5cc-fe0776e53c46", "name": "Entrenamiento ingles4", @@ -1731,7 +1681,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 928, + 1152, -320 ], "id": "b183c892-8822-4bc3-a92c-4410eac41a01", @@ -1761,7 +1711,7 @@ "typeVersion": 1.3, "position": [ 1520, - -768 + -928 ], "id": "711b3353-6f75-4c6d-bef7-e704290787e8", "name": "Invitar con calendarios entrenamiento ingles", @@ -1780,7 +1730,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ 1440, - -1008 + -1168 ], "typeVersion": 1, "id": "304297ee-18fc-4cbd-8a01-b627ae08b991", @@ -1810,7 +1760,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 2048 + 1904 ], "typeVersion": 1, "id": "79ccf49e-4434-4b72-8147-ad27b9d994a2", @@ -1950,7 +1900,7 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 528, + 752, -240 ], "id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7", @@ -2048,74 +1998,12 @@ "conditions": [ { "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", + "leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Obtener notificados').item.json.location) }}", "rightValue": "Jamaica", "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "32931394-f4ea-4055-b866-906a81988173", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Trinidad and Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Barbados", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "28e49217-0c1a-4462-9642-676e54926d3e", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Saint Thomas", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "St. Croix", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Guyana", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "35a50a33-a2b5-4116-9336-11300357569e", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Aruba", - "operator": { - "type": "string", - "operation": "equals" + "type": "boolean", + "operation": "true", + "singleValue": true } } ], @@ -2192,19 +2080,6 @@ } } }, - { - "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, - 928 - ], - "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", - "name": "Calcular fecha hireDate2" - }, { "parameters": { "content": "# Eventos inician a las 6pm en hora Bogota\n", @@ -2238,7 +2113,7 @@ "typeVersion": 1.3, "position": [ 1008, - -656 + -816 ], "id": "516244e1-3e39-4905-9160-86af296a0479", "name": "Entrenamiento español3", @@ -2266,7 +2141,7 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1152, + 1376, -400 ], "id": "e8a65f36-8e8e-4135-b7a2-a7ef4617de2f", @@ -2289,7 +2164,7 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1152, + 1376, -224 ], "id": "971ae719-5692-4f87-9a57-2287ee44783d", @@ -2311,7 +2186,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1344, + 1568, -400 ], "id": "cb9e8a10-a1e7-40c7-8447-2379b0191a8f", @@ -2339,7 +2214,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1344, + 1568, -224 ], "id": "5ca790ee-4944-4868-98af-89837ac39422", @@ -2358,7 +2233,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1536, + 1760, -400 ], "id": "c2db5e62-7741-4ff2-ad31-71c108dd7386", @@ -2371,7 +2246,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1536, + 1760, -224 ], "id": "bde8fba9-0d6c-4299-8971-dcd8e0e740b4", @@ -2496,7 +2371,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1696, + 1920, -400 ], "id": "dcdef9fc-9c61-45dd-9604-56037eac4c31", @@ -2555,7 +2430,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1696, + 1920, -224 ], "id": "7530270a-b32e-419e-8fc5-b29fa07dda39", @@ -2721,6 +2596,18 @@ { "fieldId": "sesion_id", "fieldValue": "={{ $json.session.id }}" + }, + { + "fieldId": "pais", + "fieldValue": "={{ $('Get an employee1').item.json.location }}" + }, + { + "fieldId": "division", + "fieldValue": "={{ $('Get an employee1').item.json.division }}" + }, + { + "fieldId": "puesto", + "fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}" } ] } @@ -2740,75 +2627,6 @@ } } }, - { - "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", @@ -3104,19 +2922,6 @@ "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", @@ -3215,6 +3020,147 @@ ], "id": "0fea4950-f873-4375-8964-45cfc3fead02", "name": "Falta 48h para el evento?1" + }, + { + "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, + 928 + ], + "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", + "name": "Calcular falta 24h o es el mismo dia" + }, + { + "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 falta 48h" + }, + { + "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 }}" + }, + { + "fieldId": "pais", + "fieldValue": "={{ $('Get an employee1').item.json.location }}" + }, + { + "fieldId": "division", + "fieldValue": "={{ $('Get an employee1').item.json.division }}" + }, + { + "fieldId": "puesto", + "fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1904, + 448 + ], + "id": "f2aca2bd-e72d-4457-9a6b-c4b0f8bcc558", + "name": "Actualizar datos del empleado y sesion asignada3", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 3 + }, + "conditions": [ + { + "id": "d7d68505-8c34-44cd-b771-56bef28ada41", + "leftValue": "={{ $('Get an employee').item.json.workEmail }}", + "rightValue": "", + "operator": { + "type": "string", + "operation": "notEmpty", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.3, + "position": [ + 336, + -144 + ], + "id": "a9fff247-d1b0-4314-ba8d-e7401086b771", + "name": "Tiene correo?1" } ], "connections": { @@ -3378,7 +3324,7 @@ "main": [ [ { - "node": "Entra hoy?", + "node": "Tiene correo?1", "type": "main", "index": 0 } @@ -3633,7 +3579,7 @@ [], [ { - "node": "Calcular fecha hireDate2", + "node": "Calcular falta 24h o es el mismo dia", "type": "main", "index": 0 } @@ -3895,17 +3841,6 @@ ] ] }, - "Actualizar datos del empleado y sesion asignada3": { - "main": [ - [ - { - "node": "Send a message espanol1", - "type": "main", - "index": 0 - } - ] - ] - }, "Obtener notificados": { "main": [ [ @@ -3917,17 +3852,6 @@ ] ] }, - "Calcular fecha hireDate2": { - "main": [ - [ - { - "node": "Falta 24h para el evento?", - "type": "main", - "index": 0 - } - ] - ] - }, "Falta 24h para el evento?": { "main": [ [ @@ -4006,7 +3930,7 @@ [], [ { - "node": "Calcular fecha hireDate3", + "node": "Calcular falta 48h", "type": "main", "index": 0 } @@ -4042,17 +3966,6 @@ ] ] }, - "Calcular fecha hireDate3": { - "main": [ - [ - { - "node": "Falta 48h para el evento?1", - "type": "main", - "index": 0 - } - ] - ] - }, "Obtener notificados1": { "main": [ [ @@ -4092,6 +4005,57 @@ } ] ] + }, + "Calcular falta 24h o es el mismo dia": { + "main": [ + [ + { + "node": "Falta 24h para el evento?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular falta 48h": { + "main": [ + [ + { + "node": "Falta 48h para el evento?1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar datos del empleado y sesion asignada3": { + "main": [ + [ + { + "node": "Send a message espanol1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Tiene correo?1": { + "main": [ + [ + { + "node": "Entra hoy?", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Insertar a inscritos (inactivo)", + "type": "main", + "index": 0 + } + ] + ] } }, "settings": { @@ -4116,19 +4080,19 @@ "recurrenceRules": [] }, "node:Comenzo evento ingles": { - "lastTimeChecked": "2026-06-16T21:02:11Z" + "lastTimeChecked": "2026-06-17T14:00:20Z" }, "node:Comenzo evento español": { - "lastTimeChecked": "2026-06-16T21:02:11Z" + "lastTimeChecked": "2026-06-17T14:00:06Z" }, "node:Termino evento español": { - "lastTimeChecked": "2026-06-16T21:02:11Z" + "lastTimeChecked": "2026-06-17T13:59:25Z" }, "node:Termino evento ingles": { - "lastTimeChecked": "2026-06-16T21:02:11Z" + "lastTimeChecked": "2026-06-17T13:59:36Z" }, "node:Prueba": { - "lastTimeChecked": "2026-06-16T21:02:11Z" + "lastTimeChecked": "2026-06-17T14:00:12Z" }, "node:Schedule Trigger2": { "recurrenceRules": [] @@ -4165,9 +4129,9 @@ } ] }, - "versionId": "6f31b460-301a-454a-968b-86ead1a077c9", - "activeVersionId": "6f31b460-301a-454a-968b-86ead1a077c9", - "versionCounter": 1451, + "versionId": "1288b143-caf2-4681-a424-dbde596e70f3", + "activeVersionId": "272c60cb-1f1d-4121-8aa3-6cadcb8ae45c", + "versionCounter": 1542, "triggerCount": 10, "shared": [ { @@ -4190,9 +4154,9 @@ ], "tags": [], "activeVersion": { - "updatedAt": "2026-06-16T21:02:12.000Z", - "createdAt": "2026-06-16T21:01:48.335Z", - "versionId": "6f31b460-301a-454a-968b-86ead1a077c9", + "updatedAt": "2026-06-16T22:19:10.000Z", + "createdAt": "2026-06-16T22:17:49.515Z", + "versionId": "272c60cb-1f1d-4121-8aa3-6cadcb8ae45c", "workflowId": "F1iPg8hktNAebZua", "nodes": [ { @@ -5391,7 +5355,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 2672 + 2528 ], "typeVersion": 1, "id": "6d5c0fe5-5ab1-4cdc-bfd2-197dc2144274", @@ -5551,74 +5515,12 @@ "conditions": [ { "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", - "leftValue": "={{ $('Get an employee1').item.json.location }}", + "leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Get an employee1').item.json.location) }}", "rightValue": "Jamaica", "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "32931394-f4ea-4055-b866-906a81988173", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Trinidad and Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Barbados", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "28e49217-0c1a-4462-9642-676e54926d3e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Saint Thomas", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "St. Croix", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Guyana", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "35a50a33-a2b5-4116-9336-11300357569e", - "leftValue": "={{ $('Get an employee1').item.json.location }}", - "rightValue": "Aruba", - "operator": { - "type": "string", - "operation": "equals" + "type": "boolean", + "operation": "true", + "singleValue": true } } ], @@ -5997,7 +5899,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 2048 + 1904 ], "typeVersion": 1, "id": "79ccf49e-4434-4b72-8147-ad27b9d994a2", @@ -6235,74 +6137,12 @@ "conditions": [ { "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", + "leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Obtener notificados').item.json.location) }}", "rightValue": "Jamaica", "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "32931394-f4ea-4055-b866-906a81988173", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Trinidad and Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Barbados", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "28e49217-0c1a-4462-9642-676e54926d3e", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Saint Thomas", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "St. Croix", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Tobago", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "b308c2b6-53b4-4d49-b540-cdc03e36528b", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Guyana", - "operator": { - "type": "string", - "operation": "equals" - } - }, - { - "id": "35a50a33-a2b5-4116-9336-11300357569e", - "leftValue": "={{ $('Obtener notificados').item.json.pais }}", - "rightValue": "Aruba", - "operator": { - "type": "string", - "operation": "equals" + "type": "boolean", + "operation": "true", + "singleValue": true } } ], @@ -6379,19 +6219,6 @@ } } }, - { - "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, - 928 - ], - "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", - "name": "Calcular fecha hireDate2" - }, { "parameters": { "content": "# Eventos inician a las 6pm en hora Bogota\n", @@ -6908,6 +6735,18 @@ { "fieldId": "sesion_id", "fieldValue": "={{ $json.session.id }}" + }, + { + "fieldId": "pais", + "fieldValue": "={{ $('Get an employee1').item.json.location }}" + }, + { + "fieldId": "division", + "fieldValue": "={{ $('Get an employee1').item.json.division }}" + }, + { + "fieldId": "puesto", + "fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}" } ] } @@ -6927,75 +6766,6 @@ } } }, - { - "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", @@ -7291,19 +7061,6 @@ "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", @@ -7402,6 +7159,113 @@ ], "id": "0fea4950-f873-4375-8964-45cfc3fead02", "name": "Falta 48h para el evento?1" + }, + { + "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, + 928 + ], + "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", + "name": "Calcular falta 24h o es el mismo dia" + }, + { + "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 falta 48h" + }, + { + "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 }}" + }, + { + "fieldId": "pais", + "fieldValue": "={{ $('Get an employee1').item.json.location }}" + }, + { + "fieldId": "division", + "fieldValue": "={{ $('Get an employee1').item.json.division }}" + }, + { + "fieldId": "puesto", + "fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1904, + 448 + ], + "id": "f2aca2bd-e72d-4457-9a6b-c4b0f8bcc558", + "name": "Actualizar datos del empleado y sesion asignada3", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } } ], "connections": { @@ -7820,7 +7684,7 @@ [], [ { - "node": "Calcular fecha hireDate2", + "node": "Calcular falta 24h o es el mismo dia", "type": "main", "index": 0 } @@ -8082,17 +7946,6 @@ ] ] }, - "Actualizar datos del empleado y sesion asignada3": { - "main": [ - [ - { - "node": "Send a message espanol1", - "type": "main", - "index": 0 - } - ] - ] - }, "Obtener notificados": { "main": [ [ @@ -8104,17 +7957,6 @@ ] ] }, - "Calcular fecha hireDate2": { - "main": [ - [ - { - "node": "Falta 24h para el evento?", - "type": "main", - "index": 0 - } - ] - ] - }, "Falta 24h para el evento?": { "main": [ [ @@ -8193,7 +8035,7 @@ [], [ { - "node": "Calcular fecha hireDate3", + "node": "Calcular falta 48h", "type": "main", "index": 0 } @@ -8229,17 +8071,6 @@ ] ] }, - "Calcular fecha hireDate3": { - "main": [ - [ - { - "node": "Falta 48h para el evento?1", - "type": "main", - "index": 0 - } - ] - ] - }, "Obtener notificados1": { "main": [ [ @@ -8279,18 +8110,51 @@ } ] ] + }, + "Calcular falta 24h o es el mismo dia": { + "main": [ + [ + { + "node": "Falta 24h para el evento?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular falta 48h": { + "main": [ + [ + { + "node": "Falta 48h para el evento?1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Actualizar datos del empleado y sesion asignada3": { + "main": [ + [ + { + "node": "Send a message espanol1", + "type": "main", + "index": 0 + } + ] + ] } }, "authors": "Eidan Then", - "name": "Version 6f31b460", + "name": "Version 272c60cb", "description": "", "autosaved": true, "workflowPublishHistory": [ { - "createdAt": "2026-06-16T21:02:12.033Z", - "id": 1470, + "createdAt": "2026-06-16T22:19:10.293Z", + "id": 1474, "workflowId": "F1iPg8hktNAebZua", - "versionId": "6f31b460-301a-454a-968b-86ead1a077c9", + "versionId": "272c60cb-1f1d-4121-8aa3-6cadcb8ae45c", "event": "activated", "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" }