Update glmway-workflow.json

This commit is contained in:
2026-06-26 13:57:53 +00:00
parent 2d861f0bae
commit d4d4ded4aa
+338 -77
View File
@@ -1,6 +1,6 @@
{ {
"$json": { "$json": {
"updatedAt": "2026-06-25T21:55:35.771Z", "updatedAt": "2026-06-25T21:57:43.554Z",
"createdAt": "2026-06-08T13:50:12.174Z", "createdAt": "2026-06-08T13:50:12.174Z",
"id": "F1iPg8hktNAebZua", "id": "F1iPg8hktNAebZua",
"name": "GLMWay", "name": "GLMWay",
@@ -4025,8 +4025,8 @@
"type": "n8n-nodes-base.supabase", "type": "n8n-nodes-base.supabase",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
4320, 1632,
304 928
], ],
"id": "d34e225b-25bb-4a0a-845c-b9e274529000", "id": "d34e225b-25bb-4a0a-845c-b9e274529000",
"name": "Get many rows", "name": "Get many rows",
@@ -5217,19 +5217,19 @@
"recurrenceRules": [] "recurrenceRules": []
}, },
"node:Comenzo evento ingles": { "node:Comenzo evento ingles": {
"lastTimeChecked": "2026-06-25T21:00:11Z" "lastTimeChecked": "2026-06-26T13:00:02Z"
}, },
"node:Comenzo evento español": { "node:Comenzo evento español": {
"lastTimeChecked": "2026-06-25T21:00:22Z" "lastTimeChecked": "2026-06-26T13:00:04Z"
}, },
"node:Termino evento español": { "node:Termino evento español": {
"lastTimeChecked": "2026-06-25T20:59:54Z" "lastTimeChecked": "2026-06-26T13:00:40Z"
}, },
"node:Termino evento ingles": { "node:Termino evento ingles": {
"lastTimeChecked": "2026-06-25T21:00:39Z" "lastTimeChecked": "2026-06-26T13:00:50Z"
}, },
"node:Prueba": { "node:Prueba": {
"lastTimeChecked": "2026-06-25T20:59:58Z" "lastTimeChecked": "2026-06-26T13:00:21Z"
}, },
"node:Schedule Trigger2": { "node:Schedule Trigger2": {
"recurrenceRules": [] "recurrenceRules": []
@@ -5242,6 +5242,9 @@
}, },
"node:Schedule Trigger5": { "node:Schedule Trigger5": {
"recurrenceRules": [] "recurrenceRules": []
},
"node:Schedule Trigger6": {
"recurrenceRules": []
} }
}, },
"meta": { "meta": {
@@ -5515,10 +5518,10 @@
} }
] ]
}, },
"versionId": "ede88449-a4ac-42cc-9e91-484976e8392b", "versionId": "ee6ea14b-3e4e-4e19-90d4-c1b6a96c4dc7",
"activeVersionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3", "activeVersionId": "ee6ea14b-3e4e-4e19-90d4-c1b6a96c4dc7",
"versionCounter": 2812, "versionCounter": 2853,
"triggerCount": 12, "triggerCount": 13,
"shared": [ "shared": [
{ {
"updatedAt": "2026-06-08T13:50:12.177Z", "updatedAt": "2026-06-08T13:50:12.177Z",
@@ -5540,9 +5543,9 @@
], ],
"tags": [], "tags": [],
"activeVersion": { "activeVersion": {
"updatedAt": "2026-06-25T14:40:53.000Z", "updatedAt": "2026-06-25T22:03:18.000Z",
"createdAt": "2026-06-25T14:40:42.857Z", "createdAt": "2026-06-25T21:57:43.560Z",
"versionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3", "versionId": "ee6ea14b-3e4e-4e19-90d4-c1b6a96c4dc7",
"workflowId": "F1iPg8hktNAebZua", "workflowId": "F1iPg8hktNAebZua",
"nodes": [ "nodes": [
{ {
@@ -6221,9 +6224,9 @@
{ {
"field": "weeks", "field": "weeks",
"triggerAtDay": [ "triggerAtDay": [
1, 3
4 ],
] "triggerAtHour": 16
} }
] ]
} }
@@ -7613,20 +7616,6 @@
} }
} }
}, },
{
"parameters": {
"content": "# Eventos inician a las 6pm en hora Bogota\n",
"width": 304
},
"type": "n8n-nodes-base.stickyNote",
"position": [
3232,
368
],
"typeVersion": 1,
"id": "e5378554-9885-4e6d-ab6a-e2cb857c342a",
"name": "Sticky Note9"
},
{ {
"parameters": { "parameters": {
"operation": "getAll", "operation": "getAll",
@@ -8458,12 +8447,12 @@
{ {
"parameters": { "parameters": {
"operation": "get", "operation": "get",
"tableId": "inscritos_glmway", "tableId": "coordinadores_rrhh_glmway",
"filters": { "filters": {
"conditions": [ "conditions": [
{ {
"keyName": "estado", "keyName": "estado",
"keyValue": "notificado" "keyValue": "=no_notificado"
} }
] ]
} }
@@ -8762,7 +8751,7 @@
"typeVersion": 2, "typeVersion": 2,
"position": [ "position": [
4064, 4064,
480 432
], ],
"id": "41289b04-a9f4-4abc-8816-5afccd0e7996", "id": "41289b04-a9f4-4abc-8816-5afccd0e7996",
"name": "Code in JavaScript1" "name": "Code in JavaScript1"
@@ -8789,12 +8778,12 @@
}, },
{ {
"parameters": { "parameters": {
"operation": "append", "operation": "appendOrUpdate",
"documentId": { "documentId": {
"__rl": true, "__rl": true,
"value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg", "value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg",
"mode": "list", "mode": "list",
"cachedResultName": "Calendario GLMWay Prueba", "cachedResultName": "Calendario #TheGLMWay",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit?usp=drivesdk" "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit?usp=drivesdk"
}, },
"sheetName": { "sheetName": {
@@ -8864,7 +8853,7 @@
"__rl": true, "__rl": true,
"value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg", "value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg",
"mode": "list", "mode": "list",
"cachedResultName": "Calendario GLMWay Prueba", "cachedResultName": "Calendario #TheGLMWay",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit?usp=drivesdk" "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit?usp=drivesdk"
}, },
"sheetName": { "sheetName": {
@@ -8875,7 +8864,7 @@
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit#gid=0" "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit#gid=0"
}, },
"clear": "specificRange", "clear": "specificRange",
"range": "A2:A80" "range": "A2:D80"
}, },
"type": "n8n-nodes-base.googleSheets", "type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7, "typeVersion": 4.7,
@@ -8895,8 +8884,8 @@
}, },
{ {
"parameters": { "parameters": {
"content": "## Borrar y guardar las nuevas fechas de las sesiones del nuevo año\n\nEste trigger se activa todos los años el 1 de enero", "content": "## Borrar y guardar las nuevas fechas de las sesiones del nuevo año en el sheets\n\nEste trigger se activa todos los años el 1 de enero",
"height": 272, "height": 288,
"width": 1072 "width": 1072
}, },
"type": "n8n-nodes-base.stickyNote", "type": "n8n-nodes-base.stickyNote",
@@ -9256,7 +9245,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "const months = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n\nfunction formatDate(dateTimeStr) {\n if (!dateTimeStr) return null;\n const datePart = dateTimeStr.split('T')[0]; // \"2026-01-07\"\n const [year, month, day] = datePart.split('-');\n return `${parseInt(day, 10)} ${months[parseInt(month, 10) - 1]}`;\n}\n\nconst output = [];\n\nfor (const item of $input.all()) {\n const event = item.json;\n output.push({\n json: {\n id: event.id,\n summary: event.summary,\n start: formatDate(event.start?.dateTime || event.start?.date),\n end: formatDate(event.end?.dateTime || event.end?.date)\n }\n });\n}\n\nreturn output;" "jsCode": "const months = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n\nfunction formatDate(dateTimeStr) {\n if (!dateTimeStr) return null;\n const datePart = dateTimeStr.split('T')[0]; // \"2026-01-07\"\n const [year, month, day] = datePart.split('-');\n return `${parseInt(day, 10)} ${months[parseInt(month, 10) - 1]}`;\n}\n\nconst output = [];\n\nfor (const item of $input.all()) {\n const event = item.json;\n output.push({\n json: {\n id: event.id,\n summary: event.summary,\n start: `'${formatDate(event.start?.dateTime || event.start?.date)}`,\n end: formatDate(event.end?.dateTime || event.end?.date)\n }\n });\n}\n\nreturn output;"
}, },
"type": "n8n-nodes-base.code", "type": "n8n-nodes-base.code",
"typeVersion": 2, "typeVersion": 2,
@@ -9280,16 +9269,16 @@
"type": "n8n-nodes-base.scheduleTrigger", "type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3, "typeVersion": 1.3,
"position": [ "position": [
2384, 2368,
-32 -48
], ],
"id": "55a755d8-8b74-440f-93c6-8a1ecba4c666", "id": "55a755d8-8b74-440f-93c6-8a1ecba4c666",
"name": "Schedule Trigger5" "name": "Schedule Trigger5"
}, },
{ {
"parameters": { "parameters": {
"content": "## Añadir/actualizar coordinadores RRHH\n\nEste trigger se activa todos los años el 1 de enero", "content": "## Añadir/actualizar coordinadores RRHH\nEste trigger se activa todos los dias a las 11am",
"height": 272, "height": 288,
"width": 1072 "width": 1072
}, },
"type": "n8n-nodes-base.stickyNote", "type": "n8n-nodes-base.stickyNote",
@@ -9321,8 +9310,8 @@
"type": "n8n-nodes-base.googleCalendar", "type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3, "typeVersion": 1.3,
"position": [ "position": [
3584, 3664,
-272 -208
], ],
"id": "3c32f96e-cd34-4be4-8c24-b4be7a8f29d9", "id": "3c32f96e-cd34-4be4-8c24-b4be7a8f29d9",
"name": "Obtener entrenamientos ingles y espanol1", "name": "Obtener entrenamientos ingles y espanol1",
@@ -9333,19 +9322,6 @@
} }
} }
}, },
{
"parameters": {
"jsCode": "const months = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n\nfunction formatDate(dateTimeStr) {\n if (!dateTimeStr) return null;\n const datePart = dateTimeStr.split('T')[0]; // \"2026-01-07\"\n const [year, month, day] = datePart.split('-');\n return `${parseInt(day, 10)} ${months[parseInt(month, 10) - 1]}`;\n}\n\nconst output = [];\n\nfor (const item of $input.all()) {\n const event = item.json;\n output.push({\n json: {\n id: event.id,\n summary: event.summary,\n start: formatDate(event.start?.dateTime || event.start?.date),\n end: formatDate(event.end?.dateTime || event.end?.date)\n }\n });\n}\n\nreturn output;"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3760,
-272
],
"id": "8f80d9ca-1e4b-4753-b482-df7b0fd24f61",
"name": "Formatear fecha1"
},
{ {
"parameters": { "parameters": {
"documentId": { "documentId": {
@@ -9367,8 +9343,8 @@
"type": "n8n-nodes-base.googleSheets", "type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7, "typeVersion": 4.7,
"position": [ "position": [
2560, 2544,
-32 -48
], ],
"id": "73089147-ba1f-4fb4-ac17-d5670b263fd8", "id": "73089147-ba1f-4fb4-ac17-d5670b263fd8",
"name": "Obtener coordinadores", "name": "Obtener coordinadores",
@@ -9405,8 +9381,8 @@
"type": "n8n-nodes-base.httpRequest", "type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4, "typeVersion": 4.4,
"position": [ "position": [
2896, 2880,
-32 -48
], ],
"id": "231f396b-855a-4c50-8d6d-096018e6d2ac", "id": "231f396b-855a-4c50-8d6d-096018e6d2ac",
"name": "Insertar/actualizar coordinadores a la bd" "name": "Insertar/actualizar coordinadores a la bd"
@@ -9420,11 +9396,225 @@
"type": "n8n-nodes-base.aggregate", "type": "n8n-nodes-base.aggregate",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
2720, 2704,
-32 -48
], ],
"id": "e51bd2d5-22b5-46cf-b346-c1ba16bb5c34", "id": "e51bd2d5-22b5-46cf-b346-c1ba16bb5c34",
"name": "Aggregate" "name": "Aggregate"
},
{
"parameters": {
"method": "POST",
"url": "https://dbit.digitalcompass.agency/rest/v1/rpc/sync_sesiones_glmway",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q"
},
{
"name": "Authorization",
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify({ \"input\": $json.input }) }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
4464,
-304
],
"id": "3f4a0807-5f29-49cb-a851-41100e04f5bf",
"name": "Insertar fechas1"
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"destinationFieldName": "input",
"options": {}
},
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
4320,
-304
],
"id": "3ecbb0c7-f5f5-4644-9f42-8be9502e814d",
"name": "Aggregate1"
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n \"meet_id\": \"{{ $json.id }}\",\n \"titulo\": \"{{ $json.titulo }}\",\n \"fecha_sesion\": \"{{ $json.fecha }}\",\n \"hora_inicio\": \"{{ $json.hora_fin }}\",\n \"hora_fin\": \"{{ $json.hora_fin }}\",\n \"instructor\": \"{{ $json.Espanol || $json.English || null }}\",\n \"correo_instructor\": \"{{ $json.Correo || null }}\",\n \"enlace_reunion\": \"{{ $json.url }}\",\n \"idioma\": \"{{ $json.idioma }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
4176,
-304
],
"id": "a099259d-36e3-48b6-aa77-d8132f33f85e",
"name": "Edit Fields"
},
{
"parameters": {
"mode": "combine",
"advanced": true,
"mergeByFields": {
"values": [
{
"field1": "Fecha",
"field2": "fecha"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
4032,
-304
],
"id": "456bcbe4-cc98-48fc-bcd2-40f8961934ae",
"name": "Unir datos"
},
{
"parameters": {
"content": "## Actualizar instructores y fechas de las sesiones en supabase\n\nEste trigger se activa todos los dias a las",
"height": 416,
"width": 1152
},
"type": "n8n-nodes-base.stickyNote",
"position": [
3456,
-480
],
"typeVersion": 1,
"id": "b1eff313-9251-48db-a6f3-9f0e81c644a3",
"name": "Sticky Note13"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
3
],
"triggerAtHour": 15
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
3504,
-288
],
"id": "6ef829bf-1d52-4093-bcc5-45d922393611",
"name": "Schedule Trigger6"
},
{
"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": "gid=0",
"mode": "list",
"cachedResultName": "Calendario",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg/edit#gid=0"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
3664,
-384
],
"id": "f1bf8c51-43cf-41d4-93c4-1a1d0a0dac7a",
"name": "Obtener fechas e instructores",
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"operation": "getAll"
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1632,
928
],
"id": "d34e225b-25bb-4a0a-845c-b9e274529000",
"name": "Get many rows",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"jsCode": "const months = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n\nfunction formatearFecha(dateTimeStr) {\n if (!dateTimeStr) return null;\n const datePart = dateTimeStr.split('T')[0];\n const [year, month, day] = datePart.split('-');\n return `${parseInt(day, 10)} ${months[parseInt(month, 10) - 1]}`;\n}\n\nfunction detectarIdioma(summary) {\n if (!summary) return null;\n if (summary.includes(\"#TheGLMWay Training\")) return \"EN\";\n if (summary.includes(\"Entrenamiento #TheGLMWay\")) return \"ES\";\n return null;\n}\n\nfunction formatearHora(dateTimeStr) {\n if (!dateTimeStr) return null;\n const timePart = dateTimeStr.split('T')[1];\n if (!timePart) return null;\n return timePart.substring(0, 5);\n}\n\nconst output = [];\n\nfor (const item of $input.all()) {\n const event = item.json;\n\n const startRaw = event.start?.dateTime || event.start?.date;\n const endRaw = event.end?.dateTime || event.end?.date;\n const url = event.conferenceData?.entryPoints?.[0]?.uri || null;\n const idioma = detectarIdioma(event.summary);\n\n // Ignorar eventos vacíos o sin datos esenciales\n if (!event.summary || !startRaw) {\n console.log(\"Evento ignorado (vacío):\", JSON.stringify(event));\n continue;\n }\n\n output.push({\n json: {\n id: event.id,\n titulo: event.summary,\n idioma: idioma,\n fecha: formatearFecha(startRaw),\n hora_inicio: formatearHora(startRaw),\n hora_fin: formatearHora(endRaw),\n url: url,\n descripcion: event.description || null\n }\n });\n}\n\nconsole.log(`Sesiones procesadas: ${output.length}`);\nreturn output;\n\n// Agrega esto antes del return output\nconst resumen = output.map(i => ({\n meet_id: i.json.meet_id,\n titulo: i.json.titulo,\n fecha_sesion: i.json.fecha_sesion,\n hora_inicio: i.json.hora_inicio,\n hora_fin: i.json.hora_fin,\n enlace_reunion: i.json.enlace_reunion,\n idioma: i.json.idioma\n}));\nconsole.log(JSON.stringify(resumen));"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3840,
-208
],
"id": "8f80d9ca-1e4b-4753-b482-df7b0fd24f61",
"name": "Formatear fecha y detectar idioma"
},
{
"parameters": {
"jsCode": "const start = $input.first().json.start?.dateTime || $input.first().json.start?.date;\nconst end = $input.first().json.end?.dateTime || $input.first().json.end?.date;\n\nfunction formatHora(dateTimeStr) {\n if (!dateTimeStr) return null;\n return dateTimeStr.split('T')[1].substring(0, 5);\n}\n\nreturn [{\n json: {\n hora_inicio: formatHora(start),\n hora_fin: formatHora(end)\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3856,
288
],
"id": "abdbae74-c0ab-4f9a-b9d8-73cef07748a2",
"name": "Calcular fecha hireDate2"
},
{
"parameters": {
"jsCode": "const months = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n\nfunction formatearFecha(dateTimeStr) {\n if (!dateTimeStr) return null;\n const datePart = dateTimeStr.split('T')[0];\n const [year, month, day] = datePart.split('-');\n return `${parseInt(day, 10)} ${months[parseInt(month, 10) - 1]}`;\n}\n\nfunction detectarIdioma(summary) {\n if (!summary) return null;\n if (summary.includes(\"#TheGLMWay Training\")) return \"EN\";\n if (summary.includes(\"Entrenamiento #TheGLMWay\")) return \"ES\";\n return null;\n}\n\nfunction formatearHora(dateTimeStr) {\n if (!dateTimeStr) return null;\n const timePart = dateTimeStr.split('T')[1];\n if (!timePart) return null;\n return timePart.substring(0, 5);\n}\n\nconst output = [];\n\nfor (const item of $input.all()) {\n const event = item.json;\n\n const startRaw = event.start?.dateTime || event.start?.date;\n const endRaw = event.end?.dateTime || event.end?.date;\n const url = event.conferenceData?.entryPoints?.[0]?.uri || null;\n const idioma = detectarIdioma(event.summary);\n\n // Ignorar eventos vacíos o sin datos esenciales\n if (!event.summary || !startRaw) {\n console.log(\"Evento ignorado (vacío):\", JSON.stringify(event));\n continue;\n }\n\n output.push({\n json: {\n id: event.id,\n titulo: event.summary,\n idioma: idioma,\n fecha: formatearFecha(startRaw),\n hora_inicio: formatearHora(startRaw),\n hora_fin: formatearHora(endRaw),\n url: url,\n descripcion: event.description || null\n }\n });\n}\n\nconsole.log(`Sesiones procesadas: ${output.length}`);\nreturn output;\n\n// Agrega esto antes del return output\nconst resumen = output.map(i => ({\n meet_id: i.json.meet_id,\n titulo: i.json.titulo,\n fecha_sesion: i.json.fecha_sesion,\n hora_inicio: i.json.hora_inicio,\n hora_fin: i.json.hora_fin,\n enlace_reunion: i.json.enlace_reunion,\n idioma: i.json.idioma\n}));\nconsole.log(JSON.stringify(resumen));"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
4144,
192
],
"id": "cded5025-8e1b-4609-b7c6-5acb81244bdf",
"name": "Formatear fecha y detectar idioma1"
} }
], ],
"connections": { "connections": {
@@ -10440,18 +10630,13 @@
"main": [ "main": [
[ [
{ {
"node": "Formatear fecha1", "node": "Formatear fecha y detectar idioma",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
] ]
] ]
}, },
"Formatear fecha1": {
"main": [
[]
]
},
"Obtener coordinadores": { "Obtener coordinadores": {
"main": [ "main": [
[ [
@@ -10473,18 +10658,94 @@
} }
] ]
] ]
},
"Aggregate1": {
"main": [
[
{
"node": "Insertar fechas1",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger6": {
"main": [
[
{
"node": "Obtener fechas e instructores",
"type": "main",
"index": 0
},
{
"node": "Obtener entrenamientos ingles y espanol1",
"type": "main",
"index": 0
}
]
]
},
"Formatear fecha y detectar idioma": {
"main": [
[
{
"node": "Unir datos",
"type": "main",
"index": 1
}
]
]
},
"Obtener fechas e instructores": {
"main": [
[
{
"node": "Unir datos",
"type": "main",
"index": 0
}
]
]
},
"Unir datos": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Aggregate1",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet1": {
"main": [
[]
]
} }
}, },
"authors": "Eidan Then", "authors": "Eidan Then",
"name": "Version 5e6c62fa", "name": "Version ee6ea14b",
"description": "", "description": "",
"autosaved": true, "autosaved": true,
"workflowPublishHistory": [ "workflowPublishHistory": [
{ {
"createdAt": "2026-06-25T14:40:53.321Z", "createdAt": "2026-06-25T22:03:18.449Z",
"id": 1883, "id": 1889,
"workflowId": "F1iPg8hktNAebZua", "workflowId": "F1iPg8hktNAebZua",
"versionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3", "versionId": "ee6ea14b-3e4e-4e19-90d4-c1b6a96c4dc7",
"event": "activated", "event": "activated",
"userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd"
} }