From aed1df1ba4aaf31ec495dd0b13eb42b82209f93d Mon Sep 17 00:00:00 2001 From: EidanThen Date: Tue, 16 Jun 2026 18:39:02 +0000 Subject: [PATCH] Update glmway-workflow.json --- glmway-workflow.json | 1214 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 1060 insertions(+), 154 deletions(-) diff --git a/glmway-workflow.json b/glmway-workflow.json index 6a8ea14..291cc0b 100644 --- a/glmway-workflow.json +++ b/glmway-workflow.json @@ -1,6 +1,6 @@ { "$json": { - "updatedAt": "2026-06-16T16:58:16.183Z", + "updatedAt": "2026-06-16T18:38:00.810Z", "createdAt": "2026-06-08T13:50:12.174Z", "id": "F1iPg8hktNAebZua", "name": "GLMWay", @@ -247,8 +247,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 1952, - -304 + 2480, + -352 ], "id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be", "name": "Informacion del supervisor", @@ -411,8 +411,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2000, - -128 + 2528, + -176 ], "id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2", "name": "Get many events1", @@ -441,8 +441,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1296, - -224 + 1872, + -528 ], "id": "2cd687f2-a8b5-4c46-854a-4f60b4d7107f", "name": "Entrenamiento español", @@ -471,8 +471,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1296, - -400 + 1872, + -704 ], "id": "01099730-b224-4b81-98cc-b924e2b02367", "name": "Entrenamiento ingles", @@ -665,8 +665,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 1776, - -528 + 2304, + -576 ], "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": [ - 1808, - -176 + 2336, + -224 ], "id": "77e81486-bffe-457d-8bc0-442c25ff4512", "name": "Entrenamiento ingles1", @@ -791,7 +791,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 848, + 688, -240 ], "id": "8a2be7cc-85ad-4e44-92a7-fe3f94df703f", @@ -825,8 +825,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 1840, - -688 + 2368, + -736 ], "id": "deb40073-dc0e-41e4-ad7c-6df18de25b4f", "name": "Empleado le falta info?" @@ -942,12 +942,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" + }, + { + "fieldId": "sesion_id", + "fieldValue": "={{ $json.session.id }}" } ] } @@ -955,8 +959,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 528, - -240 + 1696, + -400 ], "id": "dcdef9fc-9c61-45dd-9604-56037eac4c31", "name": "Insertar a inscritos (activo)", @@ -1089,7 +1093,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 1088, + 928, -144 ], "id": "09ce1f03-3dfb-4108-9d25-6c05ac622a6f", @@ -1176,7 +1180,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1488, + 1872, -224 ], "id": "e6c3acf5-d54b-4e00-b7a9-74038d27e387", @@ -1203,7 +1207,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1488, + 1872, -400 ], "id": "f173c8d1-9311-405c-a7ee-164726df32f1", @@ -1227,7 +1231,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 800 + 768 ], "typeVersion": 1, "id": "ba58d863-3211-4f53-b087-eb53ba839499", @@ -1786,7 +1790,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1088, + 928, -320 ], "id": "b183c892-8822-4bc3-a92c-4410eac41a01", @@ -1884,8 +1888,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1136, - 1168 + 992, + 1104 ], "id": "10b2cb4e-274d-4913-9345-2c024c071f4c", "name": "Send a message espanol2", @@ -1911,8 +1915,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1136, - 992 + 992, + 928 ], "id": "1dc76989-8c58-4ffe-9e1c-5113a59d346c", "name": "Send a message ingles2", @@ -1939,7 +1943,7 @@ "typeVersion": 1.3, "position": [ -352, - 1040 + 1008 ], "id": "60708d5c-0cd7-45fc-bb67-ed050c1f8022", "name": "Schedule Trigger2" @@ -1989,7 +1993,7 @@ "typeVersion": 1, "position": [ -176, - 1040 + 1008 ], "id": "34aa0bc5-0feb-46e3-871b-27a1cc418675", "name": "Obtener activos", @@ -2033,7 +2037,7 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 688, + 528, -240 ], "id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7", @@ -2195,7 +2199,7 @@ "typeVersion": 3, "position": [ 0, - 1040 + 1008 ], "id": "9e8fd238-541e-455b-8ae5-6a3097eb38a0", "name": "Loop Over Items1" @@ -2207,8 +2211,8 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 1104, - 656 + 1184, + 1104 ], "id": "ee5bb9bc-b8cb-493f-8463-ae0a24cf1f0d", "name": "Wait1", @@ -2304,8 +2308,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 224, - 1040 + 592, + 1008 ], "id": "4d94c907-8ab1-4213-be20-9e24173cf0a3", "name": "Pais?2" @@ -2328,8 +2332,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 432, - 1136 + 800, + 1104 ], "id": "7dd9a706-4d80-45c6-942a-c703eb074a20", "name": "Entrenamiento español2", @@ -2358,8 +2362,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 432, - 960 + 800, + 928 ], "id": "d8253a7a-4e37-4c14-b4da-e0029571cd21", "name": "Entrenamiento ingles5", @@ -2369,6 +2373,250 @@ "name": "Eidan - Google Calendar account" } } + }, + { + "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];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 208, + 1008 + ], + "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", + "name": "Calcular fecha hireDate2" + }, + { + "parameters": { + "content": "# Eventos inician a las 6pm en hora Bogota\n", + "width": 304 + }, + "type": "n8n-nodes-base.stickyNote", + "position": [ + 1424, + 704 + ], + "typeVersion": 1, + "id": "e5378554-9885-4e6d-ab6a-e2cb857c342a", + "name": "Sticky Note9" + }, + { + "parameters": { + "operation": "getAll", + "calendar": { + "__rl": true, + "value": "ethen@gomezleemarketing.com", + "mode": "list", + "cachedResultName": "ethen@gomezleemarketing.com" + }, + "returnAll": true, + "timeMax": "={{ $now.plus({ week: 2 }) }}", + "options": { + "query": "Entrenamiento #TheGLMWay" + } + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 1008, + -656 + ], + "id": "516244e1-3e39-4905-9160-86af296a0479", + "name": "Entrenamiento español3", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + } + }, + { + "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": [ + 1152, + -400 + ], + "id": "e8a65f36-8e8e-4135-b7a2-a7ef4617de2f", + "name": "Crear variable idioma ES" + }, + { + "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": [ + 1152, + -224 + ], + "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": { + "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_sesion_inscrito", + "fieldValue": "={{ $json.session.fecha_sesion }}" + }, + { + "fieldId": "estado", + "fieldValue": "activo" + }, + { + "fieldId": "sesion_id", + "fieldValue": "={{ $json.session.id }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1696, + -224 + ], + "id": "7530270a-b32e-419e-8fc5-b29fa07dda39", + "name": "Insertar a inscritos (activo)1", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } } ], "connections": { @@ -2514,7 +2762,7 @@ "main": [ [ { - "node": "Insertar a inscritos (activo)", + "node": "Obtener coordinador", "type": "main", "index": 0 } @@ -2543,7 +2791,7 @@ "main": [ [ { - "node": "Obtener coordinador", + "node": "Send a message ingles", "type": "main", "index": 0 } @@ -2615,24 +2863,12 @@ }, "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": { @@ -2720,14 +2956,14 @@ "main": [ [ { - "node": "Entrenamiento ingles", + "node": "Crear variable idioma ES", "type": "main", "index": 0 } ], [ { - "node": "Entrenamiento español", + "node": "Crear variable idioma EN", "type": "main", "index": 0 } @@ -2838,7 +3074,7 @@ [], [ { - "node": "Pais?2", + "node": "Calcular fecha hireDate2", "type": "main", "index": 0 } @@ -2862,6 +3098,127 @@ } ] ] + }, + "Entrenamiento ingles5": { + "main": [ + [ + { + "node": "Send a message ingles2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Entrenamiento español2": { + "main": [ + [ + { + "node": "Send a message espanol2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message espanol2": { + "main": [ + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message ingles2": { + "main": [ + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Crear variable idioma ES": { + "main": [ + [ + { + "node": "Obtener sesiones español", + "type": "main", + "index": 0 + } + ] + ] + }, + "Crear variable idioma EN": { + "main": [ + [ + { + "node": "Obtener sesiones ingles", + "type": "main", + "index": 0 + } + ] + ] + }, + "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": "Insertar a inscritos (activo)", + "type": "main", + "index": 0 + } + ] + ] + }, + "Calcular sesion mas cercana1": { + "main": [ + [ + { + "node": "Insertar a inscritos (activo)1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Insertar a inscritos (activo)1": { + "main": [ + [ + { + "node": "Send a message espanol", + "type": "main", + "index": 0 + } + ] + ] } }, "settings": { @@ -2881,19 +3238,19 @@ "recurrenceRules": [] }, "node:Comenzo evento ingles": { - "lastTimeChecked": "2026-06-16T16:48:54Z" + "lastTimeChecked": "2026-06-16T17:59:53Z" }, "node:Comenzo evento español": { - "lastTimeChecked": "2026-06-16T16:48:54Z" + "lastTimeChecked": "2026-06-16T17:59:35Z" }, "node:Termino evento español": { - "lastTimeChecked": "2026-06-16T16:48:54Z" + "lastTimeChecked": "2026-06-16T17:59:55Z" }, "node:Termino evento ingles": { - "lastTimeChecked": "2026-06-16T16:48:54Z" + "lastTimeChecked": "2026-06-16T17:59:24Z" }, "node:Prueba": { - "lastTimeChecked": "2026-06-16T16:48:55Z" + "lastTimeChecked": "2026-06-16T17:59:48Z" }, "node:Schedule Trigger2": { "recurrenceRules": [] @@ -2925,11 +3282,57 @@ "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": "0bcb4b3c-7469-4134-90eb-84792c945546", - "activeVersionId": "063005cf-469e-4361-b778-08acd792e61a", - "versionCounter": 1091, + "versionId": "cb313d9c-7920-41d8-a2b3-ac2ebc3eaae6", + "activeVersionId": "4d030ff9-09d2-42ac-89c7-09d45d3f6db3", + "versionCounter": 1206, "triggerCount": 9, "shared": [ { @@ -2952,9 +3355,9 @@ ], "tags": [], "activeVersion": { - "updatedAt": "2026-06-16T16:48:55.000Z", - "createdAt": "2026-06-16T16:48:53.145Z", - "versionId": "063005cf-469e-4361-b778-08acd792e61a", + "updatedAt": "2026-06-16T17:37:00.000Z", + "createdAt": "2026-06-16T17:36:40.912Z", + "versionId": "4d030ff9-09d2-42ac-89c7-09d45d3f6db3", "workflowId": "F1iPg8hktNAebZua", "nodes": [ { @@ -3196,8 +3599,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 1952, - -304 + 2320, + -368 ], "id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be", "name": "Informacion del supervisor", @@ -3360,8 +3763,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 2000, - -128 + 2368, + -192 ], "id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2", "name": "Get many events1", @@ -3390,7 +3793,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1296, + 1616, -224 ], "id": "2cd687f2-a8b5-4c46-854a-4f60b4d7107f", @@ -3420,7 +3823,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1296, + 1616, -400 ], "id": "01099730-b224-4b81-98cc-b924e2b02367", @@ -3614,8 +4017,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 1776, - -528 + 2144, + -592 ], "id": "ed7dc4ef-e1fe-4305-ba7e-a98b617ee095", "name": "Get row(s) in sheet2", @@ -3668,8 +4071,8 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1808, - -176 + 2176, + -240 ], "id": "77e81486-bffe-457d-8bc0-442c25ff4512", "name": "Entrenamiento ingles1", @@ -3740,7 +4143,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 848, + 688, -240 ], "id": "8a2be7cc-85ad-4e44-92a7-fe3f94df703f", @@ -3774,8 +4177,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 1840, - -688 + 2208, + -752 ], "id": "deb40073-dc0e-41e4-ad7c-6df18de25b4f", "name": "Empleado le falta info?" @@ -3856,7 +4259,7 @@ "typeVersion": 1.3, "position": [ -352, - 320 + 352 ], "id": "20e1c800-bf0b-4484-b836-14bc7154e4e7", "name": "Schedule Trigger1" @@ -3904,8 +4307,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 528, - -240 + 1744, + -560 ], "id": "dcdef9fc-9c61-45dd-9604-56037eac4c31", "name": "Insertar a inscritos (activo)", @@ -4038,7 +4441,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 1088, + 928, -144 ], "id": "09ce1f03-3dfb-4108-9d25-6c05ac622a6f", @@ -4055,7 +4458,7 @@ "typeVersion": 1, "position": [ 192, - 432 + 352 ], "id": "9e00d1ce-5533-4357-977e-31a8da97f232", "name": "Get an employee1", @@ -4086,7 +4489,7 @@ "typeVersion": 4.4, "position": [ 368, - 432 + 352 ], "id": "06c32cb0-a8ab-42c1-ae36-fe628b1b5e2b", "name": "Informacion extra del empleado1", @@ -4107,7 +4510,7 @@ "typeVersion": 3, "position": [ -16, - 320 + 352 ], "id": "36c1682f-35a1-4016-b2ac-77f7e20e3e59", "name": "Loop Over Items" @@ -4125,7 +4528,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1488, + 1808, -224 ], "id": "e6c3acf5-d54b-4e00-b7a9-74038d27e387", @@ -4152,7 +4555,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1488, + 1808, -400 ], "id": "f173c8d1-9311-405c-a7ee-164726df32f1", @@ -4176,7 +4579,7 @@ "type": "n8n-nodes-base.stickyNote", "position": [ -384, - 800 + 768 ], "typeVersion": 1, "id": "ba58d863-3211-4f53-b087-eb53ba839499", @@ -4317,7 +4720,7 @@ "typeVersion": 2, "position": [ 560, - 432 + 352 ], "id": "26d7adef-3c91-410e-b92f-69841d28c039", "name": "Calcular fecha hireDate1" @@ -4351,7 +4754,7 @@ "typeVersion": 2.3, "position": [ 736, - 432 + 352 ], "id": "15a1892d-01e8-432c-91f1-db236317cbca", "name": "Entra hoy?1" @@ -4446,7 +4849,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1520, + 1504, 272 ], "id": "ce9f31d4-454e-4e31-9a22-8173b3fae392", @@ -4470,7 +4873,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1728, + 1712, 368 ], "id": "00c87312-256a-4738-856d-e92b9e144c75", @@ -4500,7 +4903,7 @@ "type": "n8n-nodes-base.googleCalendar", "typeVersion": 1.3, "position": [ - 1728, + 1712, 192 ], "id": "b3c26eeb-2ff9-42c9-b5cc-fe0776e53c46", @@ -4539,7 +4942,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 1280, + 1264, 352 ], "id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4", @@ -4584,7 +4987,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 1520, + 1504, 448 ], "id": "67928478-7604-45a4-9ab0-851079e1470c", @@ -4604,7 +5007,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1920, + 1904, 368 ], "id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b", @@ -4631,7 +5034,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1920, + 1904, 192 ], "id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4", @@ -4735,36 +5138,12 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1088, + 928, -320 ], "id": "b183c892-8822-4bc3-a92c-4410eac41a01", "name": "Pais?" }, - { - "parameters": { - "tableId": "asistencia_glmway", - "fieldsUi": { - "fieldValues": [ - {} - ] - } - }, - "type": "n8n-nodes-base.supabase", - "typeVersion": 1, - "position": [ - 1104, - 640 - ], - "id": "ddf0a273-d3bc-44cc-888b-d789ce72ff77", - "name": "Create a row", - "credentials": { - "supabaseApi": { - "id": "2PlsR6rpK7rQTIEn", - "name": "Sofia test - Supabase account" - } - } - }, { "parameters": { "operation": "update", @@ -4821,7 +5200,7 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 2160, + 2144, 368 ], "id": "98185de1-e81a-440f-8951-f98bd78c707b", @@ -4857,8 +5236,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1136, - 1168 + 992, + 1104 ], "id": "10b2cb4e-274d-4913-9345-2c024c071f4c", "name": "Send a message espanol2", @@ -4884,8 +5263,8 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 1136, - 992 + 992, + 928 ], "id": "1dc76989-8c58-4ffe-9e1c-5113a59d346c", "name": "Send a message ingles2", @@ -4912,7 +5291,7 @@ "typeVersion": 1.3, "position": [ -352, - 1040 + 1008 ], "id": "60708d5c-0cd7-45fc-bb67-ed050c1f8022", "name": "Schedule Trigger2" @@ -4934,7 +5313,7 @@ "typeVersion": 1, "position": [ -176, - 320 + 352 ], "id": "93a65a61-59a9-4903-8a35-dbf66a0ef468", "name": "Obtener inactivos", @@ -4953,7 +5332,7 @@ "conditions": [ { "keyName": "estado", - "keyValue": "inactivo" + "keyValue": "activo" } ] } @@ -4962,7 +5341,7 @@ "typeVersion": 1, "position": [ -176, - 1040 + 1008 ], "id": "34aa0bc5-0feb-46e3-871b-27a1cc418675", "name": "Obtener activos", @@ -5006,7 +5385,7 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 688, + 528, -240 ], "id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7", @@ -5072,7 +5451,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 960, + 944, 352 ], "id": "e67b21c3-ab44-4d27-ada0-719197b5c3df", @@ -5117,7 +5496,7 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 1120, + 1104, 352 ], "id": "3a6f198b-e136-49fb-a171-78164e10b600", @@ -5129,6 +5508,432 @@ "name": "Eidan - Google Sheets account" } } + }, + { + "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": {} + }, + "type": "n8n-nodes-base.splitInBatches", + "typeVersion": 3, + "position": [ + 0, + 1008 + ], + "id": "9e8fd238-541e-455b-8ae5-6a3097eb38a0", + "name": "Loop Over Items1" + }, + { + "parameters": { + "amount": 2 + }, + "type": "n8n-nodes-base.wait", + "typeVersion": 1.1, + "position": [ + 1184, + 1104 + ], + "id": "ee5bb9bc-b8cb-493f-8463-ae0a24cf1f0d", + "name": "Wait1", + "webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7", + "leftValue": "={{ $('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" + } + } + ], + "combinator": "or" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 592, + 1008 + ], + "id": "4d94c907-8ab1-4213-be20-9e24173cf0a3", + "name": "Pais?2" + }, + { + "parameters": { + "operation": "getAll", + "calendar": { + "__rl": true, + "value": "ethen@gomezleemarketing.com", + "mode": "list", + "cachedResultName": "ethen@gomezleemarketing.com" + }, + "returnAll": true, + "timeMax": "={{ $now.plus({ week: 2 }) }}", + "options": { + "query": "Entrenamiento #TheGLMWay" + } + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 800, + 1104 + ], + "id": "7dd9a706-4d80-45c6-942a-c703eb074a20", + "name": "Entrenamiento español2", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + } + }, + { + "parameters": { + "operation": "getAll", + "calendar": { + "__rl": true, + "value": "ethen@gomezleemarketing.com", + "mode": "list", + "cachedResultName": "ethen@gomezleemarketing.com" + }, + "returnAll": true, + "timeMax": "={{ $now.plus({ week: 2 }) }}", + "options": { + "query": "#TheGLMWay Training" + } + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 800, + 928 + ], + "id": "d8253a7a-4e37-4c14-b4da-e0029571cd21", + "name": "Entrenamiento ingles5", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + } + }, + { + "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];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 208, + 1008 + ], + "id": "bbd0558c-3b3a-462b-957c-83b1975e5413", + "name": "Calcular fecha hireDate2" + }, + { + "parameters": { + "content": "# Eventos inician a las 6pm en hora Bogota\n", + "width": 304 + }, + "type": "n8n-nodes-base.stickyNote", + "position": [ + 1424, + 704 + ], + "typeVersion": 1, + "id": "e5378554-9885-4e6d-ab6a-e2cb857c342a", + "name": "Sticky Note9" + }, + { + "parameters": { + "operation": "getAll", + "calendar": { + "__rl": true, + "value": "ethen@gomezleemarketing.com", + "mode": "list", + "cachedResultName": "ethen@gomezleemarketing.com" + }, + "returnAll": true, + "timeMax": "={{ $now.plus({ week: 2 }) }}", + "options": { + "query": "Entrenamiento #TheGLMWay" + } + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 1008, + -656 + ], + "id": "516244e1-3e39-4905-9160-86af296a0479", + "name": "Entrenamiento español3", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + } + }, + { + "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": [ + 1152, + -400 + ], + "id": "e8a65f36-8e8e-4135-b7a2-a7ef4617de2f", + "name": "Crear variable idioma ES" + }, + { + "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": [ + 1152, + -224 + ], + "id": "971ae719-5692-4f87-9a57-2287ee44783d", + "name": "Crear variable idioma EN" + }, + { + "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": [ + 1344, + -400 + ], + "id": "cb9e8a10-a1e7-40c7-8447-2379b0191a8f", + "name": "Obtener sesiones español", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "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": [ + 1344, + -224 + ], + "id": "948bae7c-af74-4d8e-8efe-f7caa4ee3db0", + "name": "Obtener sesiones ingles", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } } ], "connections": { @@ -5274,7 +6079,7 @@ "main": [ [ { - "node": "Insertar a inscritos (activo)", + "node": "Obtener coordinador", "type": "main", "index": 0 } @@ -5301,13 +6106,7 @@ }, "Insertar a inscritos (activo)": { "main": [ - [ - { - "node": "Obtener coordinador", - "type": "main", - "index": 0 - } - ] + [] ] }, "Hay coordinador?": { @@ -5480,14 +6279,14 @@ "main": [ [ { - "node": "Entrenamiento ingles", + "node": "Crear variable idioma ES", "type": "main", "index": 0 } ], [ { - "node": "Entrenamiento español", + "node": "Crear variable idioma EN", "type": "main", "index": 0 } @@ -5581,18 +6380,125 @@ } ] ] + }, + "Obtener activos": { + "main": [ + [ + { + "node": "Loop Over Items1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Loop Over Items1": { + "main": [ + [], + [ + { + "node": "Calcular fecha hireDate2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Pais?2": { + "main": [ + [ + { + "node": "Entrenamiento ingles5", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Entrenamiento español2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Entrenamiento ingles5": { + "main": [ + [ + { + "node": "Send a message ingles2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Entrenamiento español2": { + "main": [ + [ + { + "node": "Send a message espanol2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message espanol2": { + "main": [ + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Send a message ingles2": { + "main": [ + [ + { + "node": "Wait1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Crear variable idioma ES": { + "main": [ + [ + { + "node": "Obtener sesiones español", + "type": "main", + "index": 0 + } + ] + ] + }, + "Crear variable idioma EN": { + "main": [ + [ + { + "node": "Obtener sesiones ingles", + "type": "main", + "index": 0 + } + ] + ] } }, "authors": "Eidan Then", - "name": "Version 063005cf", + "name": "Version 4d030ff9", "description": "", "autosaved": true, "workflowPublishHistory": [ { - "createdAt": "2026-06-16T16:48:55.159Z", - "id": 1441, + "createdAt": "2026-06-16T17:37:00.662Z", + "id": 1445, "workflowId": "F1iPg8hktNAebZua", - "versionId": "063005cf-469e-4361-b778-08acd792e61a", + "versionId": "4d030ff9-09d2-42ac-89c7-09d45d3f6db3", "event": "activated", "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" }