Update glmway-workflow.json

This commit is contained in:
2026-06-16 19:16:26 +00:00
parent aed1df1ba4
commit bc459795ca
+432 -186
View File
@@ -1,6 +1,6 @@
{
"$json": {
"updatedAt": "2026-06-16T18:38:00.810Z",
"updatedAt": "2026-06-16T19:03:50.744Z",
"createdAt": "2026-06-08T13:50:12.174Z",
"id": "F1iPg8hktNAebZua",
"name": "GLMWay",
@@ -912,65 +912,6 @@
"id": "20e1c800-bf0b-4484-b836-14bc7154e4e7",
"name": "Schedule Trigger1"
},
{
"parameters": {
"tableId": "inscritos_glmway",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "empleado_id",
"fieldValue": "={{ $('Informacion extra del empleado').item.json.id }}"
},
{
"fieldId": "nombre",
"fieldValue": "={{ $('Get an employee').item.json.displayName }}"
},
{
"fieldId": "email",
"fieldValue": "={{ $('Get an employee').item.json.workEmail }}"
},
{
"fieldId": "departamento",
"fieldValue": "={{ $('Get an employee').item.json.department }}"
},
{
"fieldId": "supervisor_id",
"fieldValue": "={{ $('Informacion extra del empleado').item.json.supervisorEId }}"
},
{
"fieldId": "fecha_ingreso",
"fieldValue": "={{ $('Informacion extra del empleado').item.json.hireDate }}"
},
{
"fieldId": "fecha_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,
-400
],
"id": "dcdef9fc-9c61-45dd-9604-56037eac4c31",
"name": "Insertar a inscritos (activo)",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"tableId": "inscritos_glmway",
@@ -1501,7 +1442,7 @@
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1504,
1360,
272
],
"id": "ce9f31d4-454e-4e31-9a22-8173b3fae392",
@@ -1525,8 +1466,8 @@
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1712,
368
2112,
-64
],
"id": "00c87312-256a-4738-856d-e92b9e144c75",
"name": "Entrenamiento español1",
@@ -1555,8 +1496,8 @@
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1712,
192
2112,
-240
],
"id": "b3c26eeb-2ff9-42c9-b5cc-fe0776e53c46",
"name": "Entrenamiento ingles4",
@@ -1594,7 +1535,7 @@
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
1264,
1120,
352
],
"id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4",
@@ -1639,7 +1580,7 @@
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1504,
1360,
448
],
"id": "67928478-7604-45a4-9ab0-851079e1470c",
@@ -1659,7 +1600,7 @@
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
1904,
2304,
368
],
"id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b",
@@ -1686,7 +1627,7 @@
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
1904,
2304,
192
],
"id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4",
@@ -1852,7 +1793,7 @@
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
2144,
2480,
368
],
"id": "98185de1-e81a-440f-8951-f98bd78c707b",
@@ -2050,71 +1991,6 @@
}
}
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Get an employee1').item.json.id }}"
}
]
},
"fieldsUi": {
"fieldValues": [
{
"fieldId": "email",
"fieldValue": "={{ $('Get an employee1').item.json.workEmail }}"
},
{
"fieldId": "departamento",
"fieldValue": "={{ $('Get an employee1').item.json.department }}"
},
{
"fieldId": "supervisor_id",
"fieldValue": "={{ $('Informacion extra del empleado1').item.json.supervisorEId }}"
},
{
"fieldId": "estado",
"fieldValue": "activo"
},
{
"fieldId": "fecha_inscripcion",
"fieldValue": "={{ $json.today }}"
},
{
"fieldId": "division",
"fieldValue": "={{ $('Get an employee1').item.json.division }}"
},
{
"fieldId": "puesto",
"fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}"
},
{
"fieldId": "pais",
"fieldValue": "={{ $('Get an employee1').item.json.location }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
944,
352
],
"id": "e67b21c3-ab44-4d27-ada0-719197b5c3df",
"name": "Actualizar datos de empleado",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"documentId": {
@@ -2148,7 +2024,7 @@
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
1104,
960,
352
],
"id": "3a6f198b-e136-49fb-a171-78164e10b600",
@@ -2559,6 +2435,137 @@
"id": "bde8fba9-0d6c-4299-8971-dcd8e0e740b4",
"name": "Calcular sesion mas cercana1"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "1e6f83ce-19e7-4dd9-ba34-a11836a6181e",
"name": "idioma",
"value": "ES",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1584,
192
],
"id": "430a2b66-f0f3-4032-bca1-29b01bd8c577",
"name": "Crear variable idioma ES1"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b0610214-1357-4e55-be5f-75c159d3b717",
"name": "idioma",
"value": "EN",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1584,
368
],
"id": "9d53a7e1-6dab-494b-8064-6c3063f5596f",
"name": "Crear variable idioma EN1"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1968,
192
],
"id": "ee31fd24-d703-44b3-b65b-75234564d29f",
"name": "Calcular sesion mas cercana2"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1968,
368
],
"id": "24f2e53d-9280-445b-b37e-776b41ca53e2",
"name": "Calcular sesion mas cercana3"
},
{
"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,
-400
],
"id": "dcdef9fc-9c61-45dd-9604-56037eac4c31",
"name": "Guardar datos del empleado y sesion asignada",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"tableId": "inscritos_glmway",
@@ -2610,7 +2617,181 @@
-224
],
"id": "7530270a-b32e-419e-8fc5-b29fa07dda39",
"name": "Insertar a inscritos (activo)1",
"name": "Guardar datos del empleado y sesion asignada1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "get",
"tableId": "sesiones_glmway",
"filters": {
"conditions": [
{
"keyName": "idioma",
"keyValue": "={{ $json.idioma }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1776,
192
],
"id": "f034ee45-742b-4f18-9003-333a4c087cf7",
"name": "Obtener sesiones español1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "get",
"tableId": "sesiones_glmway",
"filters": {
"conditions": [
{
"keyName": "idioma",
"keyValue": "={{ $json.idioma }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1776,
368
],
"id": "2c35fe0e-1f32-4263-9c02-c392cb77e0e5",
"name": "Obtener sesiones ingles1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"tableId": "inscritos_glmway",
"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": "activo"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
2128,
192
],
"id": "16d364da-e6fc-4943-bd64-f83ccab66b9f",
"name": "Guardar datos del empleado y sesion asignada2",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"tableId": "inscritos_glmway",
"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": "activo"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
2128,
368
],
"id": "d1e51972-c9b0-4dbd-a208-c033e1ca8351",
"name": "Guardar datos del empleado y sesion asignada3",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
@@ -2787,17 +2968,6 @@
]
]
},
"Insertar a inscritos (activo)": {
"main": [
[
{
"node": "Send a message ingles",
"type": "main",
"index": 0
}
]
]
},
"Hay coordinador?": {
"main": [
[
@@ -2886,7 +3056,7 @@
"main": [
[
{
"node": "Actualizar datos de empleado",
"node": "Obtener coordinador1",
"type": "main",
"index": 0
}
@@ -2898,14 +3068,14 @@
"main": [
[
{
"node": "Entrenamiento ingles4",
"node": "Crear variable idioma ES1",
"type": "main",
"index": 0
}
],
[
{
"node": "Entrenamiento español1",
"node": "Crear variable idioma EN1",
"type": "main",
"index": 0
}
@@ -2914,24 +3084,12 @@
},
"Entrenamiento español1": {
"main": [
[
{
"node": "Send a message espanol1",
"type": "main",
"index": 0
}
]
[]
]
},
"Entrenamiento ingles4": {
"main": [
[
{
"node": "Send a message ingles1",
"type": "main",
"index": 0
}
]
[]
]
},
"Hay coordinador?1": {
@@ -3036,17 +3194,6 @@
]
]
},
"Actualizar datos de empleado": {
"main": [
[
{
"node": "Obtener coordinador1",
"type": "main",
"index": 0
}
]
]
},
"Obtener coordinador1": {
"main": [
[
@@ -3191,7 +3338,7 @@
"main": [
[
{
"node": "Insertar a inscritos (activo)",
"node": "Guardar datos del empleado y sesion asignada",
"type": "main",
"index": 0
}
@@ -3202,14 +3349,69 @@
"main": [
[
{
"node": "Insertar a inscritos (activo)1",
"node": "Guardar datos del empleado y sesion asignada1",
"type": "main",
"index": 0
}
]
]
},
"Insertar a inscritos (activo)1": {
"Crear variable idioma ES1": {
"main": [
[
{
"node": "Obtener sesiones español1",
"type": "main",
"index": 0
}
]
]
},
"Crear variable idioma EN1": {
"main": [
[
{
"node": "Obtener sesiones ingles1",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana2": {
"main": [
[
{
"node": "Guardar datos del empleado y sesion asignada2",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana3": {
"main": [
[
{
"node": "Guardar datos del empleado y sesion asignada3",
"type": "main",
"index": 0
}
]
]
},
"Guardar datos del empleado y sesion asignada": {
"main": [
[
{
"node": "Send a message ingles",
"type": "main",
"index": 0
}
]
]
},
"Guardar datos del empleado y sesion asignada1": {
"main": [
[
{
@@ -3219,6 +3421,50 @@
}
]
]
},
"Obtener sesiones español1": {
"main": [
[
{
"node": "Calcular sesion mas cercana2",
"type": "main",
"index": 0
}
]
]
},
"Obtener sesiones ingles1": {
"main": [
[
{
"node": "Calcular sesion mas cercana3",
"type": "main",
"index": 0
}
]
]
},
"Guardar datos del empleado y sesion asignada2": {
"main": [
[
{
"node": "Send a message ingles1",
"type": "main",
"index": 0
}
]
]
},
"Guardar datos del empleado y sesion asignada3": {
"main": [
[
{
"node": "Send a message espanol1",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
@@ -3238,19 +3484,19 @@
"recurrenceRules": []
},
"node:Comenzo evento ingles": {
"lastTimeChecked": "2026-06-16T17:59:53Z"
"lastTimeChecked": "2026-06-16T18:59:53Z"
},
"node:Comenzo evento español": {
"lastTimeChecked": "2026-06-16T17:59:35Z"
"lastTimeChecked": "2026-06-16T18:59:35Z"
},
"node:Termino evento español": {
"lastTimeChecked": "2026-06-16T17:59:55Z"
"lastTimeChecked": "2026-06-16T18:59:55Z"
},
"node:Termino evento ingles": {
"lastTimeChecked": "2026-06-16T17:59:24Z"
"lastTimeChecked": "2026-06-16T18:59:24Z"
},
"node:Prueba": {
"lastTimeChecked": "2026-06-16T17:59:48Z"
"lastTimeChecked": "2026-06-16T18:59:48Z"
},
"node:Schedule Trigger2": {
"recurrenceRules": []
@@ -3330,9 +3576,9 @@
}
]
},
"versionId": "cb313d9c-7920-41d8-a2b3-ac2ebc3eaae6",
"versionId": "f1b6fe30-bd1c-4b2d-b068-bc62b9366442",
"activeVersionId": "4d030ff9-09d2-42ac-89c7-09d45d3f6db3",
"versionCounter": 1206,
"versionCounter": 1257,
"triggerCount": 9,
"shared": [
{