Update glmway-workflow.json
This commit is contained in:
+244
-85
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$json": {
|
"$json": {
|
||||||
"updatedAt": "2026-06-25T17:20:10.093Z",
|
"updatedAt": "2026-06-25T21:55:35.771Z",
|
||||||
"createdAt": "2026-06-08T13:50:12.174Z",
|
"createdAt": "2026-06-08T13:50:12.174Z",
|
||||||
"id": "F1iPg8hktNAebZua",
|
"id": "F1iPg8hktNAebZua",
|
||||||
"name": "GLMWay",
|
"name": "GLMWay",
|
||||||
@@ -684,9 +684,9 @@
|
|||||||
{
|
{
|
||||||
"field": "weeks",
|
"field": "weeks",
|
||||||
"triggerAtDay": [
|
"triggerAtDay": [
|
||||||
1,
|
3
|
||||||
4
|
],
|
||||||
]
|
"triggerAtHour": 16
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -2076,20 +2076,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",
|
||||||
@@ -3245,7 +3231,7 @@
|
|||||||
"typeVersion": 1.3,
|
"typeVersion": 1.3,
|
||||||
"position": [
|
"position": [
|
||||||
2368,
|
2368,
|
||||||
-336
|
-352
|
||||||
],
|
],
|
||||||
"id": "ca136518-b776-45ba-b1a2-ad5327dd4cca",
|
"id": "ca136518-b776-45ba-b1a2-ad5327dd4cca",
|
||||||
"name": "Schedule Trigger4"
|
"name": "Schedule Trigger4"
|
||||||
@@ -3296,7 +3282,7 @@
|
|||||||
"typeVersion": 4.7,
|
"typeVersion": 4.7,
|
||||||
"position": [
|
"position": [
|
||||||
3264,
|
3264,
|
||||||
-400
|
-352
|
||||||
],
|
],
|
||||||
"id": "7c321f7d-bce9-447c-b94c-35f6967a48e3",
|
"id": "7c321f7d-bce9-447c-b94c-35f6967a48e3",
|
||||||
"name": "Insertar fechas",
|
"name": "Insertar fechas",
|
||||||
@@ -3314,7 +3300,7 @@
|
|||||||
"typeVersion": 1.1,
|
"typeVersion": 1.1,
|
||||||
"position": [
|
"position": [
|
||||||
3088,
|
3088,
|
||||||
-400
|
-352
|
||||||
],
|
],
|
||||||
"id": "27531838-5dc7-4169-a08a-f4da93899580",
|
"id": "27531838-5dc7-4169-a08a-f4da93899580",
|
||||||
"name": "Wait4",
|
"name": "Wait4",
|
||||||
@@ -3344,7 +3330,7 @@
|
|||||||
"typeVersion": 4.7,
|
"typeVersion": 4.7,
|
||||||
"position": [
|
"position": [
|
||||||
2912,
|
2912,
|
||||||
-400
|
-352
|
||||||
],
|
],
|
||||||
"id": "bd8cb535-6aa3-46df-9ca0-6efc0555f2e4",
|
"id": "bd8cb535-6aa3-46df-9ca0-6efc0555f2e4",
|
||||||
"name": "Borrar fechas",
|
"name": "Borrar fechas",
|
||||||
@@ -3358,8 +3344,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": 352,
|
"height": 288,
|
||||||
"width": 1072
|
"width": 1072
|
||||||
},
|
},
|
||||||
"type": "n8n-nodes-base.stickyNote",
|
"type": "n8n-nodes-base.stickyNote",
|
||||||
@@ -3706,7 +3692,7 @@
|
|||||||
"typeVersion": 1.3,
|
"typeVersion": 1.3,
|
||||||
"position": [
|
"position": [
|
||||||
2560,
|
2560,
|
||||||
-336
|
-352
|
||||||
],
|
],
|
||||||
"id": "b2b03ce6-6010-4e4f-be7a-d9040286e295",
|
"id": "b2b03ce6-6010-4e4f-be7a-d9040286e295",
|
||||||
"name": "Obtener entrenamientos ingles y espanol",
|
"name": "Obtener entrenamientos ingles y espanol",
|
||||||
@@ -3719,13 +3705,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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,
|
||||||
"position": [
|
"position": [
|
||||||
2736,
|
2736,
|
||||||
-400
|
-352
|
||||||
],
|
],
|
||||||
"id": "73c39af9-bc01-4d97-81ee-846aff70b3a6",
|
"id": "73c39af9-bc01-4d97-81ee-846aff70b3a6",
|
||||||
"name": "Formatear fecha"
|
"name": "Formatear fecha"
|
||||||
@@ -3743,7 +3729,7 @@
|
|||||||
"type": "n8n-nodes-base.scheduleTrigger",
|
"type": "n8n-nodes-base.scheduleTrigger",
|
||||||
"typeVersion": 1.3,
|
"typeVersion": 1.3,
|
||||||
"position": [
|
"position": [
|
||||||
2384,
|
2368,
|
||||||
-48
|
-48
|
||||||
],
|
],
|
||||||
"id": "55a755d8-8b74-440f-93c6-8a1ecba4c666",
|
"id": "55a755d8-8b74-440f-93c6-8a1ecba4c666",
|
||||||
@@ -3751,14 +3737,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"content": "## Añadir/actualizar coordinadores RRHH\n",
|
"content": "## Añadir/actualizar coordinadores RRHH\nEste trigger se activa todos los dias a las 11am",
|
||||||
"height": 240,
|
"height": 288,
|
||||||
"width": 1072
|
"width": 1072
|
||||||
},
|
},
|
||||||
"type": "n8n-nodes-base.stickyNote",
|
"type": "n8n-nodes-base.stickyNote",
|
||||||
"position": [
|
"position": [
|
||||||
2336,
|
2336,
|
||||||
-112
|
-160
|
||||||
],
|
],
|
||||||
"typeVersion": 1,
|
"typeVersion": 1,
|
||||||
"id": "3fd1379f-78d1-40a8-b24f-f8f086fda80a",
|
"id": "3fd1379f-78d1-40a8-b24f-f8f086fda80a",
|
||||||
@@ -3784,8 +3770,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",
|
||||||
@@ -3796,19 +3782,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": {
|
||||||
@@ -3830,7 +3803,7 @@
|
|||||||
"type": "n8n-nodes-base.googleSheets",
|
"type": "n8n-nodes-base.googleSheets",
|
||||||
"typeVersion": 4.7,
|
"typeVersion": 4.7,
|
||||||
"position": [
|
"position": [
|
||||||
2560,
|
2544,
|
||||||
-48
|
-48
|
||||||
],
|
],
|
||||||
"id": "73089147-ba1f-4fb4-ac17-d5670b263fd8",
|
"id": "73089147-ba1f-4fb4-ac17-d5670b263fd8",
|
||||||
@@ -3868,7 +3841,7 @@
|
|||||||
"type": "n8n-nodes-base.httpRequest",
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
"typeVersion": 4.4,
|
"typeVersion": 4.4,
|
||||||
"position": [
|
"position": [
|
||||||
2896,
|
2880,
|
||||||
-48
|
-48
|
||||||
],
|
],
|
||||||
"id": "231f396b-855a-4c50-8d6d-096018e6d2ac",
|
"id": "231f396b-855a-4c50-8d6d-096018e6d2ac",
|
||||||
@@ -3883,7 +3856,7 @@
|
|||||||
"type": "n8n-nodes-base.aggregate",
|
"type": "n8n-nodes-base.aggregate",
|
||||||
"typeVersion": 1,
|
"typeVersion": 1,
|
||||||
"position": [
|
"position": [
|
||||||
2720,
|
2704,
|
||||||
-48
|
-48
|
||||||
],
|
],
|
||||||
"id": "e51bd2d5-22b5-46cf-b346-c1ba16bb5c34",
|
"id": "e51bd2d5-22b5-46cf-b346-c1ba16bb5c34",
|
||||||
@@ -3908,14 +3881,14 @@
|
|||||||
},
|
},
|
||||||
"sendBody": true,
|
"sendBody": true,
|
||||||
"specifyBody": "json",
|
"specifyBody": "json",
|
||||||
"jsonBody": "={{ JSON.stringify({ \"input\": [\n {\n \"meet_id\": $json.input.id, \n \"titulo\": $json.input.summary,\n \"descripcion\": $json.input.id,\n \"fecha-sesion\": $json.input.id,\n \"hora-inicio\": $json.input.id,\n \"hora-fin\": $json.input.id,\n \"instructor\": $json.input.id,\n \"correo_instructor\": $json.input.id,\n \"enlace_reunion\": $json.input.id,\n \"idioma\": $json.input.id,\n }\n ] \n}) }}",
|
"jsonBody": "={{ JSON.stringify({ \"input\": $json.input }) }}",
|
||||||
"options": {}
|
"options": {}
|
||||||
},
|
},
|
||||||
"type": "n8n-nodes-base.httpRequest",
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
"typeVersion": 4.4,
|
"typeVersion": 4.4,
|
||||||
"position": [
|
"position": [
|
||||||
3344,
|
4464,
|
||||||
-224
|
-304
|
||||||
],
|
],
|
||||||
"id": "3f4a0807-5f29-49cb-a851-41100e04f5bf",
|
"id": "3f4a0807-5f29-49cb-a851-41100e04f5bf",
|
||||||
"name": "Insertar fechas1"
|
"name": "Insertar fechas1"
|
||||||
@@ -3929,8 +3902,8 @@
|
|||||||
"type": "n8n-nodes-base.aggregate",
|
"type": "n8n-nodes-base.aggregate",
|
||||||
"typeVersion": 1,
|
"typeVersion": 1,
|
||||||
"position": [
|
"position": [
|
||||||
3232,
|
4320,
|
||||||
-192
|
-304
|
||||||
],
|
],
|
||||||
"id": "3ecbb0c7-f5f5-4644-9f42-8be9502e814d",
|
"id": "3ecbb0c7-f5f5-4644-9f42-8be9502e814d",
|
||||||
"name": "Aggregate1"
|
"name": "Aggregate1"
|
||||||
@@ -3938,44 +3911,170 @@
|
|||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"jsonOutput": "={\n \"meet_id\": {{ $json.id }},\n \"titulo\": {{ $json.summary }},\n \"hora_inicio\": {{ $json.start }},\n \"hora_fin\": {{ $json.end }},\n \"instructor\": {{ $json.summary }},\n \"correo_instructor\": {{ $json.summary }},\n \"enlace_reunion\": {{ $json.summary }},\n \"idioma\": {{ $json.summary }},\n}",
|
"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": {}
|
"options": {}
|
||||||
},
|
},
|
||||||
"type": "n8n-nodes-base.set",
|
"type": "n8n-nodes-base.set",
|
||||||
"typeVersion": 3.4,
|
"typeVersion": 3.4,
|
||||||
"position": [
|
"position": [
|
||||||
2912,
|
4176,
|
||||||
-240
|
-304
|
||||||
],
|
],
|
||||||
"id": "a099259d-36e3-48b6-aa77-d8132f33f85e",
|
"id": "a099259d-36e3-48b6-aa77-d8132f33f85e",
|
||||||
"name": "Edit Fields"
|
"name": "Edit Fields"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"parameters": {
|
|
||||||
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n item.json.myNewField = 1;\n}\n\nreturn $input.all();"
|
|
||||||
},
|
|
||||||
"type": "n8n-nodes-base.code",
|
|
||||||
"typeVersion": 2,
|
|
||||||
"position": [
|
|
||||||
3280,
|
|
||||||
224
|
|
||||||
],
|
|
||||||
"id": "3c8fe81e-6c1f-41be-a521-9013bba262e0",
|
|
||||||
"name": "Code in JavaScript"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"mode": "combine",
|
"mode": "combine",
|
||||||
|
"advanced": true,
|
||||||
|
"mergeByFields": {
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"field1": "Fecha",
|
||||||
|
"field2": "fecha"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"options": {}
|
"options": {}
|
||||||
},
|
},
|
||||||
"type": "n8n-nodes-base.merge",
|
"type": "n8n-nodes-base.merge",
|
||||||
"typeVersion": 3.2,
|
"typeVersion": 3.2,
|
||||||
"position": [
|
"position": [
|
||||||
3328,
|
4032,
|
||||||
-16
|
-304
|
||||||
],
|
],
|
||||||
"id": "456bcbe4-cc98-48fc-bcd2-40f8961934ae",
|
"id": "456bcbe4-cc98-48fc-bcd2-40f8961934ae",
|
||||||
"name": "Unir datos"
|
"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": [
|
||||||
|
4320,
|
||||||
|
304
|
||||||
|
],
|
||||||
|
"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": {
|
||||||
@@ -4991,18 +5090,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": [
|
||||||
[
|
[
|
||||||
@@ -5035,6 +5129,71 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"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": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
@@ -5058,19 +5217,19 @@
|
|||||||
"recurrenceRules": []
|
"recurrenceRules": []
|
||||||
},
|
},
|
||||||
"node:Comenzo evento ingles": {
|
"node:Comenzo evento ingles": {
|
||||||
"lastTimeChecked": "2026-06-25T17:00:11Z"
|
"lastTimeChecked": "2026-06-25T21:00:11Z"
|
||||||
},
|
},
|
||||||
"node:Comenzo evento español": {
|
"node:Comenzo evento español": {
|
||||||
"lastTimeChecked": "2026-06-25T17:00:22Z"
|
"lastTimeChecked": "2026-06-25T21:00:22Z"
|
||||||
},
|
},
|
||||||
"node:Termino evento español": {
|
"node:Termino evento español": {
|
||||||
"lastTimeChecked": "2026-06-25T16:59:54Z"
|
"lastTimeChecked": "2026-06-25T20:59:54Z"
|
||||||
},
|
},
|
||||||
"node:Termino evento ingles": {
|
"node:Termino evento ingles": {
|
||||||
"lastTimeChecked": "2026-06-25T17:00:39Z"
|
"lastTimeChecked": "2026-06-25T21:00:39Z"
|
||||||
},
|
},
|
||||||
"node:Prueba": {
|
"node:Prueba": {
|
||||||
"lastTimeChecked": "2026-06-25T16:59:58Z"
|
"lastTimeChecked": "2026-06-25T20:59:58Z"
|
||||||
},
|
},
|
||||||
"node:Schedule Trigger2": {
|
"node:Schedule Trigger2": {
|
||||||
"recurrenceRules": []
|
"recurrenceRules": []
|
||||||
@@ -5356,9 +5515,9 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"versionId": "706041c6-b601-48d0-98b3-6c46be97ce21",
|
"versionId": "ede88449-a4ac-42cc-9e91-484976e8392b",
|
||||||
"activeVersionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3",
|
"activeVersionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3",
|
||||||
"versionCounter": 2516,
|
"versionCounter": 2812,
|
||||||
"triggerCount": 12,
|
"triggerCount": 12,
|
||||||
"shared": [
|
"shared": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user