From a888b1abb18fd7d31dfb2bcdce441cb67b9d8195 Mon Sep 17 00:00:00 2001 From: EidanThen Date: Tue, 21 Jul 2026 16:53:20 +0000 Subject: [PATCH] Update glmway-workflow.json --- glmway-workflow.json | 756 ++++++++++++++++++------------------------- 1 file changed, 322 insertions(+), 434 deletions(-) diff --git a/glmway-workflow.json b/glmway-workflow.json index 4451e5c..538ac51 100644 --- a/glmway-workflow.json +++ b/glmway-workflow.json @@ -1,6 +1,6 @@ { "$json": { - "updatedAt": "2026-07-21T15:16:43.905Z", + "updatedAt": "2026-07-21T16:43:20.096Z", "createdAt": "2026-06-08T13:50:12.174Z", "id": "F1iPg8hktNAebZua", "name": "GLMWay", @@ -1157,7 +1157,7 @@ { "parameters": { "content": "## Recordatorio a nuevo ingreso 24 horas antes de la sesion\n", - "height": 464, + "height": 480, "width": 2080, "color": 6 }, @@ -1174,7 +1174,7 @@ "parameters": { "content": "## Recordatorio a coordinador RRHH 48 y 24 horas antes de la sesion\n", "height": 496, - "width": 3152, + "width": 2928, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -1285,7 +1285,7 @@ "parameters": { "content": "## Completar datos y enviar invitacion", "height": 544, - "width": 3920, + "width": 4032, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -1372,7 +1372,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1136, + 1696, 352 ], "id": "ce9f31d4-454e-4e31-9a22-8173b3fae392", @@ -1465,8 +1465,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 3056, - 352 + 1328, + 256 ], "id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4", "name": "Hay coordinador?1" @@ -1510,8 +1510,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 3232, - 432 + 1504, + 384 ], "id": "67928478-7604-45a4-9ab0-851079e1470c", "name": "Alerta no hay coordinador RRHH1" @@ -1529,7 +1529,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 2480, + 3072, 272 ], "id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b", @@ -1555,7 +1555,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 2480, + 3072, 448 ], "id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4", @@ -1658,7 +1658,7 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 3408, + 3488, 352 ], "id": "98185de1-e81a-440f-8951-f98bd78c707b", @@ -1813,8 +1813,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 752, - -352 + 1024, + -688 ], "id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7", "name": "Obtener coordinador", @@ -1826,49 +1826,6 @@ } } }, - { - "parameters": { - "documentId": { - "__rl": true, - "value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg", - "mode": "list", - "cachedResultName": "Calendario #TheGLMWay", - "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit?usp=drivesdk" - }, - "sheetName": { - "__rl": true, - "value": 169172567, - "mode": "list", - "cachedResultName": "Coordinadores RRHH", - "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit#gid=169172567" - }, - "filtersUI": { - "values": [ - { - "lookupColumn": "Pais", - "lookupValue": "={{ $('Get an employee1').item.json.location }}" - } - ] - }, - "options": {} - }, - "type": "n8n-nodes-base.googleSheets", - "typeVersion": 4.7, - "position": [ - 2896, - 352 - ], - "id": "3a6f198b-e136-49fb-a171-78164e10b600", - "name": "Obtener coordinador1", - "alwaysOutputData": true, - "retryOnFail": true, - "credentials": { - "googleSheetsOAuth2Api": { - "id": "8Pp0ek3NPsEkyXfY", - "name": "Eidan - Google Sheets account" - } - } - }, { "parameters": { "options": {} @@ -2165,7 +2122,7 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1360, + 1952, 272 ], "id": "430a2b66-f0f3-4032-bca1-29b01bd8c577", @@ -2188,7 +2145,7 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1360, + 1952, 448 ], "id": "9d53a7e1-6dab-494b-8064-6c3063f5596f", @@ -2201,7 +2158,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1744, + 2336, 272 ], "id": "ee31fd24-d703-44b3-b65b-75234564d29f", @@ -2214,7 +2171,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1744, + 2336, 448 ], "id": "24f2e53d-9280-445b-b37e-776b41ca53e2", @@ -2270,7 +2227,8 @@ "fieldValue": "={{ $('Get an employee').item.json.location }}" }, { - "fieldId": "coordinador_rrhh" + "fieldId": "coordinador_rrhh", + "fieldValue": "={{ $('Obtener coordinador3').item.json.nombre }}" } ] } @@ -2340,7 +2298,8 @@ "fieldValue": "={{ $('Get an employee').item.json.location }}" }, { - "fieldId": "coordinador_rrhh" + "fieldId": "coordinador_rrhh", + "fieldValue": "={{ $('Obtener coordinador3').item.json.nombre }}" } ] } @@ -2376,7 +2335,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1552, + 2144, 272 ], "id": "f034ee45-742b-4f18-9003-333a4c087cf7", @@ -2404,7 +2363,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1552, + 2144, 448 ], "id": "2c35fe0e-1f32-4263-9c02-c392cb77e0e5", @@ -2599,7 +2558,7 @@ "typeVersion": 1.3, "position": [ -352, - 1568 + 1552 ], "id": "6951af7d-5098-4156-81bd-8f67034fcf70", "name": "Schedule Trigger3" @@ -2611,8 +2570,8 @@ "type": "n8n-nodes-base.splitInBatches", "typeVersion": 3, "position": [ - 416, - 1296 + 704, + 1376 ], "id": "7545364a-df0a-4420-a1af-5bcd4f8c9602", "name": "Loop Over Items2" @@ -2721,8 +2680,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1824, - 1440 + 1520, + 1536 ], "id": "13ee807a-f1cd-48ef-921b-7b5c260ba116", "name": "Pais?3" @@ -2755,8 +2714,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - -32, - 1376 + 432, + 1344 ], "id": "0fea4950-f873-4375-8964-45cfc3fead02", "name": "Falta 48h para el evento?1" @@ -3692,7 +3651,7 @@ "typeVersion": 1, "position": [ -192, - 1568 + 1552 ], "id": "a4fc1575-5326-467f-8b05-f8c9569cdca1", "name": "Obtener sesiones", @@ -3744,8 +3703,8 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - -224, - 1376 + 240, + 1344 ], "id": "e8d383b8-9081-4829-8516-a03f6f5a1b63", "name": "Calcular falta 48h o 24h" @@ -3773,8 +3732,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 768, - 1440 + 464, + 1536 ], "id": "0457dbf8-9c04-4f2d-9928-4f770eb51cc0", "name": "Obtener coordinadores1", @@ -3814,7 +3773,7 @@ "typeVersion": 2.3, "position": [ 208, - 1568 + 1552 ], "id": "334a5703-db8a-4a88-b528-8468ee61ddbc", "name": "Hay inscritos en la sesion?" @@ -3826,26 +3785,12 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 960, - 1440 + 656, + 1536 ], "id": "3073d739-a2c7-4ba1-81bc-aeae266ad3ff", "name": "Matchear coordinador y pais inscrito" }, - { - "parameters": { - "amount": 2 - }, - "type": "n8n-nodes-base.wait", - "typeVersion": 1.1, - "position": [ - 2640, - 1488 - ], - "id": "8fef83c7-d197-484c-b40f-817a198bf5fc", - "name": "Wait6", - "webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af" - }, { "parameters": { "operation": "update", @@ -3871,8 +3816,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 2464, - 1488 + 2160, + 1584 ], "id": "0881ba84-bd04-4e91-9c09-0ba18e28ed28", "name": "Actualizar estado a notificado", @@ -4004,7 +3949,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 2688, + 3280, 272 ], "id": "f3df197d-b557-45d7-94bb-76f3c300ae61", @@ -4035,7 +3980,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 2688, + 3280, 448 ], "id": "23ac8709-b0ac-4bb6-911a-1e7641be075d", @@ -4074,7 +4019,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2096, + 2688, 272 ], "id": "0d7870a9-0d82-49fe-96de-05c20164cffa", @@ -4087,7 +4032,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2096, + 2688, 448 ], "id": "4abc2638-3ae3-4aba-b45f-0b60e73e3267", @@ -4153,7 +4098,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2288, + 2880, 272 ], "id": "bbd8c7de-64eb-4262-a77b-b7307ab9c0c6", @@ -4166,7 +4111,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2288, + 2880, 448 ], "id": "677acc91-b856-482e-aa2c-9b329221918a", @@ -4403,7 +4348,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1904, + 2496, 272 ], "id": "16d364da-e6fc-4943-bd64-f83ccab66b9f", @@ -4480,7 +4425,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1904, + 2496, 448 ], "id": "f2aca2bd-e72d-4457-9a6b-c4b0f8bcc558", @@ -5034,8 +4979,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 2224, - 1360 + 1920, + 1456 ], "id": "5d50cef9-0ebb-4f28-8deb-69c7feb6f62e", "name": "Enviar al espacio de prueba1", @@ -5053,8 +4998,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 2224, - 1536 + 1920, + 1632 ], "id": "c83590cd-6e98-4e2d-81f6-6e2f204a948d", "name": "Enviar al espacio de prueba2", @@ -5067,21 +5012,21 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2048, - 1536 + 1744, + 1632 ], "id": "87ace248-4ea5-406f-89da-88d450ad413e", "name": "Formatear datos espanol2" }, { "parameters": { - "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular sesion mas cercana4\"\nconst sessionNode = $('Calcular sesion mas cercana4').first();\nconst session = sessionNode?.json?.session || {};\nconst titulo = session.titulo || \"Untitled\";\nconst horaInicio = session.hora_inicio || \"--:--\";\nconst horaFin = session.hora_fin || \"--:--\";\nconst enlace = session.enlace_reunion || \"\";\n\n// 2. Contar participantes sumando los de todos los países de forma dinámica\nlet totalParticipantes = 0;\nif (session.participantes) {\n Object.keys(session.participantes).forEach(pais => {\n const listaPais = session.participantes[pais];\n if (Array.isArray(listaPais)) {\n totalParticipantes += listaPais.length;\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos2').all();\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con los datos de la sesión\nconst body = {\n text: `🔔 *#TheGLMWay Reminder for today* \\n\\nInstructor: ${menciones}`,\n cardsV2: [\n {\n cardId: \"session-reminder\",\n card: {\n header: {\n title: \"🎓 Training Session\"\n },\n sections: [\n {\n widgets: [\n {\n textParagraph: {\n text: `Topic: ${titulo}
` +\n `Registered participants: ${totalParticipantes} people`\n }\n },\n {\n textParagraph: {\n text: `👉 Join the meeting here`\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" + "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular falta 48h o 24h1\"\nconst sessionNode = $('Calcular falta 48h o 24h1').first();\nconst sesion = sessionNode?.json?.sesion || {}; // Leído desde la raíz del JSON\n\n// 2. Contar participantes y construir de forma dinámica la lista por país\nlet totalParticipantes = 0;\nlet listaParticipantesTexto = \"\";\n\nif (sesion.participantes) {\n Object.keys(sesion.participantes).forEach(pais => {\n const listaPais = sesion.participantes[pais];\n if (Array.isArray(listaPais) && listaPais.length > 0) {\n totalParticipantes += listaPais.length;\n \n // Añadir el encabezado del país\n listaParticipantesTexto += `
📍 ${pais} (${listaPais.length}):
`;\n \n // Listar cada participante de ese país\n listaPais.forEach(p => {\n listaParticipantesTexto += `• ${p.nombre} (${p.departamento || 'Sin Depto'} | ${p.division || 'Sin Division'})
`;\n });\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones de los coordinadores\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos3').all(); // Asegúrate de verificar si tu nodo se llama Unir datos3 o similar\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con formato Google Chat Card\nconst body = {\n text: `🔔 *HR Coordinator Notification* \\nDear ${menciones}, here is the list of people registered for tomorrow's session.`,\n cardsV2: [\n {\n cardId: \"session-reminder-hr\",\n card: {\n header: {\n title: `🎓 Tomorrow's #TheGLMWay Training`,\n },\n sections: [\n {\n header: \"📈 Attendance Summary\",\n widgets: [\n {\n textParagraph: {\n text: `Total registered: ${totalParticipantes} people
` + \n listaParticipantesTexto\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2048, - 1360 + 1744, + 1456 ], "id": "bb4cbe19-9364-4c83-a309-5594d9c5a26b", "name": "Formatear datos ingles2" @@ -5094,7 +5039,7 @@ "typeVersion": 2, "position": [ 0, - 1568 + 1552 ], "id": "47542a5b-ebe1-4e85-8229-bb9aa7e1b744", "name": "Calcular falta 48h o 24h1" @@ -5111,8 +5056,8 @@ "type": "n8n-nodes-base.googleContacts", "typeVersion": 1, "position": [ - 1504, - 1440 + 1200, + 1536 ], "id": "f49640d2-f7a0-43da-b9e1-1da5dbe93a22", "name": "Get a contact1", @@ -5130,8 +5075,8 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1328, - 1440 + 1024, + 1536 ], "id": "c17d8ecc-45f9-4c03-a4d4-88d90ae8a3ec", "name": "Limpiar id1" @@ -5143,8 +5088,8 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1664, - 1440 + 1360, + 1536 ], "id": "73de340f-189b-4963-bdf6-9b1bfd603cd6", "name": "Unir datos3" @@ -5159,8 +5104,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 1168, - 1440 + 864, + 1536 ], "id": "949eb6ae-2aba-43d2-a262-f91313336d2f", "name": "Obtener miembros RRHH Notificaciones", @@ -5171,6 +5116,62 @@ "name": "Eidan - Chat account" } } + }, + { + "parameters": { + "operation": "get", + "tableId": "coordinadores_rrhh_glmway", + "filters": { + "conditions": [ + { + "keyName": "pais", + "keyValue": "={{ $('Get an employee').item.json.location }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 736, + -352 + ], + "id": "aeb15925-1828-426e-a437-809aee1df732", + "name": "Obtener coordinador3", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "get", + "tableId": "coordinadores_rrhh_glmway", + "filters": { + "conditions": [ + { + "keyName": "pais", + "keyValue": "={{ $('Get an employee1').item.json.location }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1136, + 256 + ], + "id": "e909b37d-a192-4845-b80f-fb1b245a6614", + "name": "Obtener coordinador4", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } } ], "connections": { @@ -5311,7 +5312,7 @@ "main": [ [ { - "node": "Obtener coordinador", + "node": "Obtener coordinador3", "type": "main", "index": 0 } @@ -5424,7 +5425,7 @@ "main": [ [ { - "node": "Pais?1", + "node": "Obtener coordinador4", "type": "main", "index": 0 } @@ -5470,7 +5471,7 @@ "main": [ [ { - "node": "Wait", + "node": "Pais?1", "type": "main", "index": 0 } @@ -5559,24 +5560,7 @@ }, "Obtener coordinador": { "main": [ - [ - { - "node": "Hay coordinador?", - "type": "main", - "index": 0 - } - ] - ] - }, - "Obtener coordinador1": { - "main": [ - [ - { - "node": "Hay coordinador?1", - "type": "main", - "index": 0 - } - ] + [] ] }, "Loop Over Items1": { @@ -5799,7 +5783,7 @@ "main": [ [ { - "node": "Wait", + "node": "Pais?1", "type": "main", "index": 0 } @@ -6237,20 +6221,9 @@ ] ] }, - "Wait6": { - "main": [ - [] - ] - }, "Actualizar estado a notificado": { "main": [ - [ - { - "node": "Wait6", - "type": "main", - "index": 0 - } - ] + [] ] }, "Hay inscritos?": { @@ -6285,7 +6258,7 @@ "main": [ [ { - "node": "Obtener coordinador1", + "node": "Wait", "type": "main", "index": 0 } @@ -6296,7 +6269,7 @@ "main": [ [ { - "node": "Obtener coordinador1", + "node": "Wait", "type": "main", "index": 0 } @@ -6780,6 +6753,28 @@ } ] ] + }, + "Obtener coordinador3": { + "main": [ + [ + { + "node": "Hay coordinador?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener coordinador4": { + "main": [ + [ + { + "node": "Hay coordinador?1", + "type": "main", + "index": 0 + } + ] + ] } }, "settings": { @@ -6804,19 +6799,19 @@ "recurrenceRules": [] }, "node:Comenzo evento ingles": { - "lastTimeChecked": "2026-07-21T15:16:49Z" + "lastTimeChecked": "2026-07-21T16:43:23Z" }, "node:Comenzo evento español": { - "lastTimeChecked": "2026-07-21T15:16:49Z" + "lastTimeChecked": "2026-07-21T16:43:24Z" }, "node:Termino evento español": { - "lastTimeChecked": "2026-07-21T15:16:50Z" + "lastTimeChecked": "2026-07-21T16:43:24Z" }, "node:Termino evento ingles": { - "lastTimeChecked": "2026-07-21T15:16:50Z" + "lastTimeChecked": "2026-07-21T16:43:24Z" }, "node:Prueba": { - "lastTimeChecked": "2026-07-21T15:16:50Z" + "lastTimeChecked": "2026-07-21T16:43:27Z" }, "node:Schedule Trigger2": { "recurrenceRules": [] @@ -6834,10 +6829,10 @@ "recurrenceRules": [] }, "node:Prueba1": { - "lastTimeChecked": "2026-07-21T15:16:50Z" + "lastTimeChecked": "2026-07-21T16:43:27Z" }, "node:Inicio evento español1": { - "lastTimeChecked": "2026-07-21T15:16:50Z" + "lastTimeChecked": "2026-07-21T16:43:28Z" } }, "meta": { @@ -7040,113 +7035,11 @@ "item": 0 } } - ], - "Calcular falta 48h o 24h1": [ - { - "json": { - "sesion": { - "titulo": "#TheGLMWay Training", - "descripcion": null, - "fecha_sesion": "22 July", - "hora_inicio": "19:00", - "hora_fin": "20:00", - "instructor": "Francis", - "enlace_reunion": "https://meet.google.com/mmc-iupp-sao", - "idioma": "EN", - "created_at": "2026-06-25T21:44:29.483246+00:00", - "id": "eb17c8a3-618f-470c-9bc1-eb6b0c45c869", - "correo_instructor": "null", - "meet_id": "c82i08rqs6mt3gg9j4it0mulmc_20260722T230000Z", - "participantes": { - "Colombia": [ - { - "correo": "ccendales@gomezleemarketing.com", - "nombre": "Camilo Andres Cendales Sanchez", - "division": "GLM Colombia", - "departamento": "GLM Analytics" - }, - { - "correo": "aperez09@gomezleemarketing.com", - "nombre": "Alejandro Perez Paez", - "division": "GLM Colombia", - "departamento": "GLM Analytics" - }, - { - "correo": "lmarquinez@gomezlee.marketing", - "nombre": "Leydy Jhoanna Marquinez Erazo", - "division": "Whirlpool", - "departamento": "Field Force" - }, - { - "correo": "ngarcia02@gomezlee.marketing", - "nombre": "Nicol Garcia Romero", - "division": "Whirlpool", - "departamento": "Field Force" - }, - { - "correo": "mmendoza06@gomezlee.marketing", - "nombre": "Melany Giselle Mendoza Garcia", - "division": "Whirlpool", - "departamento": "Field Force" - }, - { - "correo": "wcampos02@gomezlee.marketing", - "nombre": "Wilson Guillermo Campos Cardona", - "division": "", - "departamento": "Field Force" - } - ], - "Guatemala": [ - { - "correo": "yrodas@gomezlee.marketing", - "nombre": "Yamileth Del Carmen Rodas García", - "division": "Motorola", - "departamento": "Field Force" - }, - { - "correo": "jvillatoro02@gomezlee.marketing", - "nombre": "Jennifer Anali Villatoro Méndez", - "division": "Motorola", - "departamento": "Field Force" - }, - { - "correo": "hcortez@gomezlee.marketing", - "nombre": "Helen Cortez", - "division": "Motorola", - "departamento": "Field Force" - } - ], - "Jamaica": [ - { - "correo": "yrodas@gomezlee.marketing", - "nombre": "Yamileth Del Carmen Rodas García", - "division": "Motorola", - "departamento": "Field Force" - }, - { - "correo": "jvillatoro02@gomezlee.marketing", - "nombre": "Jennifer Anali Villatoro Méndez", - "division": "Motorola", - "departamento": "Field Force" - }, - { - "correo": "hcortez@gomezlee.marketing", - "nombre": "Helen Cortez", - "division": "Motorola", - "departamento": "Field Force" - } - ] - } - }, - "fecha_hoy": "18 July", - "diferenciaDias": 4 - } - } ] }, - "versionId": "69f1dcec-ccc3-4ec2-9e89-7e8b63f7197a", - "activeVersionId": "69f1dcec-ccc3-4ec2-9e89-7e8b63f7197a", - "versionCounter": 5448, + "versionId": "292a4ad1-cef4-4822-9273-dcdb491ea1bf", + "activeVersionId": "292a4ad1-cef4-4822-9273-dcdb491ea1bf", + "versionCounter": 5530, "triggerCount": 15, "shared": [ { @@ -7169,9 +7062,9 @@ ], "tags": [], "activeVersion": { - "updatedAt": "2026-07-21T15:16:51.000Z", - "createdAt": "2026-07-21T15:16:43.913Z", - "versionId": "69f1dcec-ccc3-4ec2-9e89-7e8b63f7197a", + "updatedAt": "2026-07-21T16:43:28.000Z", + "createdAt": "2026-07-21T16:43:20.103Z", + "versionId": "292a4ad1-cef4-4822-9273-dcdb491ea1bf", "workflowId": "F1iPg8hktNAebZua", "nodes": [ { @@ -8323,7 +8216,7 @@ { "parameters": { "content": "## Recordatorio a nuevo ingreso 24 horas antes de la sesion\n", - "height": 464, + "height": 480, "width": 2080, "color": 6 }, @@ -8340,7 +8233,7 @@ "parameters": { "content": "## Recordatorio a coordinador RRHH 48 y 24 horas antes de la sesion\n", "height": 496, - "width": 3152, + "width": 2928, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -8451,7 +8344,7 @@ "parameters": { "content": "## Completar datos y enviar invitacion", "height": 544, - "width": 3920, + "width": 4032, "color": 6 }, "type": "n8n-nodes-base.stickyNote", @@ -8538,7 +8431,7 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1136, + 1696, 352 ], "id": "ce9f31d4-454e-4e31-9a22-8173b3fae392", @@ -8631,8 +8524,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.3, "position": [ - 3056, - 352 + 1328, + 256 ], "id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4", "name": "Hay coordinador?1" @@ -8676,8 +8569,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 3232, - 432 + 1504, + 384 ], "id": "67928478-7604-45a4-9ab0-851079e1470c", "name": "Alerta no hay coordinador RRHH1" @@ -8695,7 +8588,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 2480, + 3072, 272 ], "id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b", @@ -8721,7 +8614,7 @@ "type": "n8n-nodes-base.gmail", "typeVersion": 2.2, "position": [ - 2480, + 3072, 448 ], "id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4", @@ -8824,7 +8717,7 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 3408, + 3488, 352 ], "id": "98185de1-e81a-440f-8951-f98bd78c707b", @@ -8979,8 +8872,8 @@ "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.7, "position": [ - 752, - -352 + 1024, + -688 ], "id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7", "name": "Obtener coordinador", @@ -8992,49 +8885,6 @@ } } }, - { - "parameters": { - "documentId": { - "__rl": true, - "value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg", - "mode": "list", - "cachedResultName": "Calendario #TheGLMWay", - "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit?usp=drivesdk" - }, - "sheetName": { - "__rl": true, - "value": 169172567, - "mode": "list", - "cachedResultName": "Coordinadores RRHH", - "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit#gid=169172567" - }, - "filtersUI": { - "values": [ - { - "lookupColumn": "Pais", - "lookupValue": "={{ $('Get an employee1').item.json.location }}" - } - ] - }, - "options": {} - }, - "type": "n8n-nodes-base.googleSheets", - "typeVersion": 4.7, - "position": [ - 2896, - 352 - ], - "id": "3a6f198b-e136-49fb-a171-78164e10b600", - "name": "Obtener coordinador1", - "alwaysOutputData": true, - "retryOnFail": true, - "credentials": { - "googleSheetsOAuth2Api": { - "id": "8Pp0ek3NPsEkyXfY", - "name": "Eidan - Google Sheets account" - } - } - }, { "parameters": { "options": {} @@ -9331,7 +9181,7 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1360, + 1952, 272 ], "id": "430a2b66-f0f3-4032-bca1-29b01bd8c577", @@ -9354,7 +9204,7 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1360, + 1952, 448 ], "id": "9d53a7e1-6dab-494b-8064-6c3063f5596f", @@ -9367,7 +9217,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1744, + 2336, 272 ], "id": "ee31fd24-d703-44b3-b65b-75234564d29f", @@ -9380,7 +9230,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1744, + 2336, 448 ], "id": "24f2e53d-9280-445b-b37e-776b41ca53e2", @@ -9436,7 +9286,8 @@ "fieldValue": "={{ $('Get an employee').item.json.location }}" }, { - "fieldId": "coordinador_rrhh" + "fieldId": "coordinador_rrhh", + "fieldValue": "={{ $('Obtener coordinador3').item.json.nombre }}" } ] } @@ -9506,7 +9357,8 @@ "fieldValue": "={{ $('Get an employee').item.json.location }}" }, { - "fieldId": "coordinador_rrhh" + "fieldId": "coordinador_rrhh", + "fieldValue": "={{ $('Obtener coordinador3').item.json.nombre }}" } ] } @@ -9542,7 +9394,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1552, + 2144, 272 ], "id": "f034ee45-742b-4f18-9003-333a4c087cf7", @@ -9570,7 +9422,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1552, + 2144, 448 ], "id": "2c35fe0e-1f32-4263-9c02-c392cb77e0e5", @@ -9765,7 +9617,7 @@ "typeVersion": 1.3, "position": [ -352, - 1568 + 1552 ], "id": "6951af7d-5098-4156-81bd-8f67034fcf70", "name": "Schedule Trigger3" @@ -9777,8 +9629,8 @@ "type": "n8n-nodes-base.splitInBatches", "typeVersion": 3, "position": [ - 416, - 1296 + 704, + 1376 ], "id": "7545364a-df0a-4420-a1af-5bcd4f8c9602", "name": "Loop Over Items2" @@ -9887,8 +9739,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1824, - 1440 + 1520, + 1536 ], "id": "13ee807a-f1cd-48ef-921b-7b5c260ba116", "name": "Pais?3" @@ -9921,8 +9773,8 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - -32, - 1376 + 432, + 1344 ], "id": "0fea4950-f873-4375-8964-45cfc3fead02", "name": "Falta 48h para el evento?1" @@ -10858,7 +10710,7 @@ "typeVersion": 1, "position": [ -192, - 1568 + 1552 ], "id": "a4fc1575-5326-467f-8b05-f8c9569cdca1", "name": "Obtener sesiones", @@ -10910,8 +10762,8 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - -224, - 1376 + 240, + 1344 ], "id": "e8d383b8-9081-4829-8516-a03f6f5a1b63", "name": "Calcular falta 48h o 24h" @@ -10939,8 +10791,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 768, - 1440 + 464, + 1536 ], "id": "0457dbf8-9c04-4f2d-9928-4f770eb51cc0", "name": "Obtener coordinadores1", @@ -10980,7 +10832,7 @@ "typeVersion": 2.3, "position": [ 208, - 1568 + 1552 ], "id": "334a5703-db8a-4a88-b528-8468ee61ddbc", "name": "Hay inscritos en la sesion?" @@ -10992,26 +10844,12 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 960, - 1440 + 656, + 1536 ], "id": "3073d739-a2c7-4ba1-81bc-aeae266ad3ff", "name": "Matchear coordinador y pais inscrito" }, - { - "parameters": { - "amount": 2 - }, - "type": "n8n-nodes-base.wait", - "typeVersion": 1.1, - "position": [ - 2640, - 1488 - ], - "id": "8fef83c7-d197-484c-b40f-817a198bf5fc", - "name": "Wait6", - "webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af" - }, { "parameters": { "operation": "update", @@ -11037,8 +10875,8 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 2464, - 1488 + 2160, + 1584 ], "id": "0881ba84-bd04-4e91-9c09-0ba18e28ed28", "name": "Actualizar estado a notificado", @@ -11170,7 +11008,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 2688, + 3280, 272 ], "id": "f3df197d-b557-45d7-94bb-76f3c300ae61", @@ -11201,7 +11039,7 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 2688, + 3280, 448 ], "id": "23ac8709-b0ac-4bb6-911a-1e7641be075d", @@ -11240,7 +11078,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2096, + 2688, 272 ], "id": "0d7870a9-0d82-49fe-96de-05c20164cffa", @@ -11253,7 +11091,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2096, + 2688, 448 ], "id": "4abc2638-3ae3-4aba-b45f-0b60e73e3267", @@ -11319,7 +11157,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2288, + 2880, 272 ], "id": "bbd8c7de-64eb-4262-a77b-b7307ab9c0c6", @@ -11332,7 +11170,7 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2288, + 2880, 448 ], "id": "677acc91-b856-482e-aa2c-9b329221918a", @@ -11569,7 +11407,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1904, + 2496, 272 ], "id": "16d364da-e6fc-4943-bd64-f83ccab66b9f", @@ -11646,7 +11484,7 @@ "type": "n8n-nodes-base.supabase", "typeVersion": 1, "position": [ - 1904, + 2496, 448 ], "id": "f2aca2bd-e72d-4457-9a6b-c4b0f8bcc558", @@ -12200,8 +12038,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 2224, - 1360 + 1920, + 1456 ], "id": "5d50cef9-0ebb-4f28-8deb-69c7feb6f62e", "name": "Enviar al espacio de prueba1", @@ -12219,8 +12057,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 2224, - 1536 + 1920, + 1632 ], "id": "c83590cd-6e98-4e2d-81f6-6e2f204a948d", "name": "Enviar al espacio de prueba2", @@ -12233,21 +12071,21 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2048, - 1536 + 1744, + 1632 ], "id": "87ace248-4ea5-406f-89da-88d450ad413e", "name": "Formatear datos espanol2" }, { "parameters": { - "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular sesion mas cercana4\"\nconst sessionNode = $('Calcular sesion mas cercana4').first();\nconst session = sessionNode?.json?.session || {};\nconst titulo = session.titulo || \"Untitled\";\nconst horaInicio = session.hora_inicio || \"--:--\";\nconst horaFin = session.hora_fin || \"--:--\";\nconst enlace = session.enlace_reunion || \"\";\n\n// 2. Contar participantes sumando los de todos los países de forma dinámica\nlet totalParticipantes = 0;\nif (session.participantes) {\n Object.keys(session.participantes).forEach(pais => {\n const listaPais = session.participantes[pais];\n if (Array.isArray(listaPais)) {\n totalParticipantes += listaPais.length;\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos2').all();\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con los datos de la sesión\nconst body = {\n text: `🔔 *#TheGLMWay Reminder for today* \\n\\nInstructor: ${menciones}`,\n cardsV2: [\n {\n cardId: \"session-reminder\",\n card: {\n header: {\n title: \"🎓 Training Session\"\n },\n sections: [\n {\n widgets: [\n {\n textParagraph: {\n text: `Topic: ${titulo}
` +\n `Registered participants: ${totalParticipantes} people`\n }\n },\n {\n textParagraph: {\n text: `👉 Join the meeting here`\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" + "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular falta 48h o 24h1\"\nconst sessionNode = $('Calcular falta 48h o 24h1').first();\nconst sesion = sessionNode?.json?.sesion || {}; // Leído desde la raíz del JSON\n\n// 2. Contar participantes y construir de forma dinámica la lista por país\nlet totalParticipantes = 0;\nlet listaParticipantesTexto = \"\";\n\nif (sesion.participantes) {\n Object.keys(sesion.participantes).forEach(pais => {\n const listaPais = sesion.participantes[pais];\n if (Array.isArray(listaPais) && listaPais.length > 0) {\n totalParticipantes += listaPais.length;\n \n // Añadir el encabezado del país\n listaParticipantesTexto += `
📍 ${pais} (${listaPais.length}):
`;\n \n // Listar cada participante de ese país\n listaPais.forEach(p => {\n listaParticipantesTexto += `• ${p.nombre} (${p.departamento || 'Sin Depto'} | ${p.division || 'Sin Division'})
`;\n });\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones de los coordinadores\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos3').all(); // Asegúrate de verificar si tu nodo se llama Unir datos3 o similar\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con formato Google Chat Card\nconst body = {\n text: `🔔 *HR Coordinator Notification* \\nDear ${menciones}, here is the list of people registered for tomorrow's session.`,\n cardsV2: [\n {\n cardId: \"session-reminder-hr\",\n card: {\n header: {\n title: `🎓 Tomorrow's #TheGLMWay Training`,\n },\n sections: [\n {\n header: \"📈 Attendance Summary\",\n widgets: [\n {\n textParagraph: {\n text: `Total registered: ${totalParticipantes} people
` + \n listaParticipantesTexto\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 2048, - 1360 + 1744, + 1456 ], "id": "bb4cbe19-9364-4c83-a309-5594d9c5a26b", "name": "Formatear datos ingles2" @@ -12260,7 +12098,7 @@ "typeVersion": 2, "position": [ 0, - 1568 + 1552 ], "id": "47542a5b-ebe1-4e85-8229-bb9aa7e1b744", "name": "Calcular falta 48h o 24h1" @@ -12277,8 +12115,8 @@ "type": "n8n-nodes-base.googleContacts", "typeVersion": 1, "position": [ - 1504, - 1440 + 1200, + 1536 ], "id": "f49640d2-f7a0-43da-b9e1-1da5dbe93a22", "name": "Get a contact1", @@ -12296,8 +12134,8 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1328, - 1440 + 1024, + 1536 ], "id": "c17d8ecc-45f9-4c03-a4d4-88d90ae8a3ec", "name": "Limpiar id1" @@ -12309,8 +12147,8 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 1664, - 1440 + 1360, + 1536 ], "id": "73de340f-189b-4963-bdf6-9b1bfd603cd6", "name": "Unir datos3" @@ -12325,8 +12163,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ - 1168, - 1440 + 864, + 1536 ], "id": "949eb6ae-2aba-43d2-a262-f91313336d2f", "name": "Obtener miembros RRHH Notificaciones", @@ -12337,6 +12175,62 @@ "name": "Eidan - Chat account" } } + }, + { + "parameters": { + "operation": "get", + "tableId": "coordinadores_rrhh_glmway", + "filters": { + "conditions": [ + { + "keyName": "pais", + "keyValue": "={{ $('Get an employee').item.json.location }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 736, + -352 + ], + "id": "aeb15925-1828-426e-a437-809aee1df732", + "name": "Obtener coordinador3", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } + }, + { + "parameters": { + "operation": "get", + "tableId": "coordinadores_rrhh_glmway", + "filters": { + "conditions": [ + { + "keyName": "pais", + "keyValue": "={{ $('Get an employee1').item.json.location }}" + } + ] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1136, + 256 + ], + "id": "e909b37d-a192-4845-b80f-fb1b245a6614", + "name": "Obtener coordinador4", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + } } ], "connections": { @@ -12477,7 +12371,7 @@ "main": [ [ { - "node": "Obtener coordinador", + "node": "Obtener coordinador3", "type": "main", "index": 0 } @@ -12590,7 +12484,7 @@ "main": [ [ { - "node": "Pais?1", + "node": "Obtener coordinador4", "type": "main", "index": 0 } @@ -12636,7 +12530,7 @@ "main": [ [ { - "node": "Wait", + "node": "Pais?1", "type": "main", "index": 0 } @@ -12725,24 +12619,7 @@ }, "Obtener coordinador": { "main": [ - [ - { - "node": "Hay coordinador?", - "type": "main", - "index": 0 - } - ] - ] - }, - "Obtener coordinador1": { - "main": [ - [ - { - "node": "Hay coordinador?1", - "type": "main", - "index": 0 - } - ] + [] ] }, "Loop Over Items1": { @@ -12965,7 +12842,7 @@ "main": [ [ { - "node": "Wait", + "node": "Pais?1", "type": "main", "index": 0 } @@ -13403,20 +13280,9 @@ ] ] }, - "Wait6": { - "main": [ - [] - ] - }, "Actualizar estado a notificado": { "main": [ - [ - { - "node": "Wait6", - "type": "main", - "index": 0 - } - ] + [] ] }, "Hay inscritos?": { @@ -13451,7 +13317,7 @@ "main": [ [ { - "node": "Obtener coordinador1", + "node": "Wait", "type": "main", "index": 0 } @@ -13462,7 +13328,7 @@ "main": [ [ { - "node": "Obtener coordinador1", + "node": "Wait", "type": "main", "index": 0 } @@ -13946,18 +13812,40 @@ } ] ] + }, + "Obtener coordinador3": { + "main": [ + [ + { + "node": "Hay coordinador?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Obtener coordinador4": { + "main": [ + [ + { + "node": "Hay coordinador?1", + "type": "main", + "index": 0 + } + ] + ] } }, "authors": "Eidan Then", - "name": "Version 69f1dcec", + "name": "Version 292a4ad1", "description": "", "autosaved": true, "workflowPublishHistory": [ { - "createdAt": "2026-07-21T15:16:50.970Z", - "id": 3286, + "createdAt": "2026-07-21T16:43:28.442Z", + "id": 3310, "workflowId": "F1iPg8hktNAebZua", - "versionId": "69f1dcec-ccc3-4ec2-9e89-7e8b63f7197a", + "versionId": "292a4ad1-cef4-4822-9273-dcdb491ea1bf", "event": "activated", "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" }