Files
calendario-glm-way/glmway-workflow.json
T
2026-06-25 21:55:36 +00:00

10494 lines
316 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"$json": {
"updatedAt": "2026-06-25T21:55:35.771Z",
"createdAt": "2026-06-08T13:50:12.174Z",
"id": "F1iPg8hktNAebZua",
"name": "GLMWay",
"description": null,
"active": true,
"isArchived": false,
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "glmway",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
-352,
-144
],
"id": "4cff954f-86fd-4835-8463-b083e3a66f35",
"name": "Webhook",
"webhookId": "2dea176c-88de-41b6-851d-c9f6a703ab69"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
3120,
768
],
"id": "a2082638-94e3-4a91-aeac-f7849833a6a1",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"method": "POST",
"url": "=https://git.digitalcompass.agency/api/v1/repos/{{ $('Valores').item.json.user }}/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"message\": \"{{ $json.message }}\",\n \"content\": \"{{ $json.content }}\",\n \"branch\": \"{{ $json.branch }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
4080,
880
],
"id": "e428eaaf-f678-45ac-bbcc-926f8bd574b7",
"name": "Subir archivo",
"retryOnFail": false,
"credentials": {
"httpHeaderAuth": {
"id": "R4tnNpYoEjhBYeUT",
"name": "Eidan - gitea"
}
}
},
{
"parameters": {
"url": "=https://git.digitalcompass.agency/api/v1/repos/{{ $json.user }}/{{ $json.repo_name }}/contents/{{ $json.file_name }}.json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": []
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
3472,
768
],
"id": "58d2c064-8982-42b0-8f1a-a10d018dff94",
"name": "Obtener archivo",
"credentials": {
"httpHeaderAuth": {
"id": "R4tnNpYoEjhBYeUT",
"name": "Eidan - gitea"
}
},
"onError": "continueErrorOutput"
},
{
"parameters": {
"method": "PUT",
"url": "=https://git.digitalcompass.agency/api/v1/repos/{{ $('Valores').item.json.user }}/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"message\": \"{{ $json.message }}\",\n \"content\": \"{{ $json.content }}\",\n \"sha\": \"{{ $json.sha }}\",\n \"branch\": \"{{ $json.branch }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
4080,
672
],
"id": "f804d797-946f-4673-8291-308d47ede436",
"name": "Actualizar archivo",
"credentials": {
"httpHeaderAuth": {
"id": "R4tnNpYoEjhBYeUT",
"name": "Eidan - gitea"
}
}
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "F1iPg8hktNAebZua",
"mode": "list",
"cachedResultName": "GLMWay (#F1iPg8hktNAebZua)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
3728,
672
],
"id": "a6420476-f217-4079-b7a0-194969a2dac2",
"name": "Get a workflow1",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "F1iPg8hktNAebZua",
"mode": "list",
"cachedResultName": "GLMWay (#F1iPg8hktNAebZua)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
3728,
880
],
"id": "f96e2477-f9db-4d36-a162-836d05dcd8ab",
"name": "Get a workflow2",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "31558805-f167-47c4-b0b4-46b8a80ca282",
"name": "user",
"value": "mgomez",
"type": "string"
},
{
"id": "3519ad4c-6d66-4963-ab76-ee5517d88d67",
"name": "repo_name",
"value": "calendario-glm-way",
"type": "string"
},
{
"id": "0df99f1e-1354-43b9-9d20-9f994cc82cf6",
"name": "file_name",
"value": "glmway-workflow",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
3296,
768
],
"id": "fa4f3a95-6fe7-41c4-9a90-f4a3f58e06a8",
"name": "Valores"
},
{
"parameters": {
"jsCode": "const sha = $('Obtener archivo').first().json.sha;\nconst data = { $json };\n\nreturn [{\n json: {\n message: \"Update \" + $('Valores').first().json.file_name + \".json\",\n content: Buffer.from(JSON.stringify(data, null, 2)).toString(\"base64\"),\n sha: sha,\n branch: \"main\"\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3904,
672
],
"id": "5d50d650-f0b6-4046-b9c1-974664b655f6",
"name": "Code in JavaScript2"
},
{
"parameters": {
"jsCode": "const sha = $json.sha; // viene del GET anterior\nconst data = { $json };\n\nconst base64 = Buffer.from(JSON.stringify(data, null, 2)).toString(\"base64\");\n\nreturn [{\n json: {\n message: \"Create \" + $('Valores').first().json.file_name + \".json\",\n content: base64,\n sha: sha,\n branch: \"main\"\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3904,
880
],
"id": "30ffb25f-3ad7-465d-9630-887828df95f6",
"name": "Code in JavaScript4"
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.supervisorEId }}?fields=displayName,workEmail,status,supervisorEmail,location,jobTitle,department,",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
2608,
-960
],
"id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be",
"name": "Informacion del supervisor",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI",
"mode": "list",
"cachedResultName": "GLM_GLMWay_Calendario de Entrenamientos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit#gid=0"
},
"filtersUI": {
"values": [
{
"lookupColumn": "col_1",
"lookupValue": "={{ $json.fecha_transformada }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2752,
1328
],
"id": "b7a1afb4-5e9c-4fc0-8a64-99b2b71c918e",
"name": "Get row(s) in sheet1",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "=https://api.bamboohr.com/api/gateway.php/glm/v1/reports/custom",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"title\": \"Employees\",\n \"fields\": [\n \"id\",\n \"firstName\",\n \"lastName\",\n \"hireDate\",\n \"department\",\n \"jobTitle\"\n ]\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
1280,
-1408
],
"id": "a52ef26c-a5d6-4bb5-9a99-61fa25206105",
"name": "Informacion del supervisor1",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/50743?fields=displayName,mobilePhone,workPhone,workEmail,status,employeeNumber,supervisor,supervisorEmail,location,jobTitle,department,hireDate,supervisorEId",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
1632,
-1344
],
"id": "0088cd80-6150-4577-89a9-b28b06fea6b4",
"name": "Informacion del empleado1",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"operation": "get",
"employeeId": "={{ $json.body.employees[0].id }}",
"options": {}
},
"type": "n8n-nodes-base.bambooHr",
"typeVersion": 1,
"position": [
-176,
-144
],
"id": "5b4b3106-f932-4430-a11e-ebcc1740f884",
"name": "Get an employee",
"credentials": {
"bambooHrApi": {
"id": "VwYITXROyinOC4je",
"name": "Eidan - BambooHR account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 3 }) }}",
"options": {
"query": "Entrenamiento"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2656,
-784
],
"id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2",
"name": "Get many events1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1872,
-688
],
"id": "2cd687f2-a8b5-4c46-854a-4f60b4d7107f",
"name": "Entrenamiento español",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1872,
-864
],
"id": "01099730-b224-4b81-98cc-b924e2b02367",
"name": "Entrenamiento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventStarted",
"options": {
"matchTerm": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-656,
1888
],
"id": "92aaf072-5cf8-4ffd-b641-20fa5fb88103",
"name": "Comenzo evento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventStarted",
"options": {
"matchTerm": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-656,
2064
],
"id": "34eb762f-b9c7-4a72-94ce-3ce246c7c790",
"name": "Comenzo evento español",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventEnded",
"options": {
"matchTerm": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-320,
2848
],
"id": "e0c4da60-bbbe-4cc1-b340-1749e204b6b2",
"name": "Termino evento español",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventEnded",
"options": {
"matchTerm": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-320,
2672
],
"id": "cd1a89d4-21e5-475e-93ed-4f00bbfd0190",
"name": "Termino evento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"jsCode": "for (const item of $input.all()) {\n // 1. Cambia 'fecha_original' por el nombre real de tu campo\n const fechaStr = item.json.hireDate; \n\n if (fechaStr) {\n // 2. Forzamos UTC para evitar problemas de zona horaria\n const fecha = new Date(fechaStr + 'T00:00:00Z');\n \n // 3. Extraemos el día número\n const dia = fecha.getUTCDate();\n \n // 4. Extraemos el nombre del mes en inglés\n const mes = fecha.toLocaleDateString('en-US', { month: 'long', timeZone: 'UTC' });\n \n // 5. Los unimos en el orden exacto que necesitas: \"15 June\"\n item.json.fecha_transformada = `${dia} ${mes}`;\n } else {\n item.json.fecha_transformada = null;\n }\n}\n\nreturn $input.all();"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2544,
1328
],
"id": "a088f9b0-7ec6-40d0-9a90-fa2047ab0461",
"name": "Cambiar formato de fecha"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI",
"mode": "list",
"cachedResultName": "GLM_GLMWay_Calendario de Entrenamientos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit#gid=0"
},
"filtersUI": {
"values": [
{
"lookupColumn": "col_1",
"lookupValue": "2 July"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2368,
-1184
],
"id": "ed7dc4ef-e1fe-4305-ba7e-a98b617ee095",
"name": "Get row(s) in sheet2",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
3
],
"triggerAtHour": 16
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
1440,
928
],
"id": "7f7d71b2-6c53-49a2-92d8-e66b2d0bff54",
"name": "Schedule Trigger"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 4 }) }}",
"options": {
"fields": "",
"query": "Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2464,
-832
],
"id": "77e81486-bffe-457d-8bc0-442c25ff4512",
"name": "Entrenamiento ingles1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.id }}?fields=supervisorEmail,hireDate,supervisorEId,jobTitle",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
0,
-144
],
"id": "ae2aff4d-5874-4181-9801-cf51d5cc4ff3",
"name": "Informacion extra del empleado",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ Object.keys($json).length }}",
"rightValue": 0,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
912,
-240
],
"id": "8a2be7cc-85ad-4e44-92a7-fe3f94df703f",
"name": "Hay coordinador?"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $('Get an employee').item.json.workEmail }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2432,
-1344
],
"id": "deb40073-dc0e-41e4-ad7c-6df18de25b4f",
"name": "Empleado le falta info?"
},
{
"parameters": {
"jsCode": "const today = new Date();\n\n// Formato YYYY-MM-DD\nconst formattedDate = today.toISOString().split('T')[0];\n\nreturn [\n {\n json: {\n date: formattedDate\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2240,
1312
],
"id": "0db9e6a4-2e5e-4513-97fd-71d22aa90822",
"name": "Fecha hoy"
},
{
"parameters": {
"content": "## Formato fecha\nyyyy-mm-dd\n",
"height": 192,
"width": 192
},
"type": "n8n-nodes-base.stickyNote",
"position": [
128,
-224
],
"typeVersion": 1,
"id": "8de8b400-70cb-4367-bddc-d42876f18d52",
"name": "Sticky Note"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $json.isValid }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
560,
-144
],
"id": "cb43a2bb-7743-4994-a7b2-209cd0934cd7",
"name": "Entra hoy?"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-352,
352
],
"id": "20e1c800-bf0b-4484-b836-14bc7154e4e7",
"name": "Schedule Trigger1"
},
{
"parameters": {
"tableId": "inscritos_glmway",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "empleado_id",
"fieldValue": "={{ $('Get an employee').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": "={{ null }}"
},
{
"fieldId": "estado",
"fieldValue": "inactivo"
},
{
"fieldId": "puesto",
"fieldValue": "={{ $('Get an employee').item.json.jobTitle }}"
},
{
"fieldId": "division",
"fieldValue": "={{ $('Get an employee').item.json.division }}"
},
{
"fieldId": "pais",
"fieldValue": "={{ $('Get an employee').item.json.location }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
752,
-32
],
"id": "0a800bb8-d5f1-443e-b3b1-3ca9546eb28f",
"name": "Insertar a inscritos (inactivo)",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"jsCode": "const hireDate = $json.hireDate;\n\n// Fecha de hoy en formato YYYY-MM-DD\nconst today = new Date().toISOString().split('T')[0];\n\n// True si hireDate es hoy o anterior\nconst isValid = hireDate <= today;\n\nreturn [\n {\n json: {\n hireDate,\n today,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
176,
-144
],
"id": "241cf92b-09b1-4555-af46-7b9ff49c5e37",
"name": "Calcular fecha hireDate"
},
{
"parameters": {
"content": "## Numero wsp Matos\n\n18494105855@s.whatsapp.net",
"height": 192,
"width": 192
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1264,
-16
],
"typeVersion": 1,
"id": "719365c8-8099-4108-a910-83b651d81181",
"name": "Sticky Note1"
},
{
"parameters": {
"method": "POST",
"url": "={{'https://wsp.gomezleemarketing.com'}}/message/sendText/{{'botsoporte'}}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{'C267126ABB45-4C12-B626-6BAB1833F5D7'}}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ \"18097159076@s.whatsapp.net\" }}"
},
{
"name": "mediatype",
"value": "=image"
},
{
"name": "text",
"value": "=⚠️ No hay coordinador RRHH en el país de este nuevo ingreso:\n\nNombre: {{ $('Get an employee').item.json.displayName }}\nCorreo: {{ $('Get an employee').item.json.workEmail }}\nPaís: {{ $('Get an employee').item.json.location }}\n\n#GLMWay"
},
{
"name": "delay",
"value": "={{5000}}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1152,
-144
],
"id": "09ce1f03-3dfb-4108-9d25-6c05ac622a6f",
"name": "Alerta no hay coordinador RRHH",
"disabled": true
},
{
"parameters": {
"operation": "get",
"employeeId": "={{ $json.empleado_id }}",
"options": {}
},
"type": "n8n-nodes-base.bambooHr",
"typeVersion": 1,
"position": [
192,
352
],
"id": "9e00d1ce-5533-4357-977e-31a8da97f232",
"name": "Get an employee1",
"credentials": {
"bambooHrApi": {
"id": "VwYITXROyinOC4je",
"name": "Eidan - BambooHR account"
}
}
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.id }}?fields=supervisorEmail,hireDate,supervisorEId,jobTitle",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
368,
352
],
"id": "06c32cb0-a8ab-42c1-ae36-fe628b1b5e2b",
"name": "Informacion extra del empleado1",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
-16,
352
],
"id": "36c1682f-35a1-4016-b2ac-77f7e20e3e59",
"name": "Loop Over Items"
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=Hola, GLMer!\n\nEn este entrenamiento queremos transmitirte nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\nTe esperamos puntual y con todas las ganas de aprender.\n\nNos vemos en el enlace!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2096,
-224
],
"id": "e6c3acf5-d54b-4e00-b7a9-74038d27e387",
"name": "Send a message espanol",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nIn this training we want to share our culture, our DNA, and why we are different from the rest.\n\nWe look forward to seeing you on time and eager to learn.\n\nSee you at the link!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2096,
-400
],
"id": "f173c8d1-9311-405c-a7ee-164726df32f1",
"name": "Send a message ingles",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"content": "## Recordatorio a nuevo ingreso 24 horas antes de la sesion\n",
"height": 464,
"width": 1728,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
736
],
"typeVersion": 1,
"id": "ba58d863-3211-4f53-b087-eb53ba839499",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "## Recordatorio a coordinador RRHH 48 y 24 horas antes de la sesion\n",
"height": 496,
"width": 1728,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
1280
],
"typeVersion": 1,
"id": "e32bdd94-d61e-4b43-bf60-7acab8c0d3ae",
"name": "Sticky Note3"
},
{
"parameters": {
"content": "## Envio de formulario de evaluacion despues que la sesion finalize",
"height": 544,
"width": 1392,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
2464
],
"typeVersion": 1,
"id": "6d5c0fe5-5ab1-4cdc-bfd2-197dc2144274",
"name": "Sticky Note4"
},
{
"parameters": {
"content": "## Notificacion inicial\n\nEnvia notificacion de sesion en el primer dia de trabajo del empleado",
"height": 608,
"width": 2672,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-480
],
"typeVersion": 1,
"id": "cd2fe5c5-9963-410b-a61a-edc36b5aaed1",
"name": "Sticky Note5"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1200,
-896
],
"id": "e0cc1e60-9379-45fb-b7f4-6def9c3e9601",
"name": "Entrenamiento ingles3",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventStarted",
"options": {}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-656,
2800
],
"id": "35ec709a-30fd-4e3b-8492-cf6d8928e372",
"name": "Prueba",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"content": "## Completar datos y enviar invitacion",
"height": 544,
"width": 3328,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
160
],
"typeVersion": 1,
"id": "126bdd3f-a050-4053-aff3-e625c8bf161c",
"name": "Sticky Note6"
},
{
"parameters": {
"jsCode": "const hireDate = $json.hireDate;\n\n// Fecha de hoy en formato YYYY-MM-DD\nconst today = new Date().toISOString().split('T')[0];\n\n// True si hireDate es hoy o anterior\nconst isValid = hireDate <= today;\n\nreturn [\n {\n json: {\n hireDate,\n today,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
560,
352
],
"id": "26d7adef-3c91-410e-b92f-69841d28c039",
"name": "Calcular fecha hireDate1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $json.isValid }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
944,
352
],
"id": "15a1892d-01e8-432c-91f1-db236317cbca",
"name": "Entra hoy?1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Get an employee1').item.json.location) }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1136,
352
],
"id": "ce9f31d4-454e-4e31-9a22-8173b3fae392",
"name": "Pais?1"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2240,
-672
],
"id": "00c87312-256a-4738-856d-e92b9e144c75",
"name": "Entrenamiento español1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2240,
-848
],
"id": "b3c26eeb-2ff9-42c9-b5cc-fe0776e53c46",
"name": "Entrenamiento ingles4",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ Object.keys($json).length }}",
"rightValue": 0,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2432,
352
],
"id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4",
"name": "Hay coordinador?1"
},
{
"parameters": {
"method": "POST",
"url": "={{'https://wsp.gomezleemarketing.com'}}/message/sendText/{{'botsoporte'}}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{'C267126ABB45-4C12-B626-6BAB1833F5D7'}}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ \"18097159076@s.whatsapp.net\" }}"
},
{
"name": "mediatype",
"value": "=image"
},
{
"name": "text",
"value": "=⚠️ No hay coordinador RRHH en el país de este nuevo ingreso:\n\nNombre: {{ $('Get an employee1').item.json.displayName }}\nCorreo: {{ $('Get an employee1').item.json.workEmail }}\nPaís: {{ $('Get an employee1').item.json.location }}\n\n#GLMWay"
},
{
"name": "delay",
"value": "={{5000}}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
2608,
432
],
"id": "67928478-7604-45a4-9ab0-851079e1470c",
"name": "Alerta no hay coordinador RRHH1",
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=Hola, GLMer!\n\nEn este entrenamiento queremos transmitirte nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\nTe esperamos puntual y con todas las ganas de aprender.\n\nNos vemos en el enlace!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2080,
272
],
"id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b",
"name": "Send a message espanol1",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nIn this training we want to share our culture, our DNA, and why we are different from the rest.\n\nWe look forward to seeing you on time and eager to learn.\n\nSee you at the link!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2080,
448
],
"id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4",
"name": "Send a message ingles1",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Jamaica",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "32931394-f4ea-4055-b866-906a81988173",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Trinidad and Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Barbados",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "28e49217-0c1a-4462-9642-676e54926d3e",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Saint Thomas",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "St. Croix",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "b308c2b6-53b4-4d49-b540-cdc03e36528b",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Guyana",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "35a50a33-a2b5-4116-9336-11300357569e",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Aruba",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1152,
-320
],
"id": "b183c892-8822-4bc3-a92c-4410eac41a01",
"name": "Pais?"
},
{
"parameters": {
"operation": "update",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"eventId": "3ul4moq4isoavr9jhqpcbs7juu_20260617T230000Z",
"updateFields": {
"attendeesUi": {
"values": {
"attendees": [
""
]
}
}
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1520,
-928
],
"id": "711b3353-6f75-4c6d-bef7-e704290787e8",
"name": "Invitar con calendarios entrenamiento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"content": "## Invitar al nuevo ingreso a travez del calendario usando el id del evento, asi le aparece el evento",
"height": 384
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
-1168
],
"typeVersion": 1,
"id": "304297ee-18fc-4cbd-8a01-b627ae08b991",
"name": "Sticky Note7"
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
2784,
352
],
"id": "98185de1-e81a-440f-8951-f98bd78c707b",
"name": "Wait",
"webhookId": "22a77d35-7adb-47ec-beca-0fae7615ab5b"
},
{
"parameters": {
"content": "## Enviar listado de inscritos al facilitador antes de iniciar el evento",
"height": 544,
"width": 1392,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
1824
],
"typeVersion": 1,
"id": "79ccf49e-4434-4b72-8147-ad27b9d994a2",
"name": "Sticky Note8"
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
800,
928
],
"id": "10b2cb4e-274d-4913-9345-2c024c071f4c",
"name": "Send a message espanol2",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
800,
752
],
"id": "1dc76989-8c58-4ffe-9e1c-5113a59d346c",
"name": "Send a message ingles2",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-352,
928
],
"id": "60708d5c-0cd7-45fc-bb67-ed050c1f8022",
"name": "Schedule Trigger2"
},
{
"parameters": {
"operation": "get",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "estado",
"keyValue": "inactivo"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
-176,
352
],
"id": "93a65a61-59a9-4903-8a35-dbf66a0ef468",
"name": "Obtener inactivos",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"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": "cargo",
"lookupValue": "Coordinador RRHH"
},
{
"lookupColumn": "country",
"lookupValue": "={{ $('Get an employee').item.json.location }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
752,
-240
],
"id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7",
"name": "Obtener coordinador",
"alwaysOutputData": true,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"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": [
2272,
352
],
"id": "3a6f198b-e136-49fb-a171-78164e10b600",
"name": "Obtener coordinador1",
"alwaysOutputData": true,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
0,
928
],
"id": "9e8fd238-541e-455b-8ae5-6a3097eb38a0",
"name": "Loop Over Items1"
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1200,
1072
],
"id": "ee5bb9bc-b8cb-493f-8463-ae0a24cf1f0d",
"name": "Wait1",
"webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Obtener notificados').item.json.location) }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
608,
832
],
"id": "4d94c907-8ab1-4213-be20-9e24173cf0a3",
"name": "Pais?2"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1632,
1568
],
"id": "7dd9a706-4d80-45c6-942a-c703eb074a20",
"name": "Entrenamiento español2",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1632,
1392
],
"id": "d8253a7a-4e37-4c14-b4da-e0029571cd21",
"name": "Entrenamiento ingles5",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1008,
-816
],
"id": "516244e1-3e39-4905-9160-86af296a0479",
"name": "Entrenamiento español3",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "1e6f83ce-19e7-4dd9-ba34-a11836a6181e",
"name": "idioma",
"value": "ES",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1376,
-400
],
"id": "e8a65f36-8e8e-4135-b7a2-a7ef4617de2f",
"name": "Crear variable idioma ES"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b0610214-1357-4e55-be5f-75c159d3b717",
"name": "idioma",
"value": "EN",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1376,
-224
],
"id": "971ae719-5692-4f87-9a57-2287ee44783d",
"name": "Crear variable idioma EN"
},
{
"parameters": {
"operation": "get",
"tableId": "sesiones_glmway",
"filters": {
"conditions": [
{
"keyName": "idioma",
"keyValue": "={{ $json.idioma }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1568,
-400
],
"id": "cb9e8a10-a1e7-40c7-8447-2379b0191a8f",
"name": "Obtener sesiones español",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "get",
"tableId": "sesiones_glmway",
"filters": {
"conditions": [
{
"keyName": "idioma",
"keyValue": "={{ $json.idioma }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1568,
-224
],
"id": "5ca790ee-4944-4868-98af-89837ac39422",
"name": "Obtener sesiones ingles",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1760,
-400
],
"id": "c2db5e62-7741-4ff2-ad31-71c108dd7386",
"name": "Calcular sesion mas cercana"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1760,
-224
],
"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": [
1360,
272
],
"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": [
1360,
448
],
"id": "9d53a7e1-6dab-494b-8064-6c3063f5596f",
"name": "Crear variable idioma EN1"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?1').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": [
1744,
272
],
"id": "ee31fd24-d703-44b3-b65b-75234564d29f",
"name": "Calcular sesion mas cercana2"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?1').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": [
1744,
448
],
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1920,
-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",
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1920,
-224
],
"id": "7530270a-b32e-419e-8fc5-b29fa07dda39",
"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": [
1552,
272
],
"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": [
1552,
448
],
"id": "2c35fe0e-1f32-4263-9c02-c392cb77e0e5",
"name": "Obtener sesiones ingles1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1136,
496
],
"id": "960e74ae-583b-4802-ab72-3b402c095d9b",
"name": "Wait2",
"webhookId": "1211d7da-55b9-4a73-837d-55934076a799"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $('Get an employee1').item.json.workEmail }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
752,
352
],
"id": "a2a81e91-f617-490a-b1ce-5737944fa23b",
"name": "Tiene correo?"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Get an employee1').item.json.id }}"
}
]
},
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
},
{
"fieldId": "pais",
"fieldValue": "={{ $('Get an employee1').item.json.location }}"
},
{
"fieldId": "division",
"fieldValue": "={{ $('Get an employee1').item.json.division }}"
},
{
"fieldId": "puesto",
"fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1904,
272
],
"id": "16d364da-e6fc-4943-bd64-f83ccab66b9f",
"name": "Actualizar datos del empleado y sesion asignada2",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "get",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "estado",
"keyValue": "notificado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
-176,
928
],
"id": "34aa0bc5-0feb-46e3-871b-27a1cc418675",
"name": "Obtener notificados",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $json.isValid }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
416,
928
],
"id": "107b41cb-06d5-4e7e-863b-dace19c8d1e9",
"name": "Falta 24h para el evento?"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Loop Over Items1').item.json.empleado_id }}"
}
]
},
"fieldsUi": {
"fieldValues": [
{
"fieldId": "estado",
"fieldValue": "recordado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1008,
848
],
"id": "ddf0a273-d3bc-44cc-888b-d789ce72ff77",
"name": "Actualizar estado a recordado",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
816,
1488
],
"id": "39331d88-6f2b-4df1-ac76-dda9ff47dfec",
"name": "Send a message espanol3",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
816,
1312
],
"id": "9d4f57a4-ac2f-49bd-b5fa-50658a8d928e",
"name": "Send a message ingles3",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-352,
1488
],
"id": "6951af7d-5098-4156-81bd-8f67034fcf70",
"name": "Schedule Trigger3"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
0,
1488
],
"id": "7545364a-df0a-4420-a1af-5bcd4f8c9602",
"name": "Loop Over Items2"
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1200,
1616
],
"id": "617ab85d-23a6-4546-9331-eff343d9b1c5",
"name": "Wait3",
"webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Jamaica",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "32931394-f4ea-4055-b866-906a81988173",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Trinidad and Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Barbados",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "28e49217-0c1a-4462-9642-676e54926d3e",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Saint Thomas",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "St. Croix",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "b308c2b6-53b4-4d49-b540-cdc03e36528b",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Guyana",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "35a50a33-a2b5-4116-9336-11300357569e",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Aruba",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
624,
1392
],
"id": "13ee807a-f1cd-48ef-921b-7b5c260ba116",
"name": "Pais?3"
},
{
"parameters": {
"operation": "get",
"tableId": "coordinadores_rrhh_glmway",
"filters": {
"conditions": [
{
"keyName": "estado",
"keyValue": "=no_notificado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
-176,
1488
],
"id": "0457dbf8-9c04-4f2d-9928-4f770eb51cc0",
"name": "Obtener notificados1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Loop Over Items2').item.json.empleado_id }}"
}
]
},
"fieldsUi": {
"fieldValues": [
{
"fieldId": "estado",
"fieldValue": "recordado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1024,
1408
],
"id": "0881ba84-bd04-4e91-9c09-0ba18e28ed28",
"name": "Actualizar estado a recordado1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $json.isValid }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
432,
1488
],
"id": "0fea4950-f873-4375-8964-45cfc3fead02",
"name": "Falta 48h para el evento?1"
},
{
"parameters": {
"jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\n\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días) o mañana (1 día)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 1;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
208,
928
],
"id": "bbd0558c-3b3a-462b-957c-83b1975e5413",
"name": "Calcular falta 24h o es el mismo dia"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Get an employee1').item.json.id }}"
}
]
},
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
},
{
"fieldId": "pais",
"fieldValue": "={{ $('Get an employee1').item.json.location }}"
},
{
"fieldId": "division",
"fieldValue": "={{ $('Get an employee1').item.json.division }}"
},
{
"fieldId": "puesto",
"fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1904,
448
],
"id": "f2aca2bd-e72d-4457-9a6b-c4b0f8bcc558",
"name": "Actualizar datos del empleado y sesion asignada3",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $('Get an employee').item.json.workEmail }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
336,
-144
],
"id": "a9fff247-d1b0-4314-ba8d-e7401086b771",
"name": "Tiene correo?1"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4",
"mode": "list",
"cachedResultName": "Empleados GLM Prueba",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit#gid=0"
},
"filtersUI": {
"values": [
{
"lookupColumn": "cargo",
"lookupValue": "Coordinador RRHH"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
3856,
432
],
"id": "ddfe7158-8cc6-440c-9e59-de97b7124eb8",
"name": "Obtener coordinador2",
"alwaysOutputData": true,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2464,
-656
],
"id": "98ab4271-94af-4a22-9882-b80f84be7c24",
"name": "Entrenamiento español4",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"jsCode": "const monthNames = ['January','February','March','April','May','June','July',\n 'August','September','October','November','December'];\n\nreturn items.map(item => {\n const event = item.json;\n const startStr = event.start.dateTime || event.start.date;\n const datePart = startStr.split('T')[0]; // \"2026-06-21\"\n const [year, month, day] = datePart.split('-').map(Number);\n const formattedDate = `${day} ${monthNames[month - 1]}`;\n\n const summary = event.summary || '';\n const organizerName = event.organizer?.displayName \n || (event.organizer?.email ? event.organizer.email.split('@')[0] : '');\n\n let espanol = '';\n let english = '';\n\n if (summary.toLowerCase().includes('entrenamiento')) {\n espanol = organizerName;\n } else if (summary.toLowerCase().includes('training')) {\n english = organizerName;\n }\n\n return {\n json: {\n Fecha: formattedDate,\n Espanol: espanol,\n English: english\n }\n };\n});"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
4064,
432
],
"id": "41289b04-a9f4-4abc-8816-5afccd0e7996",
"name": "Code in JavaScript1"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 0 0 1 1 *"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
2368,
-352
],
"id": "ca136518-b776-45ba-b1a2-ad5327dd4cca",
"name": "Schedule Trigger4"
},
{
"parameters": {
"operation": "appendOrUpdate",
"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"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Fecha": "={{ $json.start }}"
},
"matchingColumns": [
"Fecha"
],
"schema": [
{
"id": "Fecha",
"displayName": "Fecha",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
3264,
-352
],
"id": "7c321f7d-bce9-447c-b94c-35f6967a48e3",
"name": "Insertar fechas",
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
3088,
-352
],
"id": "27531838-5dc7-4169-a08a-f4da93899580",
"name": "Wait4",
"webhookId": "85cfdcd9-384b-47e8-9d7d-4e079f0a4d97"
},
{
"parameters": {
"operation": "clear",
"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"
},
"clear": "specificRange",
"range": "A2:D80"
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2912,
-352
],
"id": "bd8cb535-6aa3-46df-9ca0-6efc0555f2e4",
"name": "Borrar fechas",
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"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": 288,
"width": 1072
},
"type": "n8n-nodes-base.stickyNote",
"position": [
2336,
-480
],
"typeVersion": 1,
"id": "ddcb9db1-2590-4364-aeeb-db79c35ea604",
"name": "Sticky Note10"
},
{
"parameters": {
"operation": "get",
"employeeId": "=50764",
"options": {}
},
"type": "n8n-nodes-base.bambooHr",
"typeVersion": 1,
"position": [
432,
-864
],
"id": "4ac439e5-1b93-4355-a450-b019b63e9437",
"name": "Get an employee2",
"credentials": {
"bambooHrApi": {
"id": "VwYITXROyinOC4je",
"name": "Eidan - BambooHR account"
}
}
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
576,
2816
],
"id": "3c22bc65-799f-4432-86fe-10ae92e036de",
"name": "Send a message espanol4",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
576,
2640
],
"id": "4dfc0135-6886-4d33-9b2a-a26efbe72832",
"name": "Send a message ingles4",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1264,
2272
],
"id": "f6ec4ef9-94a9-4dbb-8c44-0bbd1a6f0f87",
"name": "Wait5",
"webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Loop Over Items2').item.json.empleado_id }}"
}
]
},
"fieldsUi": {
"fieldValues": [
{
"fieldId": "estado",
"fieldValue": "recordado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
832,
2736
],
"id": "b7c02e2f-1382-4086-9059-cf75fee9d278",
"name": "Actualizar estado a recordado2",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/conferenceRecords/{{ $json.id }}/participants",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
448,
3088
],
"id": "ef89ad57-bdc8-4d9d-a250-41706ec900c1",
"name": "HTTP Request",
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=\nhttps://meet.googleapis.com/v2/conferenceRecords/{conferenceRecordId}/participants/{participantId}/participantSessions",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"id": "e76171d6-6fdd-405b-80d7-57c9cb8ee24e",
"name": "HTTP Request - Get Meet Artifacts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
272,
3248
],
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://www.googleapis.com/calendar/v3/calendars/primary/events/{{ $json.id }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
64,
3264
],
"id": "602289b9-3c7d-4ced-b507-b27401ed9910",
"name": "HTTP Request1"
},
{
"parameters": {
"url": "=https://www.googleapis.com/calendar/v3/calendars/primary/events/{{ $json.id }}",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"id": "c32466aa-a6d5-4d13-940f-553a6ab87107",
"name": "HTTP Request - Get Meet Artifacts1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
96,
2656
],
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/aao-ixkr-uwu/participants",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"id": "904cdfbe-b252-414b-9859-3f8e85e7e118",
"name": "HTTP Request - Get Meet Artifacts2",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
256,
2976
],
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/conferenceRecords",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "filter",
"value": "start_time>=\"2026-01-01T00:00:00Z\""
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
-144,
2848
],
"id": "955614d8-60a7-4762-8c02-86ac33e54cb3",
"name": "HTTP Request2",
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/conferenceRecords/hFRcUdt3dvlZlJ6L1Wo6DxITOAIIigIgABgBCA/participants",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"sendQuery": true,
"queryParameters": {
"parameters": []
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
64,
2848
],
"id": "a84173c0-db9f-4251-af6b-6e475541fc52",
"name": "HTTP Request3",
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días), mañana (1 día) o pasado mañana (2 días)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 2;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
208,
1488
],
"id": "3e2b4cde-d7aa-4879-aa55-f1a169c16bd3",
"name": "Calcular falta 48h o 24h"
},
{
"parameters": {
"content": "## Aviso a instructor si no hay nadie inscrito a la sesion del dia\n",
"height": 464,
"width": 1552,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1392,
736
],
"typeVersion": 1,
"id": "de09868e-4a06-4c64-9e66-aae9e14b9896",
"name": "Sticky Note11"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMin": "={{ $now.startOf('year') }}",
"timeMax": "={{ $now.endOf('year') }}",
"options": {
"orderBy": "startTime",
"query": "#TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2560,
-352
],
"id": "b2b03ce6-6010-4e4f-be7a-d9040286e295",
"name": "Obtener entrenamientos ingles y espanol",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"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": [
2736,
-352
],
"id": "73c39af9-bc01-4d97-81ee-846aff70b3a6",
"name": "Formatear fecha"
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 11
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
2368,
-48
],
"id": "55a755d8-8b74-440f-93c6-8a1ecba4c666",
"name": "Schedule Trigger5"
},
{
"parameters": {
"content": "## Añadir/actualizar coordinadores RRHH\nEste trigger se activa todos los dias a las 11am",
"height": 288,
"width": 1072
},
"type": "n8n-nodes-base.stickyNote",
"position": [
2336,
-160
],
"typeVersion": 1,
"id": "3fd1379f-78d1-40a8-b24f-f8f086fda80a",
"name": "Sticky Note12"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMin": "={{ $now.startOf('year') }}",
"timeMax": "={{ $now.endOf('year') }}",
"options": {
"orderBy": "startTime",
"query": "#TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
3664,
-208
],
"id": "3c32f96e-cd34-4be4-8c24-b4be7a8f29d9",
"name": "Obtener entrenamientos ingles y espanol1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg",
"mode": "list",
"cachedResultName": "Calendario GLMWay Prueba",
"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"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2544,
-48
],
"id": "73089147-ba1f-4fb4-ac17-d5670b263fd8",
"name": "Obtener coordinadores",
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://dbit.digitalcompass.agency/rest/v1/rpc/insertar_coordinadores_rrhh_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": [
2880,
-48
],
"id": "231f396b-855a-4c50-8d6d-096018e6d2ac",
"name": "Insertar/actualizar coordinadores a la bd"
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"destinationFieldName": "input",
"options": {}
},
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
2704,
-48
],
"id": "e51bd2d5-22b5-46cf-b346-c1ba16bb5c34",
"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": [
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": {
"Webhook": {
"main": [
[
{
"node": "Get an employee",
"type": "main",
"index": 0
}
]
]
},
"When clicking Execute workflow": {
"main": [
[
{
"node": "Valores",
"type": "main",
"index": 0
}
]
]
},
"Obtener archivo": {
"main": [
[
{
"node": "Get a workflow1",
"type": "main",
"index": 0
}
],
[
{
"node": "Get a workflow2",
"type": "main",
"index": 0
}
]
]
},
"Get a workflow1": {
"main": [
[
{
"node": "Code in JavaScript2",
"type": "main",
"index": 0
}
]
]
},
"Get a workflow2": {
"main": [
[
{
"node": "Code in JavaScript4",
"type": "main",
"index": 0
}
]
]
},
"Valores": {
"main": [
[
{
"node": "Obtener archivo",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript2": {
"main": [
[
{
"node": "Actualizar archivo",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript4": {
"main": [
[
{
"node": "Subir archivo",
"type": "main",
"index": 0
}
]
]
},
"Get an employee": {
"main": [
[
{
"node": "Informacion extra del empleado",
"type": "main",
"index": 0
}
]
]
},
"Cambiar formato de fecha": {
"main": [
[
{
"node": "Get row(s) in sheet1",
"type": "main",
"index": 0
}
]
]
},
"Informacion del supervisor": {
"main": [
[]
]
},
"Informacion extra del empleado": {
"main": [
[
{
"node": "Calcular fecha hireDate",
"type": "main",
"index": 0
}
]
]
},
"Fecha hoy": {
"main": [
[]
]
},
"Entra hoy?": {
"main": [
[
{
"node": "Obtener coordinador",
"type": "main",
"index": 0
}
],
[
{
"node": "Insertar a inscritos (inactivo)",
"type": "main",
"index": 0
}
]
]
},
"Calcular fecha hireDate": {
"main": [
[
{
"node": "Tiene correo?1",
"type": "main",
"index": 0
}
]
]
},
"Hay coordinador?": {
"main": [
[
{
"node": "Pais?",
"type": "main",
"index": 0
}
],
[
{
"node": "Alerta no hay coordinador RRHH",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger1": {
"main": [
[
{
"node": "Obtener inactivos",
"type": "main",
"index": 0
}
]
]
},
"Get an employee1": {
"main": [
[
{
"node": "Informacion extra del empleado1",
"type": "main",
"index": 0
}
]
]
},
"Informacion extra del empleado1": {
"main": [
[
{
"node": "Calcular fecha hireDate1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Get an employee1",
"type": "main",
"index": 0
}
]
]
},
"Entrenamiento ingles": {
"main": [
[]
]
},
"Entrenamiento español": {
"main": [
[]
]
},
"Calcular fecha hireDate1": {
"main": [
[
{
"node": "Tiene correo?",
"type": "main",
"index": 0
}
]
]
},
"Entra hoy?1": {
"main": [
[
{
"node": "Pais?1",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
},
"Pais?1": {
"main": [
[
{
"node": "Crear variable idioma ES1",
"type": "main",
"index": 0
}
],
[
{
"node": "Crear variable idioma EN1",
"type": "main",
"index": 0
}
]
]
},
"Entrenamiento español1": {
"main": [
[]
]
},
"Entrenamiento ingles4": {
"main": [
[]
]
},
"Hay coordinador?1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
],
[
{
"node": "Alerta no hay coordinador RRHH1",
"type": "main",
"index": 0
}
]
]
},
"Pais?": {
"main": [
[
{
"node": "Crear variable idioma ES",
"type": "main",
"index": 0
}
],
[
{
"node": "Crear variable idioma EN",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles1": {
"main": [
[
{
"node": "Obtener coordinador1",
"type": "main",
"index": 0
}
]
]
},
"Send a message espanol1": {
"main": [
[
{
"node": "Obtener coordinador1",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger2": {
"main": [
[
{
"node": "Obtener notificados",
"type": "main",
"index": 0
}
]
]
},
"Obtener inactivos": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Obtener coordinador": {
"main": [
[
{
"node": "Hay coordinador?",
"type": "main",
"index": 0
}
]
]
},
"Obtener coordinador1": {
"main": [
[
{
"node": "Hay coordinador?1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[],
[
{
"node": "Calcular falta 24h o es el mismo dia",
"type": "main",
"index": 0
}
]
]
},
"Pais?2": {
"main": [
[
{
"node": "Send a message ingles2",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a message espanol2",
"type": "main",
"index": 0
}
]
]
},
"Entrenamiento ingles5": {
"main": [
[]
]
},
"Entrenamiento español2": {
"main": [
[]
]
},
"Send a message espanol2": {
"main": [
[
{
"node": "Actualizar estado a recordado",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles2": {
"main": [
[
{
"node": "Actualizar estado a recordado",
"type": "main",
"index": 0
}
]
]
},
"Crear variable idioma ES": {
"main": [
[
{
"node": "Obtener sesiones español",
"type": "main",
"index": 0
}
]
]
},
"Crear variable idioma EN": {
"main": [
[
{
"node": "Obtener sesiones ingles",
"type": "main",
"index": 0
}
]
]
},
"Obtener sesiones español": {
"main": [
[
{
"node": "Calcular sesion mas cercana",
"type": "main",
"index": 0
}
]
]
},
"Obtener sesiones ingles": {
"main": [
[
{
"node": "Calcular sesion mas cercana1",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana": {
"main": [
[
{
"node": "Guardar datos del empleado y sesion asignada",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana1": {
"main": [
[
{
"node": "Guardar datos del empleado y sesion asignada1",
"type": "main",
"index": 0
}
]
]
},
"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": "Actualizar datos del empleado y sesion asignada2",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana3": {
"main": [
[
{
"node": "Actualizar 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": [
[
{
"node": "Send a message espanol",
"type": "main",
"index": 0
}
]
]
},
"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
}
]
]
},
"Alerta no hay coordinador RRHH1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait2": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Tiene correo?": {
"main": [
[
{
"node": "Entra hoy?1",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
},
"Actualizar datos del empleado y sesion asignada2": {
"main": [
[
{
"node": "Send a message espanol1",
"type": "main",
"index": 0
}
]
]
},
"Obtener notificados": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Falta 24h para el evento?": {
"main": [
[
{
"node": "Pais?2",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Actualizar estado a recordado": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Send a message espanol3": {
"main": [
[
{
"node": "Actualizar estado a recordado1",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles3": {
"main": [
[
{
"node": "Actualizar estado a recordado1",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger3": {
"main": [
[
{
"node": "Obtener notificados1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items2": {
"main": [
[],
[
{
"node": "Calcular falta 48h o 24h",
"type": "main",
"index": 0
}
]
]
},
"Wait3": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"Pais?3": {
"main": [
[
{
"node": "Send a message ingles3",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a message espanol3",
"type": "main",
"index": 0
}
]
]
},
"Obtener notificados1": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"Actualizar estado a recordado1": {
"main": [
[
{
"node": "Wait3",
"type": "main",
"index": 0
}
]
]
},
"Falta 48h para el evento?1": {
"main": [
[
{
"node": "Pais?3",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait3",
"type": "main",
"index": 0
}
]
]
},
"Calcular falta 24h o es el mismo dia": {
"main": [
[
{
"node": "Falta 24h para el evento?",
"type": "main",
"index": 0
}
]
]
},
"Actualizar datos del empleado y sesion asignada3": {
"main": [
[
{
"node": "Send a message ingles1",
"type": "main",
"index": 0
}
]
]
},
"Tiene correo?1": {
"main": [
[
{
"node": "Entra hoy?",
"type": "main",
"index": 0
}
],
[
{
"node": "Insertar a inscritos (inactivo)",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger4": {
"main": [
[
{
"node": "Obtener entrenamientos ingles y espanol",
"type": "main",
"index": 0
}
]
]
},
"Insertar fechas": {
"main": [
[]
]
},
"Wait4": {
"main": [
[
{
"node": "Insertar fechas",
"type": "main",
"index": 0
}
]
]
},
"Borrar fechas": {
"main": [
[
{
"node": "Wait4",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles4": {
"main": [
[
{
"node": "Actualizar estado a recordado2",
"type": "main",
"index": 0
}
]
]
},
"Send a message espanol4": {
"main": [
[
{
"node": "Actualizar estado a recordado2",
"type": "main",
"index": 0
}
]
]
},
"Termino evento español": {
"main": [
[
{
"node": "HTTP Request2",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request2": {
"main": [
[
{
"node": "HTTP Request3",
"type": "main",
"index": 0
}
]
]
},
"Calcular falta 48h o 24h": {
"main": [
[
{
"node": "Falta 48h para el evento?1",
"type": "main",
"index": 0
}
]
]
},
"Obtener entrenamientos ingles y espanol": {
"main": [
[
{
"node": "Formatear fecha",
"type": "main",
"index": 0
}
]
]
},
"Formatear fecha": {
"main": [
[
{
"node": "Borrar fechas",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger5": {
"main": [
[
{
"node": "Obtener coordinadores",
"type": "main",
"index": 0
}
]
]
},
"Obtener entrenamientos ingles y espanol1": {
"main": [
[
{
"node": "Formatear fecha y detectar idioma",
"type": "main",
"index": 0
}
]
]
},
"Obtener coordinadores": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Insertar/actualizar coordinadores a la bd",
"type": "main",
"index": 0
}
]
]
},
"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": [
[]
]
}
},
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"timeSavedMode": "fixed",
"timezone": "America/Santo_Domingo",
"callerPolicy": "workflowsFromSameOwner",
"availableInMCP": false
},
"staticData": {
"node:Gmail Trigger": {
"Gmail Trigger": {
"lastTimeChecked": 1781290702
}
},
"node:Schedule Trigger": {
"recurrenceRules": []
},
"node:Schedule Trigger1": {
"recurrenceRules": []
},
"node:Comenzo evento ingles": {
"lastTimeChecked": "2026-06-25T21:00:11Z"
},
"node:Comenzo evento español": {
"lastTimeChecked": "2026-06-25T21:00:22Z"
},
"node:Termino evento español": {
"lastTimeChecked": "2026-06-25T20:59:54Z"
},
"node:Termino evento ingles": {
"lastTimeChecked": "2026-06-25T21:00:39Z"
},
"node:Prueba": {
"lastTimeChecked": "2026-06-25T20:59:58Z"
},
"node:Schedule Trigger2": {
"recurrenceRules": []
},
"node:Schedule Trigger3": {
"recurrenceRules": []
},
"node:Schedule Trigger4": {
"recurrenceRules": []
},
"node:Schedule Trigger5": {
"recurrenceRules": []
}
},
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {
"Get row(s) in sheet2": [
{
"json": {
"row_number": 108,
"col_1": "2 July",
"Espanol": "Poul",
"English": ""
},
"pairedItem": {
"item": 0
}
}
],
"Fecha hoy": [
{
"json": {
"date": "2026-06-16"
},
"pairedItem": {
"item": 0
}
}
],
"Termino evento español": [
{
"json": {
"kind": "calendar#event",
"etag": "\"3562422476268862\"",
"id": "3ul4moq4isoavr9jhqpcbs7juu_20260617T230000Z",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=M3VsNG1vcTRpc29hdnI5amhxcGNiczdqdXVfMjAyNjA2MTdUMjMwMDAwWiBldGhlbkBnb21lemxlZW1hcmtldGluZy5jb20",
"created": "2023-06-16T17:18:01.000Z",
"updated": "2026-06-11T20:53:58.134Z",
"summary": "Entrenamiento #TheGLMWay",
"description": "Hola, GLMer!\n\nEn este entrenamiento queremos transmitirte nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\nTe esperamos puntual y con todas las ganas de aprender.\n\nNos vemos en el enlace!",
"creator": {
"email": "fvicioso@gomezleemarketing.com",
"displayName": "Francis Vicioso"
},
"organizer": {
"email": "fvicioso@gomezleemarketing.com",
"displayName": "Francis Vicioso"
},
"start": {
"dateTime": "2026-06-17T19:00:00-04:00",
"timeZone": "America/Bogota"
},
"end": {
"dateTime": "2026-06-17T20:00:00-04:00",
"timeZone": "America/Bogota"
},
"recurringEventId": "3ul4moq4isoavr9jhqpcbs7juu_R20260603T230000",
"originalStartTime": {
"dateTime": "2026-06-17T19:00:00-04:00",
"timeZone": "America/Bogota"
},
"iCalUID": "3ul4moq4isoavr9jhqpcbs7juu_R20260603T230000@google.com",
"sequence": 1,
"attendees": [
{
"email": "ymadera@gomezleemarketing.com",
"displayName": "Yanelly Madera",
"responseStatus": "needsAction"
},
{
"email": "rlee@gomezleemarketing.com",
"displayName": "Rossy Lee",
"responseStatus": "needsAction"
},
{
"email": "fherrera@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "pmerida@gomezleemarketing.com",
"displayName": "Poul Merida",
"responseStatus": "accepted"
},
{
"email": "lgomez@gomezleemarketing.com",
"displayName": "Leopoldo Gomez",
"responseStatus": "accepted"
},
{
"email": "grodriguez@gomezleemarketing.com",
"displayName": "Gerardo Rodriguez",
"responseStatus": "accepted"
},
{
"email": "gmedina@gomezleemarketing.com",
"displayName": "Gabriel Medina",
"responseStatus": "accepted"
},
{
"email": "fvicioso@gomezleemarketing.com",
"displayName": "Francis Vicioso",
"organizer": true,
"responseStatus": "accepted"
},
{
"email": "lmgomez@gomezleemarketing.com",
"displayName": "Lil Gomez",
"responseStatus": "accepted"
},
{
"email": "lsantana@gomezleemarketing.com",
"displayName": "Lizbeth Santana",
"responseStatus": "needsAction"
},
{
"email": "jfnunez@gomezleemarketing.com",
"displayName": "José Fernando Núñez",
"responseStatus": "accepted"
},
{
"email": "lcabrera@gomezleemarketing.com",
"displayName": "Lucy Cabrera",
"responseStatus": "needsAction"
},
{
"email": "momendoza@gomezleemarketing.com",
"displayName": "Moisés Mendoza",
"responseStatus": "accepted"
},
{
"email": "clopez@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "ccastro@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "cmalta@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "evitiello@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "jgalvez@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "mchang@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "mffonseca@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "mperalta@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "rrhhcolombia@gomezleemarketing.com",
"displayName": "Edna Leon Aguillon",
"responseStatus": "accepted"
},
{
"email": "yestrada@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "malcala@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "wduran@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "mgomez@gomezleemarketing.com",
"displayName": "Maximo Gomez",
"responseStatus": "accepted"
},
{
"email": "admincr@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "jlgomez@gomezleemarketing.com",
"displayName": "José Leopoldo Gomez",
"responseStatus": "accepted"
},
{
"email": "cmogollon@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "naguirre@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "eurroz@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "jmendieta@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "mcgonzalez@gomezleemarketing.com",
"responseStatus": "accepted"
},
{
"email": "ktellez@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "nconcha@gomezleemarketing.com",
"responseStatus": "needsAction"
},
{
"email": "lmatos@gomezleemarketing.com",
"displayName": "Luis Matos",
"responseStatus": "needsAction"
},
{
"email": "ethen@gomezleemarketing.com",
"self": true,
"responseStatus": "needsAction"
}
],
"hangoutLink": "https://meet.google.com/aao-ixkr-uwu",
"conferenceData": {
"entryPoints": [
{
"entryPointType": "video",
"uri": "https://meet.google.com/aao-ixkr-uwu",
"label": "meet.google.com/aao-ixkr-uwu"
},
{
"entryPointType": "more",
"uri": "https://tel.meet/aao-ixkr-uwu?pin=8360818227823",
"pin": "8360818227823"
},
{
"regionCode": "CO",
"entryPointType": "phone",
"uri": "tel:+57-602-3896750",
"label": "+57 602 3896750",
"pin": "492538130"
}
],
"conferenceSolution": {
"key": {
"type": "hangoutsMeet"
},
"name": "Google Meet",
"iconUri": "https://fonts.gstatic.com/s/i/productlogos/meet_2020q4/v6/web-512dp/logo_meet_2020q4_color_2x_web_512dp.png"
},
"conferenceId": "aao-ixkr-uwu"
},
"reminders": {
"useDefault": true
},
"eventType": "default"
},
"pairedItem": {
"item": 0
}
}
]
},
"versionId": "ede88449-a4ac-42cc-9e91-484976e8392b",
"activeVersionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3",
"versionCounter": 2812,
"triggerCount": 12,
"shared": [
{
"updatedAt": "2026-06-08T13:50:12.177Z",
"createdAt": "2026-06-08T13:50:12.177Z",
"role": "workflow:owner",
"workflowId": "F1iPg8hktNAebZua",
"projectId": "0bH6HfYEL8n6SDmr",
"project": {
"updatedAt": "2026-04-22T14:25:04.701Z",
"createdAt": "2026-04-22T14:22:54.790Z",
"id": "0bH6HfYEL8n6SDmr",
"name": "Eidan Then <ethen@gomezleemarketing.com>",
"type": "personal",
"icon": null,
"description": null,
"creatorId": "de14e7e5-491b-4983-abb2-f88af42e92fd"
}
}
],
"tags": [],
"activeVersion": {
"updatedAt": "2026-06-25T14:40:53.000Z",
"createdAt": "2026-06-25T14:40:42.857Z",
"versionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3",
"workflowId": "F1iPg8hktNAebZua",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "glmway",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
-352,
-144
],
"id": "4cff954f-86fd-4835-8463-b083e3a66f35",
"name": "Webhook",
"webhookId": "2dea176c-88de-41b6-851d-c9f6a703ab69"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
3120,
768
],
"id": "a2082638-94e3-4a91-aeac-f7849833a6a1",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"method": "POST",
"url": "=https://git.digitalcompass.agency/api/v1/repos/{{ $('Valores').item.json.user }}/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"message\": \"{{ $json.message }}\",\n \"content\": \"{{ $json.content }}\",\n \"branch\": \"{{ $json.branch }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
4080,
880
],
"id": "e428eaaf-f678-45ac-bbcc-926f8bd574b7",
"name": "Subir archivo",
"retryOnFail": false,
"credentials": {
"httpHeaderAuth": {
"id": "R4tnNpYoEjhBYeUT",
"name": "Eidan - gitea"
}
}
},
{
"parameters": {
"url": "=https://git.digitalcompass.agency/api/v1/repos/{{ $json.user }}/{{ $json.repo_name }}/contents/{{ $json.file_name }}.json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": []
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
3472,
768
],
"id": "58d2c064-8982-42b0-8f1a-a10d018dff94",
"name": "Obtener archivo",
"credentials": {
"httpHeaderAuth": {
"id": "R4tnNpYoEjhBYeUT",
"name": "Eidan - gitea"
}
},
"onError": "continueErrorOutput"
},
{
"parameters": {
"method": "PUT",
"url": "=https://git.digitalcompass.agency/api/v1/repos/{{ $('Valores').item.json.user }}/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"message\": \"{{ $json.message }}\",\n \"content\": \"{{ $json.content }}\",\n \"sha\": \"{{ $json.sha }}\",\n \"branch\": \"{{ $json.branch }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
4080,
672
],
"id": "f804d797-946f-4673-8291-308d47ede436",
"name": "Actualizar archivo",
"credentials": {
"httpHeaderAuth": {
"id": "R4tnNpYoEjhBYeUT",
"name": "Eidan - gitea"
}
}
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "F1iPg8hktNAebZua",
"mode": "list",
"cachedResultName": "GLMWay (#F1iPg8hktNAebZua)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
3728,
672
],
"id": "a6420476-f217-4079-b7a0-194969a2dac2",
"name": "Get a workflow1",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "F1iPg8hktNAebZua",
"mode": "list",
"cachedResultName": "GLMWay (#F1iPg8hktNAebZua)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
3728,
880
],
"id": "f96e2477-f9db-4d36-a162-836d05dcd8ab",
"name": "Get a workflow2",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "31558805-f167-47c4-b0b4-46b8a80ca282",
"name": "user",
"value": "mgomez",
"type": "string"
},
{
"id": "3519ad4c-6d66-4963-ab76-ee5517d88d67",
"name": "repo_name",
"value": "calendario-glm-way",
"type": "string"
},
{
"id": "0df99f1e-1354-43b9-9d20-9f994cc82cf6",
"name": "file_name",
"value": "glmway-workflow",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
3296,
768
],
"id": "fa4f3a95-6fe7-41c4-9a90-f4a3f58e06a8",
"name": "Valores"
},
{
"parameters": {
"jsCode": "const sha = $('Obtener archivo').first().json.sha;\nconst data = { $json };\n\nreturn [{\n json: {\n message: \"Update \" + $('Valores').first().json.file_name + \".json\",\n content: Buffer.from(JSON.stringify(data, null, 2)).toString(\"base64\"),\n sha: sha,\n branch: \"main\"\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3904,
672
],
"id": "5d50d650-f0b6-4046-b9c1-974664b655f6",
"name": "Code in JavaScript2"
},
{
"parameters": {
"jsCode": "const sha = $json.sha; // viene del GET anterior\nconst data = { $json };\n\nconst base64 = Buffer.from(JSON.stringify(data, null, 2)).toString(\"base64\");\n\nreturn [{\n json: {\n message: \"Create \" + $('Valores').first().json.file_name + \".json\",\n content: base64,\n sha: sha,\n branch: \"main\"\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3904,
880
],
"id": "30ffb25f-3ad7-465d-9630-887828df95f6",
"name": "Code in JavaScript4"
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.supervisorEId }}?fields=displayName,workEmail,status,supervisorEmail,location,jobTitle,department,",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
2608,
-960
],
"id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be",
"name": "Informacion del supervisor",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI",
"mode": "list",
"cachedResultName": "GLM_GLMWay_Calendario de Entrenamientos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit#gid=0"
},
"filtersUI": {
"values": [
{
"lookupColumn": "col_1",
"lookupValue": "={{ $json.fecha_transformada }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2752,
1328
],
"id": "b7a1afb4-5e9c-4fc0-8a64-99b2b71c918e",
"name": "Get row(s) in sheet1",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "=https://api.bamboohr.com/api/gateway.php/glm/v1/reports/custom",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"title\": \"Employees\",\n \"fields\": [\n \"id\",\n \"firstName\",\n \"lastName\",\n \"hireDate\",\n \"department\",\n \"jobTitle\"\n ]\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
1280,
-1408
],
"id": "a52ef26c-a5d6-4bb5-9a99-61fa25206105",
"name": "Informacion del supervisor1",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/50743?fields=displayName,mobilePhone,workPhone,workEmail,status,employeeNumber,supervisor,supervisorEmail,location,jobTitle,department,hireDate,supervisorEId",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
1632,
-1344
],
"id": "0088cd80-6150-4577-89a9-b28b06fea6b4",
"name": "Informacion del empleado1",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"operation": "get",
"employeeId": "={{ $json.body.employees[0].id }}",
"options": {}
},
"type": "n8n-nodes-base.bambooHr",
"typeVersion": 1,
"position": [
-176,
-144
],
"id": "5b4b3106-f932-4430-a11e-ebcc1740f884",
"name": "Get an employee",
"credentials": {
"bambooHrApi": {
"id": "VwYITXROyinOC4je",
"name": "Eidan - BambooHR account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 3 }) }}",
"options": {
"query": "Entrenamiento"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2656,
-784
],
"id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2",
"name": "Get many events1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1872,
-688
],
"id": "2cd687f2-a8b5-4c46-854a-4f60b4d7107f",
"name": "Entrenamiento español",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1872,
-864
],
"id": "01099730-b224-4b81-98cc-b924e2b02367",
"name": "Entrenamiento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventStarted",
"options": {
"matchTerm": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-656,
1888
],
"id": "92aaf072-5cf8-4ffd-b641-20fa5fb88103",
"name": "Comenzo evento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventStarted",
"options": {
"matchTerm": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-656,
2064
],
"id": "34eb762f-b9c7-4a72-94ce-3ce246c7c790",
"name": "Comenzo evento español",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventEnded",
"options": {
"matchTerm": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-320,
2848
],
"id": "e0c4da60-bbbe-4cc1-b340-1749e204b6b2",
"name": "Termino evento español",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventEnded",
"options": {
"matchTerm": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-320,
2672
],
"id": "cd1a89d4-21e5-475e-93ed-4f00bbfd0190",
"name": "Termino evento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"jsCode": "for (const item of $input.all()) {\n // 1. Cambia 'fecha_original' por el nombre real de tu campo\n const fechaStr = item.json.hireDate; \n\n if (fechaStr) {\n // 2. Forzamos UTC para evitar problemas de zona horaria\n const fecha = new Date(fechaStr + 'T00:00:00Z');\n \n // 3. Extraemos el día número\n const dia = fecha.getUTCDate();\n \n // 4. Extraemos el nombre del mes en inglés\n const mes = fecha.toLocaleDateString('en-US', { month: 'long', timeZone: 'UTC' });\n \n // 5. Los unimos en el orden exacto que necesitas: \"15 June\"\n item.json.fecha_transformada = `${dia} ${mes}`;\n } else {\n item.json.fecha_transformada = null;\n }\n}\n\nreturn $input.all();"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2544,
1328
],
"id": "a088f9b0-7ec6-40d0-9a90-fa2047ab0461",
"name": "Cambiar formato de fecha"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI",
"mode": "list",
"cachedResultName": "GLM_GLMWay_Calendario de Entrenamientos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zQabzR4ZpQVqYvJ0Cv5QTQ2TZRl9TahBJGfyZB4CRmI/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit#gid=0"
},
"filtersUI": {
"values": [
{
"lookupColumn": "col_1",
"lookupValue": "2 July"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2368,
-1184
],
"id": "ed7dc4ef-e1fe-4305-ba7e-a98b617ee095",
"name": "Get row(s) in sheet2",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
1,
4
]
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
1440,
928
],
"id": "7f7d71b2-6c53-49a2-92d8-e66b2d0bff54",
"name": "Schedule Trigger"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 4 }) }}",
"options": {
"fields": "",
"query": "Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2464,
-832
],
"id": "77e81486-bffe-457d-8bc0-442c25ff4512",
"name": "Entrenamiento ingles1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.id }}?fields=supervisorEmail,hireDate,supervisorEId,jobTitle",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
0,
-144
],
"id": "ae2aff4d-5874-4181-9801-cf51d5cc4ff3",
"name": "Informacion extra del empleado",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ Object.keys($json).length }}",
"rightValue": 0,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
912,
-240
],
"id": "8a2be7cc-85ad-4e44-92a7-fe3f94df703f",
"name": "Hay coordinador?"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $('Get an employee').item.json.workEmail }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2432,
-1344
],
"id": "deb40073-dc0e-41e4-ad7c-6df18de25b4f",
"name": "Empleado le falta info?"
},
{
"parameters": {
"jsCode": "const today = new Date();\n\n// Formato YYYY-MM-DD\nconst formattedDate = today.toISOString().split('T')[0];\n\nreturn [\n {\n json: {\n date: formattedDate\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2240,
1312
],
"id": "0db9e6a4-2e5e-4513-97fd-71d22aa90822",
"name": "Fecha hoy"
},
{
"parameters": {
"content": "## Formato fecha\nyyyy-mm-dd\n",
"height": 192,
"width": 192
},
"type": "n8n-nodes-base.stickyNote",
"position": [
128,
-224
],
"typeVersion": 1,
"id": "8de8b400-70cb-4367-bddc-d42876f18d52",
"name": "Sticky Note"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $json.isValid }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
560,
-144
],
"id": "cb43a2bb-7743-4994-a7b2-209cd0934cd7",
"name": "Entra hoy?"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-352,
352
],
"id": "20e1c800-bf0b-4484-b836-14bc7154e4e7",
"name": "Schedule Trigger1"
},
{
"parameters": {
"tableId": "inscritos_glmway",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "empleado_id",
"fieldValue": "={{ $('Get an employee').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": "={{ null }}"
},
{
"fieldId": "estado",
"fieldValue": "inactivo"
},
{
"fieldId": "puesto",
"fieldValue": "={{ $('Get an employee').item.json.jobTitle }}"
},
{
"fieldId": "division",
"fieldValue": "={{ $('Get an employee').item.json.division }}"
},
{
"fieldId": "pais",
"fieldValue": "={{ $('Get an employee').item.json.location }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
752,
-32
],
"id": "0a800bb8-d5f1-443e-b3b1-3ca9546eb28f",
"name": "Insertar a inscritos (inactivo)",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"jsCode": "const hireDate = $json.hireDate;\n\n// Fecha de hoy en formato YYYY-MM-DD\nconst today = new Date().toISOString().split('T')[0];\n\n// True si hireDate es hoy o anterior\nconst isValid = hireDate <= today;\n\nreturn [\n {\n json: {\n hireDate,\n today,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
176,
-144
],
"id": "241cf92b-09b1-4555-af46-7b9ff49c5e37",
"name": "Calcular fecha hireDate"
},
{
"parameters": {
"content": "## Numero wsp Matos\n\n18494105855@s.whatsapp.net",
"height": 192,
"width": 192
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1264,
-16
],
"typeVersion": 1,
"id": "719365c8-8099-4108-a910-83b651d81181",
"name": "Sticky Note1"
},
{
"parameters": {
"method": "POST",
"url": "={{'https://wsp.gomezleemarketing.com'}}/message/sendText/{{'botsoporte'}}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{'C267126ABB45-4C12-B626-6BAB1833F5D7'}}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ \"18097159076@s.whatsapp.net\" }}"
},
{
"name": "mediatype",
"value": "=image"
},
{
"name": "text",
"value": "=⚠️ No hay coordinador RRHH en el país de este nuevo ingreso:\n\nNombre: {{ $('Get an employee').item.json.displayName }}\nCorreo: {{ $('Get an employee').item.json.workEmail }}\nPaís: {{ $('Get an employee').item.json.location }}\n\n#GLMWay"
},
{
"name": "delay",
"value": "={{5000}}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1152,
-144
],
"id": "09ce1f03-3dfb-4108-9d25-6c05ac622a6f",
"name": "Alerta no hay coordinador RRHH",
"disabled": true
},
{
"parameters": {
"operation": "get",
"employeeId": "={{ $json.empleado_id }}",
"options": {}
},
"type": "n8n-nodes-base.bambooHr",
"typeVersion": 1,
"position": [
192,
352
],
"id": "9e00d1ce-5533-4357-977e-31a8da97f232",
"name": "Get an employee1",
"credentials": {
"bambooHrApi": {
"id": "VwYITXROyinOC4je",
"name": "Eidan - BambooHR account"
}
}
},
{
"parameters": {
"url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.id }}?fields=supervisorEmail,hireDate,supervisorEId,jobTitle",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
368,
352
],
"id": "06c32cb0-a8ab-42c1-ae36-fe628b1b5e2b",
"name": "Informacion extra del empleado1",
"retryOnFail": true,
"waitBetweenTries": 2000,
"credentials": {
"httpBasicAuth": {
"id": "vXrW3oJWVhNbzB07",
"name": "GLM Credential"
}
}
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
-16,
352
],
"id": "36c1682f-35a1-4016-b2ac-77f7e20e3e59",
"name": "Loop Over Items"
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=Hola, GLMer!\n\nEn este entrenamiento queremos transmitirte nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\nTe esperamos puntual y con todas las ganas de aprender.\n\nNos vemos en el enlace!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2096,
-224
],
"id": "e6c3acf5-d54b-4e00-b7a9-74038d27e387",
"name": "Send a message espanol",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nIn this training we want to share our culture, our DNA, and why we are different from the rest.\n\nWe look forward to seeing you on time and eager to learn.\n\nSee you at the link!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2096,
-400
],
"id": "f173c8d1-9311-405c-a7ee-164726df32f1",
"name": "Send a message ingles",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"content": "## Recordatorio a nuevo ingreso 24 horas antes de la sesion\n",
"height": 464,
"width": 1728,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
736
],
"typeVersion": 1,
"id": "ba58d863-3211-4f53-b087-eb53ba839499",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "## Recordatorio a coordinador RRHH 48 y 24 horas antes de la sesion\n",
"height": 496,
"width": 1728,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
1280
],
"typeVersion": 1,
"id": "e32bdd94-d61e-4b43-bf60-7acab8c0d3ae",
"name": "Sticky Note3"
},
{
"parameters": {
"content": "## Envio de formulario de evaluacion despues que la sesion finalize",
"height": 544,
"width": 1392,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
2464
],
"typeVersion": 1,
"id": "6d5c0fe5-5ab1-4cdc-bfd2-197dc2144274",
"name": "Sticky Note4"
},
{
"parameters": {
"content": "## Notificacion inicial\n\nEnvia notificacion de sesion en el primer dia de trabajo del empleado",
"height": 608,
"width": 2672,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-480
],
"typeVersion": 1,
"id": "cd2fe5c5-9963-410b-a61a-edc36b5aaed1",
"name": "Sticky Note5"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1200,
-896
],
"id": "e0cc1e60-9379-45fb-b7f4-6def9c3e9601",
"name": "Entrenamiento ingles3",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"calendarId": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"triggerOn": "eventStarted",
"options": {}
},
"type": "n8n-nodes-base.googleCalendarTrigger",
"typeVersion": 1,
"position": [
-656,
2800
],
"id": "35ec709a-30fd-4e3b-8492-cf6d8928e372",
"name": "Prueba",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"content": "## Completar datos y enviar invitacion",
"height": 544,
"width": 3328,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
160
],
"typeVersion": 1,
"id": "126bdd3f-a050-4053-aff3-e625c8bf161c",
"name": "Sticky Note6"
},
{
"parameters": {
"jsCode": "const hireDate = $json.hireDate;\n\n// Fecha de hoy en formato YYYY-MM-DD\nconst today = new Date().toISOString().split('T')[0];\n\n// True si hireDate es hoy o anterior\nconst isValid = hireDate <= today;\n\nreturn [\n {\n json: {\n hireDate,\n today,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
560,
352
],
"id": "26d7adef-3c91-410e-b92f-69841d28c039",
"name": "Calcular fecha hireDate1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $json.isValid }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
944,
352
],
"id": "15a1892d-01e8-432c-91f1-db236317cbca",
"name": "Entra hoy?1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Get an employee1').item.json.location) }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1136,
352
],
"id": "ce9f31d4-454e-4e31-9a22-8173b3fae392",
"name": "Pais?1"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2240,
-672
],
"id": "00c87312-256a-4738-856d-e92b9e144c75",
"name": "Entrenamiento español1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2240,
-848
],
"id": "b3c26eeb-2ff9-42c9-b5cc-fe0776e53c46",
"name": "Entrenamiento ingles4",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ Object.keys($json).length }}",
"rightValue": 0,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2432,
352
],
"id": "30b3a4dd-6d50-405d-9c77-27febcc50aa4",
"name": "Hay coordinador?1"
},
{
"parameters": {
"method": "POST",
"url": "={{'https://wsp.gomezleemarketing.com'}}/message/sendText/{{'botsoporte'}}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{'C267126ABB45-4C12-B626-6BAB1833F5D7'}}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ \"18097159076@s.whatsapp.net\" }}"
},
{
"name": "mediatype",
"value": "=image"
},
{
"name": "text",
"value": "=⚠️ No hay coordinador RRHH en el país de este nuevo ingreso:\n\nNombre: {{ $('Get an employee1').item.json.displayName }}\nCorreo: {{ $('Get an employee1').item.json.workEmail }}\nPaís: {{ $('Get an employee1').item.json.location }}\n\n#GLMWay"
},
{
"name": "delay",
"value": "={{5000}}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
2608,
432
],
"id": "67928478-7604-45a4-9ab0-851079e1470c",
"name": "Alerta no hay coordinador RRHH1",
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=Hola, GLMer!\n\nEn este entrenamiento queremos transmitirte nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\nTe esperamos puntual y con todas las ganas de aprender.\n\nNos vemos en el enlace!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2080,
272
],
"id": "32302b24-aa4c-4f9a-afc8-ef7e86cad56b",
"name": "Send a message espanol1",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nIn this training we want to share our culture, our DNA, and why we are different from the rest.\n\nWe look forward to seeing you on time and eager to learn.\n\nSee you at the link!\n\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
2080,
448
],
"id": "db2cb6a3-1da8-472a-95eb-1a02de2a5fa4",
"name": "Send a message ingles1",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Jamaica",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "32931394-f4ea-4055-b866-906a81988173",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Trinidad and Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Barbados",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "28e49217-0c1a-4462-9642-676e54926d3e",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Saint Thomas",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "St. Croix",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "b308c2b6-53b4-4d49-b540-cdc03e36528b",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Guyana",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "35a50a33-a2b5-4116-9336-11300357569e",
"leftValue": "={{ $('Get an employee').item.json.location }}",
"rightValue": "Aruba",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1152,
-320
],
"id": "b183c892-8822-4bc3-a92c-4410eac41a01",
"name": "Pais?"
},
{
"parameters": {
"operation": "update",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"eventId": "3ul4moq4isoavr9jhqpcbs7juu_20260617T230000Z",
"updateFields": {
"attendeesUi": {
"values": {
"attendees": [
""
]
}
}
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1520,
-928
],
"id": "711b3353-6f75-4c6d-bef7-e704290787e8",
"name": "Invitar con calendarios entrenamiento ingles",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"content": "## Invitar al nuevo ingreso a travez del calendario usando el id del evento, asi le aparece el evento",
"height": 384
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
-1168
],
"typeVersion": 1,
"id": "304297ee-18fc-4cbd-8a01-b627ae08b991",
"name": "Sticky Note7"
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
2784,
352
],
"id": "98185de1-e81a-440f-8951-f98bd78c707b",
"name": "Wait",
"webhookId": "22a77d35-7adb-47ec-beca-0fae7615ab5b"
},
{
"parameters": {
"content": "## Enviar listado de inscritos al facilitador antes de iniciar el evento",
"height": 544,
"width": 1392,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
1824
],
"typeVersion": 1,
"id": "79ccf49e-4434-4b72-8147-ad27b9d994a2",
"name": "Sticky Note8"
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
800,
928
],
"id": "10b2cb4e-274d-4913-9345-2c024c071f4c",
"name": "Send a message espanol2",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
800,
752
],
"id": "1dc76989-8c58-4ffe-9e1c-5113a59d346c",
"name": "Send a message ingles2",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-352,
928
],
"id": "60708d5c-0cd7-45fc-bb67-ed050c1f8022",
"name": "Schedule Trigger2"
},
{
"parameters": {
"operation": "get",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "estado",
"keyValue": "inactivo"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
-176,
352
],
"id": "93a65a61-59a9-4903-8a35-dbf66a0ef468",
"name": "Obtener inactivos",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"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": "cargo",
"lookupValue": "Coordinador RRHH"
},
{
"lookupColumn": "country",
"lookupValue": "={{ $('Get an employee').item.json.location }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
752,
-240
],
"id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7",
"name": "Obtener coordinador",
"alwaysOutputData": true,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"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": [
2272,
352
],
"id": "3a6f198b-e136-49fb-a171-78164e10b600",
"name": "Obtener coordinador1",
"alwaysOutputData": true,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
0,
928
],
"id": "9e8fd238-541e-455b-8ae5-6a3097eb38a0",
"name": "Loop Over Items1"
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1200,
1072
],
"id": "ee5bb9bc-b8cb-493f-8463-ae0a24cf1f0d",
"name": "Wait1",
"webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ !['Jamaica', 'Trinidad and Tobago', 'Barbados', 'Saint Thomas', 'St. Croix', 'Tobago', 'Guyana', 'Aruba'].includes($('Obtener notificados').item.json.location) }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
608,
832
],
"id": "4d94c907-8ab1-4213-be20-9e24173cf0a3",
"name": "Pais?2"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1632,
1568
],
"id": "7dd9a706-4d80-45c6-942a-c703eb074a20",
"name": "Entrenamiento español2",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "#TheGLMWay Training"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1632,
1392
],
"id": "d8253a7a-4e37-4c14-b4da-e0029571cd21",
"name": "Entrenamiento ingles5",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"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": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1008,
-816
],
"id": "516244e1-3e39-4905-9160-86af296a0479",
"name": "Entrenamiento español3",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "1e6f83ce-19e7-4dd9-ba34-a11836a6181e",
"name": "idioma",
"value": "ES",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1376,
-400
],
"id": "e8a65f36-8e8e-4135-b7a2-a7ef4617de2f",
"name": "Crear variable idioma ES"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b0610214-1357-4e55-be5f-75c159d3b717",
"name": "idioma",
"value": "EN",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1376,
-224
],
"id": "971ae719-5692-4f87-9a57-2287ee44783d",
"name": "Crear variable idioma EN"
},
{
"parameters": {
"operation": "get",
"tableId": "sesiones_glmway",
"filters": {
"conditions": [
{
"keyName": "idioma",
"keyValue": "={{ $json.idioma }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1568,
-400
],
"id": "cb9e8a10-a1e7-40c7-8447-2379b0191a8f",
"name": "Obtener sesiones español",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "get",
"tableId": "sesiones_glmway",
"filters": {
"conditions": [
{
"keyName": "idioma",
"keyValue": "={{ $json.idioma }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1568,
-224
],
"id": "5ca790ee-4944-4868-98af-89837ac39422",
"name": "Obtener sesiones ingles",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1760,
-400
],
"id": "c2db5e62-7741-4ff2-ad31-71c108dd7386",
"name": "Calcular sesion mas cercana"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?').first().json.hireDate\n);\n\nconst sessions = $input.all();\n\nconst validSessions = sessions.filter(item => {\n const sessionDate = new Date(item.json.fecha_sesion);\n return sessionDate >= hireDate;\n});\n\nvalidSessions.sort((a, b) =>\n new Date(a.json.fecha_sesion) - new Date(b.json.fecha_sesion)\n);\n\nconst nearestSession = validSessions[0];\n\nreturn [\n {\n json: {\n hireDate: hireDate.toISOString().split('T')[0],\n foundSession: !!nearestSession,\n session: nearestSession?.json ?? null\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1760,
-224
],
"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": [
1360,
272
],
"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": [
1360,
448
],
"id": "9d53a7e1-6dab-494b-8064-6c3063f5596f",
"name": "Crear variable idioma EN1"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?1').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": [
1744,
272
],
"id": "ee31fd24-d703-44b3-b65b-75234564d29f",
"name": "Calcular sesion mas cercana2"
},
{
"parameters": {
"jsCode": "const hireDate = new Date(\n $('Entra hoy?1').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": [
1744,
448
],
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1920,
-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",
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1920,
-224
],
"id": "7530270a-b32e-419e-8fc5-b29fa07dda39",
"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": [
1552,
272
],
"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": [
1552,
448
],
"id": "2c35fe0e-1f32-4263-9c02-c392cb77e0e5",
"name": "Obtener sesiones ingles1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1136,
496
],
"id": "960e74ae-583b-4802-ab72-3b402c095d9b",
"name": "Wait2",
"webhookId": "1211d7da-55b9-4a73-837d-55934076a799"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $('Get an employee1').item.json.workEmail }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
752,
352
],
"id": "a2a81e91-f617-490a-b1ce-5737944fa23b",
"name": "Tiene correo?"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Get an employee1').item.json.id }}"
}
]
},
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
},
{
"fieldId": "pais",
"fieldValue": "={{ $('Get an employee1').item.json.location }}"
},
{
"fieldId": "division",
"fieldValue": "={{ $('Get an employee1').item.json.division }}"
},
{
"fieldId": "puesto",
"fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1904,
272
],
"id": "16d364da-e6fc-4943-bd64-f83ccab66b9f",
"name": "Actualizar datos del empleado y sesion asignada2",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "get",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "estado",
"keyValue": "notificado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
-176,
928
],
"id": "34aa0bc5-0feb-46e3-871b-27a1cc418675",
"name": "Obtener notificados",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $json.isValid }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
416,
928
],
"id": "107b41cb-06d5-4e7e-863b-dace19c8d1e9",
"name": "Falta 24h para el evento?"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Loop Over Items1').item.json.empleado_id }}"
}
]
},
"fieldsUi": {
"fieldValues": [
{
"fieldId": "estado",
"fieldValue": "recordado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1008,
848
],
"id": "ddf0a273-d3bc-44cc-888b-d789ce72ff77",
"name": "Actualizar estado a recordado",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
816,
1488
],
"id": "39331d88-6f2b-4df1-ac76-dda9ff47dfec",
"name": "Send a message espanol3",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
816,
1312
],
"id": "9d4f57a4-ac2f-49bd-b5fa-50658a8d928e",
"name": "Send a message ingles3",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-352,
1488
],
"id": "6951af7d-5098-4156-81bd-8f67034fcf70",
"name": "Schedule Trigger3"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
0,
1488
],
"id": "7545364a-df0a-4420-a1af-5bcd4f8c9602",
"name": "Loop Over Items2"
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1200,
1616
],
"id": "617ab85d-23a6-4546-9331-eff343d9b1c5",
"name": "Wait3",
"webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Jamaica",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "32931394-f4ea-4055-b866-906a81988173",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Trinidad and Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Barbados",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "28e49217-0c1a-4462-9642-676e54926d3e",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Saint Thomas",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "St. Croix",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Tobago",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "b308c2b6-53b4-4d49-b540-cdc03e36528b",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Guyana",
"operator": {
"type": "string",
"operation": "equals"
}
},
{
"id": "35a50a33-a2b5-4116-9336-11300357569e",
"leftValue": "={{ $('Obtener notificados1').item.json.pais }}",
"rightValue": "Aruba",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
624,
1392
],
"id": "13ee807a-f1cd-48ef-921b-7b5c260ba116",
"name": "Pais?3"
},
{
"parameters": {
"operation": "get",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "estado",
"keyValue": "notificado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
-176,
1488
],
"id": "0457dbf8-9c04-4f2d-9928-4f770eb51cc0",
"name": "Obtener notificados1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Loop Over Items2').item.json.empleado_id }}"
}
]
},
"fieldsUi": {
"fieldValues": [
{
"fieldId": "estado",
"fieldValue": "recordado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1024,
1408
],
"id": "0881ba84-bd04-4e91-9c09-0ba18e28ed28",
"name": "Actualizar estado a recordado1",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "9674fd7e-dd62-42d4-8931-6c67e59e3dd7",
"leftValue": "={{ $json.isValid }}",
"rightValue": "Jamaica",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
432,
1488
],
"id": "0fea4950-f873-4375-8964-45cfc3fead02",
"name": "Falta 48h para el evento?1"
},
{
"parameters": {
"jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\n\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días) o mañana (1 día)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 1;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
208,
928
],
"id": "bbd0558c-3b3a-462b-957c-83b1975e5413",
"name": "Calcular falta 24h o es el mismo dia"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Get an employee1').item.json.id }}"
}
]
},
"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": "notificado"
},
{
"fieldId": "sesion_id",
"fieldValue": "={{ $json.session.id }}"
},
{
"fieldId": "pais",
"fieldValue": "={{ $('Get an employee1').item.json.location }}"
},
{
"fieldId": "division",
"fieldValue": "={{ $('Get an employee1').item.json.division }}"
},
{
"fieldId": "puesto",
"fieldValue": "={{ $('Get an employee1').item.json.jobTitle }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1904,
448
],
"id": "f2aca2bd-e72d-4457-9a6b-c4b0f8bcc558",
"name": "Actualizar datos del empleado y sesion asignada3",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d7d68505-8c34-44cd-b771-56bef28ada41",
"leftValue": "={{ $('Get an employee').item.json.workEmail }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
336,
-144
],
"id": "a9fff247-d1b0-4314-ba8d-e7401086b771",
"name": "Tiene correo?1"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4",
"mode": "list",
"cachedResultName": "Empleados GLM Prueba",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DzUjeikfp8eSdFqEW0LEZZBkn13jI8Uhy15DjGZ2tK4/edit#gid=0"
},
"filtersUI": {
"values": [
{
"lookupColumn": "cargo",
"lookupValue": "Coordinador RRHH"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
3856,
432
],
"id": "ddfe7158-8cc6-440c-9e59-de97b7124eb8",
"name": "Obtener coordinador2",
"alwaysOutputData": true,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMax": "={{ $now.plus({ week: 2 }) }}",
"options": {
"query": "Entrenamiento #TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2464,
-656
],
"id": "98ab4271-94af-4a22-9882-b80f84be7c24",
"name": "Entrenamiento español4",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"parameters": {
"jsCode": "const monthNames = ['January','February','March','April','May','June','July',\n 'August','September','October','November','December'];\n\nreturn items.map(item => {\n const event = item.json;\n const startStr = event.start.dateTime || event.start.date;\n const datePart = startStr.split('T')[0]; // \"2026-06-21\"\n const [year, month, day] = datePart.split('-').map(Number);\n const formattedDate = `${day} ${monthNames[month - 1]}`;\n\n const summary = event.summary || '';\n const organizerName = event.organizer?.displayName \n || (event.organizer?.email ? event.organizer.email.split('@')[0] : '');\n\n let espanol = '';\n let english = '';\n\n if (summary.toLowerCase().includes('entrenamiento')) {\n espanol = organizerName;\n } else if (summary.toLowerCase().includes('training')) {\n english = organizerName;\n }\n\n return {\n json: {\n Fecha: formattedDate,\n Espanol: espanol,\n English: english\n }\n };\n});"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
4064,
480
],
"id": "41289b04-a9f4-4abc-8816-5afccd0e7996",
"name": "Code in JavaScript1"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 0 0 1 1 *"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
2368,
-352
],
"id": "ca136518-b776-45ba-b1a2-ad5327dd4cca",
"name": "Schedule Trigger4"
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg",
"mode": "list",
"cachedResultName": "Calendario GLMWay Prueba",
"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"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Fecha": "={{ $json.start }}"
},
"matchingColumns": [
"Fecha"
],
"schema": [
{
"id": "Fecha",
"displayName": "Fecha",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
3264,
-352
],
"id": "7c321f7d-bce9-447c-b94c-35f6967a48e3",
"name": "Insertar fechas",
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
3088,
-352
],
"id": "27531838-5dc7-4169-a08a-f4da93899580",
"name": "Wait4",
"webhookId": "85cfdcd9-384b-47e8-9d7d-4e079f0a4d97"
},
{
"parameters": {
"operation": "clear",
"documentId": {
"__rl": true,
"value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg",
"mode": "list",
"cachedResultName": "Calendario GLMWay Prueba",
"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"
},
"clear": "specificRange",
"range": "A2:A80"
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2912,
-352
],
"id": "bd8cb535-6aa3-46df-9ca0-6efc0555f2e4",
"name": "Borrar fechas",
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"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",
"height": 272,
"width": 1072
},
"type": "n8n-nodes-base.stickyNote",
"position": [
2336,
-480
],
"typeVersion": 1,
"id": "ddcb9db1-2590-4364-aeeb-db79c35ea604",
"name": "Sticky Note10"
},
{
"parameters": {
"operation": "get",
"employeeId": "=50764",
"options": {}
},
"type": "n8n-nodes-base.bambooHr",
"typeVersion": 1,
"position": [
432,
-864
],
"id": "4ac439e5-1b93-4355-a450-b019b63e9437",
"name": "Get an employee2",
"credentials": {
"bambooHrApi": {
"id": "VwYITXROyinOC4je",
"name": "Eidan - BambooHR account"
}
}
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "Entrenamiento #TheGLMWay",
"emailType": "text",
"message": "=¡Hola, GLMer!\n\nEste es un recordatorio de tu entrenamiento, donde te transmitiremos nuestra cultura, nuestro ADN y por qué somos diferentes al resto.\n\n¡Te esperamos puntual y con toda la energía para aprender!\n\nÚnete aquí:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
576,
2816
],
"id": "3c22bc65-799f-4432-86fe-10ae92e036de",
"name": "Send a message espanol4",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"sendTo": "eidan.then14@gmail.com",
"subject": "#TheGLMWay Training",
"emailType": "text",
"message": "=Hello, GLMer!\n\nThis is a reminder about your training session, where we'll share our culture, our DNA, and what makes us different from the rest.\n\nWe're looking forward to seeing you on time and ready to learn!\n\nJoin here:\n{{ $json.conferenceData.entryPoints[0].uri }}",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
576,
2640
],
"id": "4dfc0135-6886-4d33-9b2a-a26efbe72832",
"name": "Send a message ingles4",
"webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2",
"credentials": {
"gmailOAuth2": {
"id": "QWNicjw1khRm5BVI",
"name": "Eidan - Gmail account"
}
},
"disabled": true
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1264,
2272
],
"id": "f6ec4ef9-94a9-4dbb-8c44-0bbd1a6f0f87",
"name": "Wait5",
"webhookId": "09d53dc8-c92a-43d2-a47f-477c0d1317af"
},
{
"parameters": {
"operation": "update",
"tableId": "inscritos_glmway",
"filters": {
"conditions": [
{
"keyName": "empleado_id",
"condition": "eq",
"keyValue": "={{ $('Loop Over Items2').item.json.empleado_id }}"
}
]
},
"fieldsUi": {
"fieldValues": [
{
"fieldId": "estado",
"fieldValue": "recordado"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
832,
2736
],
"id": "b7c02e2f-1382-4086-9059-cf75fee9d278",
"name": "Actualizar estado a recordado2",
"credentials": {
"supabaseApi": {
"id": "2PlsR6rpK7rQTIEn",
"name": "Sofia test - Supabase account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/conferenceRecords/{{ $json.id }}/participants",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
448,
3088
],
"id": "ef89ad57-bdc8-4d9d-a250-41706ec900c1",
"name": "HTTP Request",
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=\nhttps://meet.googleapis.com/v2/conferenceRecords/{conferenceRecordId}/participants/{participantId}/participantSessions",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"id": "e76171d6-6fdd-405b-80d7-57c9cb8ee24e",
"name": "HTTP Request - Get Meet Artifacts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
272,
3248
],
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://www.googleapis.com/calendar/v3/calendars/primary/events/{{ $json.id }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
64,
3264
],
"id": "602289b9-3c7d-4ced-b507-b27401ed9910",
"name": "HTTP Request1"
},
{
"parameters": {
"url": "=https://www.googleapis.com/calendar/v3/calendars/primary/events/{{ $json.id }}",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"id": "c32466aa-a6d5-4d13-940f-553a6ab87107",
"name": "HTTP Request - Get Meet Artifacts1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
96,
2656
],
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/aao-ixkr-uwu/participants",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"options": {}
},
"id": "904cdfbe-b252-414b-9859-3f8e85e7e118",
"name": "HTTP Request - Get Meet Artifacts2",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
256,
2976
],
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/conferenceRecords",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "filter",
"value": "start_time>=\"2026-01-01T00:00:00Z\""
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
-144,
2848
],
"id": "955614d8-60a7-4762-8c02-86ac33e54cb3",
"name": "HTTP Request2",
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"url": "=https://meet.googleapis.com/v2/conferenceRecords/hFRcUdt3dvlZlJ6L1Wo6DxITOAIIigIgABgBCA/participants",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api",
"sendQuery": true,
"queryParameters": {
"parameters": []
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
64,
2848
],
"id": "a84173c0-db9f-4251-af6b-6e475541fc52",
"name": "HTTP Request3",
"credentials": {
"googleOAuth2Api": {
"id": "0HsSRUm82KPsWdiJ",
"name": "Eidan - Google account"
}
}
},
{
"parameters": {
"jsCode": "const fecha_sesion = $input.first().json.fecha_sesion_inscrito;\n\n// Fecha de hoy\nconst fecha_hoy = new Date().toISOString().split('T')[0];\nconst hoy = new Date(fecha_hoy);\nconst sesion = new Date(fecha_sesion);\n\n// Diferencia en días\nconst diferenciaDias = Math.floor(\n (sesion - hoy) / (1000 * 60 * 60 * 24)\n);\n\n// True si es hoy (0 días), mañana (1 día) o pasado mañana (2 días)\nconst isValid = diferenciaDias >= 0 && diferenciaDias <= 2;\n\nreturn [\n {\n json: {\n fecha_sesion,\n fecha_hoy,\n diferenciaDias,\n isValid\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
208,
1488
],
"id": "3e2b4cde-d7aa-4879-aa55-f1a169c16bd3",
"name": "Calcular falta 48h o 24h"
},
{
"parameters": {
"content": "## Aviso a instructor si no hay nadie inscrito a la sesion del dia\n",
"height": 464,
"width": 1552,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1392,
736
],
"typeVersion": 1,
"id": "de09868e-4a06-4c64-9e66-aae9e14b9896",
"name": "Sticky Note11"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMin": "={{ $now.startOf('year') }}",
"timeMax": "={{ $now.endOf('year') }}",
"options": {
"orderBy": "startTime",
"query": "#TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
2560,
-352
],
"id": "b2b03ce6-6010-4e4f-be7a-d9040286e295",
"name": "Obtener entrenamientos ingles y espanol",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"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": [
2736,
-352
],
"id": "73c39af9-bc01-4d97-81ee-846aff70b3a6",
"name": "Formatear fecha"
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 11
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
2384,
-32
],
"id": "55a755d8-8b74-440f-93c6-8a1ecba4c666",
"name": "Schedule Trigger5"
},
{
"parameters": {
"content": "## Añadir/actualizar coordinadores RRHH\n\nEste trigger se activa todos los años el 1 de enero",
"height": 272,
"width": 1072
},
"type": "n8n-nodes-base.stickyNote",
"position": [
2336,
-160
],
"typeVersion": 1,
"id": "3fd1379f-78d1-40a8-b24f-f8f086fda80a",
"name": "Sticky Note12"
},
{
"parameters": {
"operation": "getAll",
"calendar": {
"__rl": true,
"value": "ethen@gomezleemarketing.com",
"mode": "list",
"cachedResultName": "ethen@gomezleemarketing.com"
},
"returnAll": true,
"timeMin": "={{ $now.startOf('year') }}",
"timeMax": "={{ $now.endOf('year') }}",
"options": {
"orderBy": "startTime",
"query": "#TheGLMWay"
}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
3584,
-272
],
"id": "3c32f96e-cd34-4be4-8c24-b4be7a8f29d9",
"name": "Obtener entrenamientos ingles y espanol1",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "yEmGG4av5RxOK7wu",
"name": "Eidan - Google Calendar account"
}
}
},
{
"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": {
"documentId": {
"__rl": true,
"value": "1Xs-MkeXiZvWeJuwm-IblcI-ilr7lyhMtED0R7wczmRg",
"mode": "list",
"cachedResultName": "Calendario GLMWay Prueba",
"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"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2560,
-32
],
"id": "73089147-ba1f-4fb4-ac17-d5670b263fd8",
"name": "Obtener coordinadores",
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "8Pp0ek3NPsEkyXfY",
"name": "Eidan - Google Sheets account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://dbit.digitalcompass.agency/rest/v1/rpc/insertar_coordinadores_rrhh_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": [
2896,
-32
],
"id": "231f396b-855a-4c50-8d6d-096018e6d2ac",
"name": "Insertar/actualizar coordinadores a la bd"
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"destinationFieldName": "input",
"options": {}
},
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
2720,
-32
],
"id": "e51bd2d5-22b5-46cf-b346-c1ba16bb5c34",
"name": "Aggregate"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Get an employee",
"type": "main",
"index": 0
}
]
]
},
"When clicking Execute workflow": {
"main": [
[
{
"node": "Valores",
"type": "main",
"index": 0
}
]
]
},
"Obtener archivo": {
"main": [
[
{
"node": "Get a workflow1",
"type": "main",
"index": 0
}
],
[
{
"node": "Get a workflow2",
"type": "main",
"index": 0
}
]
]
},
"Get a workflow1": {
"main": [
[
{
"node": "Code in JavaScript2",
"type": "main",
"index": 0
}
]
]
},
"Get a workflow2": {
"main": [
[
{
"node": "Code in JavaScript4",
"type": "main",
"index": 0
}
]
]
},
"Valores": {
"main": [
[
{
"node": "Obtener archivo",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript2": {
"main": [
[
{
"node": "Actualizar archivo",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript4": {
"main": [
[
{
"node": "Subir archivo",
"type": "main",
"index": 0
}
]
]
},
"Get an employee": {
"main": [
[
{
"node": "Informacion extra del empleado",
"type": "main",
"index": 0
}
]
]
},
"Cambiar formato de fecha": {
"main": [
[
{
"node": "Get row(s) in sheet1",
"type": "main",
"index": 0
}
]
]
},
"Informacion del supervisor": {
"main": [
[]
]
},
"Informacion extra del empleado": {
"main": [
[
{
"node": "Calcular fecha hireDate",
"type": "main",
"index": 0
}
]
]
},
"Fecha hoy": {
"main": [
[]
]
},
"Entra hoy?": {
"main": [
[
{
"node": "Obtener coordinador",
"type": "main",
"index": 0
}
],
[
{
"node": "Insertar a inscritos (inactivo)",
"type": "main",
"index": 0
}
]
]
},
"Calcular fecha hireDate": {
"main": [
[
{
"node": "Tiene correo?1",
"type": "main",
"index": 0
}
]
]
},
"Hay coordinador?": {
"main": [
[
{
"node": "Pais?",
"type": "main",
"index": 0
}
],
[
{
"node": "Alerta no hay coordinador RRHH",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger1": {
"main": [
[
{
"node": "Obtener inactivos",
"type": "main",
"index": 0
}
]
]
},
"Get an employee1": {
"main": [
[
{
"node": "Informacion extra del empleado1",
"type": "main",
"index": 0
}
]
]
},
"Informacion extra del empleado1": {
"main": [
[
{
"node": "Calcular fecha hireDate1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Get an employee1",
"type": "main",
"index": 0
}
]
]
},
"Entrenamiento ingles": {
"main": [
[]
]
},
"Entrenamiento español": {
"main": [
[]
]
},
"Calcular fecha hireDate1": {
"main": [
[
{
"node": "Tiene correo?",
"type": "main",
"index": 0
}
]
]
},
"Entra hoy?1": {
"main": [
[
{
"node": "Pais?1",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
},
"Pais?1": {
"main": [
[
{
"node": "Crear variable idioma ES1",
"type": "main",
"index": 0
}
],
[
{
"node": "Crear variable idioma EN1",
"type": "main",
"index": 0
}
]
]
},
"Entrenamiento español1": {
"main": [
[]
]
},
"Entrenamiento ingles4": {
"main": [
[]
]
},
"Hay coordinador?1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
],
[
{
"node": "Alerta no hay coordinador RRHH1",
"type": "main",
"index": 0
}
]
]
},
"Pais?": {
"main": [
[
{
"node": "Crear variable idioma ES",
"type": "main",
"index": 0
}
],
[
{
"node": "Crear variable idioma EN",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles1": {
"main": [
[
{
"node": "Obtener coordinador1",
"type": "main",
"index": 0
}
]
]
},
"Send a message espanol1": {
"main": [
[
{
"node": "Obtener coordinador1",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger2": {
"main": [
[
{
"node": "Obtener notificados",
"type": "main",
"index": 0
}
]
]
},
"Obtener inactivos": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Obtener coordinador": {
"main": [
[
{
"node": "Hay coordinador?",
"type": "main",
"index": 0
}
]
]
},
"Obtener coordinador1": {
"main": [
[
{
"node": "Hay coordinador?1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[],
[
{
"node": "Calcular falta 24h o es el mismo dia",
"type": "main",
"index": 0
}
]
]
},
"Pais?2": {
"main": [
[
{
"node": "Send a message ingles2",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a message espanol2",
"type": "main",
"index": 0
}
]
]
},
"Entrenamiento ingles5": {
"main": [
[]
]
},
"Entrenamiento español2": {
"main": [
[]
]
},
"Send a message espanol2": {
"main": [
[
{
"node": "Actualizar estado a recordado",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles2": {
"main": [
[
{
"node": "Actualizar estado a recordado",
"type": "main",
"index": 0
}
]
]
},
"Crear variable idioma ES": {
"main": [
[
{
"node": "Obtener sesiones español",
"type": "main",
"index": 0
}
]
]
},
"Crear variable idioma EN": {
"main": [
[
{
"node": "Obtener sesiones ingles",
"type": "main",
"index": 0
}
]
]
},
"Obtener sesiones español": {
"main": [
[
{
"node": "Calcular sesion mas cercana",
"type": "main",
"index": 0
}
]
]
},
"Obtener sesiones ingles": {
"main": [
[
{
"node": "Calcular sesion mas cercana1",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana": {
"main": [
[
{
"node": "Guardar datos del empleado y sesion asignada",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana1": {
"main": [
[
{
"node": "Guardar datos del empleado y sesion asignada1",
"type": "main",
"index": 0
}
]
]
},
"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": "Actualizar datos del empleado y sesion asignada2",
"type": "main",
"index": 0
}
]
]
},
"Calcular sesion mas cercana3": {
"main": [
[
{
"node": "Actualizar 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": [
[
{
"node": "Send a message espanol",
"type": "main",
"index": 0
}
]
]
},
"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
}
]
]
},
"Alerta no hay coordinador RRHH1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait2": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Tiene correo?": {
"main": [
[
{
"node": "Entra hoy?1",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
},
"Actualizar datos del empleado y sesion asignada2": {
"main": [
[
{
"node": "Send a message espanol1",
"type": "main",
"index": 0
}
]
]
},
"Obtener notificados": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Falta 24h para el evento?": {
"main": [
[
{
"node": "Pais?2",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Actualizar estado a recordado": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Send a message espanol3": {
"main": [
[
{
"node": "Actualizar estado a recordado1",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles3": {
"main": [
[
{
"node": "Actualizar estado a recordado1",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger3": {
"main": [
[
{
"node": "Obtener notificados1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items2": {
"main": [
[],
[
{
"node": "Calcular falta 48h o 24h",
"type": "main",
"index": 0
}
]
]
},
"Wait3": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"Pais?3": {
"main": [
[
{
"node": "Send a message ingles3",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a message espanol3",
"type": "main",
"index": 0
}
]
]
},
"Obtener notificados1": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"Actualizar estado a recordado1": {
"main": [
[
{
"node": "Wait3",
"type": "main",
"index": 0
}
]
]
},
"Falta 48h para el evento?1": {
"main": [
[
{
"node": "Pais?3",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait3",
"type": "main",
"index": 0
}
]
]
},
"Calcular falta 24h o es el mismo dia": {
"main": [
[
{
"node": "Falta 24h para el evento?",
"type": "main",
"index": 0
}
]
]
},
"Actualizar datos del empleado y sesion asignada3": {
"main": [
[
{
"node": "Send a message ingles1",
"type": "main",
"index": 0
}
]
]
},
"Tiene correo?1": {
"main": [
[
{
"node": "Entra hoy?",
"type": "main",
"index": 0
}
],
[
{
"node": "Insertar a inscritos (inactivo)",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger4": {
"main": [
[
{
"node": "Obtener entrenamientos ingles y espanol",
"type": "main",
"index": 0
}
]
]
},
"Insertar fechas": {
"main": [
[]
]
},
"Wait4": {
"main": [
[
{
"node": "Insertar fechas",
"type": "main",
"index": 0
}
]
]
},
"Borrar fechas": {
"main": [
[
{
"node": "Wait4",
"type": "main",
"index": 0
}
]
]
},
"Send a message ingles4": {
"main": [
[
{
"node": "Actualizar estado a recordado2",
"type": "main",
"index": 0
}
]
]
},
"Send a message espanol4": {
"main": [
[
{
"node": "Actualizar estado a recordado2",
"type": "main",
"index": 0
}
]
]
},
"Termino evento español": {
"main": [
[
{
"node": "HTTP Request2",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request2": {
"main": [
[
{
"node": "HTTP Request3",
"type": "main",
"index": 0
}
]
]
},
"Calcular falta 48h o 24h": {
"main": [
[
{
"node": "Falta 48h para el evento?1",
"type": "main",
"index": 0
}
]
]
},
"Obtener entrenamientos ingles y espanol": {
"main": [
[
{
"node": "Formatear fecha",
"type": "main",
"index": 0
}
]
]
},
"Formatear fecha": {
"main": [
[
{
"node": "Borrar fechas",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger5": {
"main": [
[
{
"node": "Obtener coordinadores",
"type": "main",
"index": 0
}
]
]
},
"Obtener entrenamientos ingles y espanol1": {
"main": [
[
{
"node": "Formatear fecha1",
"type": "main",
"index": 0
}
]
]
},
"Formatear fecha1": {
"main": [
[]
]
},
"Obtener coordinadores": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Insertar/actualizar coordinadores a la bd",
"type": "main",
"index": 0
}
]
]
}
},
"authors": "Eidan Then",
"name": "Version 5e6c62fa",
"description": "",
"autosaved": true,
"workflowPublishHistory": [
{
"createdAt": "2026-06-25T14:40:53.321Z",
"id": 1883,
"workflowId": "F1iPg8hktNAebZua",
"versionId": "5e6c62fa-59d5-48af-9e01-8af436f62ce3",
"event": "activated",
"userId": "de14e7e5-491b-4983-abb2-f88af42e92fd"
}
]
}
}
}