diff --git a/glmway-workflow.json b/glmway-workflow.json index b4e1d68..974af43 100644 --- a/glmway-workflow.json +++ b/glmway-workflow.json @@ -1,6 +1,6 @@ { "$json": { - "updatedAt": "2026-06-09T13:57:21.006Z", + "updatedAt": "2026-06-12T18:55:51.521Z", "createdAt": "2026-06-08T13:50:12.174Z", "id": "F1iPg8hktNAebZua", "name": "GLMWay", @@ -17,8 +17,8 @@ "type": "n8n-nodes-base.webhook", "typeVersion": 2.1, "position": [ - 0, - 0 + -352, + -144 ], "id": "4cff954f-86fd-4835-8463-b083e3a66f35", "name": "Webhook", @@ -26,7 +26,7 @@ }, { "parameters": { - "url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.body.employees[0].id }}?fields=displayName,mobilePhone,workPhone,status,employeeNumber,supervisor,supervisorEmail,location,jobTitle,department", + "url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.body.employees[0].id }}?fields=displayName,mobilePhone,workPhone,workEmail,status,employeeNumber,supervisor,supervisorEmail,location,jobTitle,department,hireDate,supervisorEId", "authentication": "genericCredentialType", "genericAuthType": "httpBasicAuth", "sendHeaders": true, @@ -43,8 +43,8 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.4, "position": [ - 192, - 0 + 400, + -432 ], "id": "89b4b09b-b56a-4b21-beab-f1eace2ebd7d", "name": "Informacion del empleado", @@ -63,7 +63,7 @@ "typeVersion": 1, "position": [ -656, - 544 + 928 ], "id": "a2082638-94e3-4a91-aeac-f7849833a6a1", "name": "When clicking ‘Execute workflow’" @@ -72,15 +72,8 @@ "parameters": { "method": "POST", "url": "=https://git.digitalcompass.agency/api/v1/repos/mgomez/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json", - "sendHeaders": true, - "headerParameters": { - "parameters": [ - { - "name": "Authorization", - "value": "token f68f177ebd3d5795ffc09c1cd880c4007b063fd8" - } - ] - }, + "authentication": "genericCredentialType", + "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={\n \"message\": \"{{ $json.message }}\",\n \"content\": \"{{ $json.content }}\",\n \"branch\": \"{{ $json.branch }}\"\n}", @@ -90,15 +83,21 @@ "typeVersion": 4.4, "position": [ 304, - 656 + 1040 ], "id": "e428eaaf-f678-45ac-bbcc-926f8bd574b7", "name": "Subir archivo", - "retryOnFail": false + "retryOnFail": false, + "credentials": { + "httpHeaderAuth": { + "id": "R4tnNpYoEjhBYeUT", + "name": "Eidan - gitea" + } + } }, { "parameters": { - "url": "=https://git.digitalcompass.agency/api/v1/repos/EidanThen/{{ $json.repo_name }}/contents/{{ $json.file_name }}.json", + "url": "=https://git.digitalcompass.agency/api/v1/repos/mgomez/{{ $json.repo_name }}/contents/{{ $json.file_name }}.json", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, @@ -111,14 +110,14 @@ "typeVersion": 4.4, "position": [ -304, - 544 + 928 ], "id": "58d2c064-8982-42b0-8f1a-a10d018dff94", "name": "Obtener archivo", "credentials": { "httpHeaderAuth": { - "id": "KMhOYCzV5kCW5ztz", - "name": "Header Auth account 3" + "id": "R4tnNpYoEjhBYeUT", + "name": "Eidan - gitea" } }, "onError": "continueErrorOutput" @@ -127,15 +126,8 @@ "parameters": { "method": "PUT", "url": "=https://git.digitalcompass.agency/api/v1/repos/mgomez/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json", - "sendHeaders": true, - "headerParameters": { - "parameters": [ - { - "name": "Authorization", - "value": "token f68f177ebd3d5795ffc09c1cd880c4007b063fd8" - } - ] - }, + "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}", @@ -145,10 +137,16 @@ "typeVersion": 4.4, "position": [ 304, - 448 + 832 ], "id": "f804d797-946f-4673-8291-308d47ede436", - "name": "Actualizar archivo" + "name": "Actualizar archivo", + "credentials": { + "httpHeaderAuth": { + "id": "R4tnNpYoEjhBYeUT", + "name": "Eidan - gitea" + } + } }, { "parameters": { @@ -165,7 +163,7 @@ "typeVersion": 1, "position": [ -48, - 448 + 832 ], "id": "a6420476-f217-4079-b7a0-194969a2dac2", "name": "Get a workflow1", @@ -191,7 +189,7 @@ "typeVersion": 1, "position": [ -48, - 656 + 1040 ], "id": "f96e2477-f9db-4d36-a162-836d05dcd8ab", "name": "Get a workflow2", @@ -226,7 +224,7 @@ "typeVersion": 3.4, "position": [ -480, - 544 + 928 ], "id": "fa4f3a95-6fe7-41c4-9a90-f4a3f58e06a8", "name": "Valores" @@ -239,7 +237,7 @@ "typeVersion": 2, "position": [ 128, - 448 + 832 ], "id": "5d50d650-f0b6-4046-b9c1-974664b655f6", "name": "Code in JavaScript2" @@ -252,10 +250,583 @@ "typeVersion": 2, "position": [ 128, - 656 + 1040 ], "id": "30ffb25f-3ad7-465d-9630-887828df95f6", "name": "Code in JavaScript4" + }, + { + "parameters": { + "url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.supervisorEId }}?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": [ + -416, + 128 + ], + "id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be", + "name": "Informacion del supervisor", + "retryOnFail": true, + "waitBetweenTries": 2000, + "credentials": { + "httpBasicAuth": { + "id": "vXrW3oJWVhNbzB07", + "name": "GLM Credential" + } + } + }, + { + "parameters": { + "operation": "getAll", + "returnAll": true + }, + "type": "n8n-nodes-base.bambooHr", + "typeVersion": 1, + "position": [ + 928, + 368 + ], + "id": "bb1e4101-a118-4423-a863-dc0ac1cdc372", + "name": "Get many employees", + "credentials": { + "bambooHrApi": { + "id": "VwYITXROyinOC4je", + "name": "Eidan - BambooHR account" + } + } + }, + { + "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" + }, + { + "lookupColumn": "country", + "lookupValue": "={{ $json.location }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 928, + -224 + ], + "id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7", + "name": "Get row(s) in sheet", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "8Pp0ek3NPsEkyXfY", + "name": "Eidan - Google Sheets account" + } + } + }, + { + "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": [ + { + "lookupValue": "Coordinador RRHH" + }, + { + "lookupValue": "={{ $json.location }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 544, + 224 + ], + "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": [ + -480, + 304 + ], + "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": [ + -144, + 224 + ], + "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": { + "url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.id }}?fields=supervisorEmail,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": [ + 0, + -144 + ], + "id": "ae2aff4d-5874-4181-9801-cf51d5cc4ff3", + "name": "Informacion del empleado2", + "retryOnFail": true, + "waitBetweenTries": 2000, + "credentials": { + "httpBasicAuth": { + "id": "vXrW3oJWVhNbzB07", + "name": "GLM Credential" + } + } + }, + { + "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": [ + 848, + 192 + ], + "id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2", + "name": "Get many events1", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + } + }, + { + "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": "notEquals" + } + }, + { + "id": "32931394-f4ea-4055-b866-906a81988173", + "leftValue": "={{ $('Get an employee').item.json.location }}", + "rightValue": "Trinidad and Tobago", + "operator": { + "type": "string", + "operation": "notEquals" + } + }, + { + "id": "ea2a8466-96c6-460f-b08f-d23c06b2d18c", + "leftValue": "={{ $('Get an employee').item.json.location }}", + "rightValue": "Barbados", + "operator": { + "type": "string", + "operation": "notEquals" + } + }, + { + "id": "28e49217-0c1a-4462-9642-676e54926d3e", + "leftValue": "={{ $('Get an employee').item.json.location }}", + "rightValue": "Saint Thomas", + "operator": { + "type": "string", + "operation": "notEquals" + } + }, + { + "id": "634f5b1c-fd01-4d42-9a63-4351852f5210", + "leftValue": "={{ $('Get an employee').item.json.location }}", + "rightValue": "Trinidad & Tobago", + "operator": { + "type": "string", + "operation": "notEquals" + } + }, + { + "id": "c6a6aea5-48f4-44dc-92ca-a9f9de9cacf9", + "leftValue": "={{ $('Get an employee').item.json.location }}", + "rightValue": "St. Croix", + "operator": { + "type": "string", + "operation": "notEquals" + } + }, + { + "id": "e6f52339-ea7c-462f-bdc2-8b7353160e4c", + "leftValue": "={{ $('Get an employee').item.json.location }}", + "rightValue": "Tobago", + "operator": { + "type": "string", + "operation": "notEquals" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 176, + -144 + ], + "id": "b7950711-8695-4232-88ab-6b013a0c29d1", + "name": "Pais?" + }, + { + "parameters": { + "resource": "calendar", + "calendar": { + "__rl": true, + "value": "ethen@gomezleemarketing.com", + "mode": "list", + "cachedResultName": "ethen@gomezleemarketing.com" + }, + "options": {} + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 400, + -224 + ], + "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: 4 }) }}", + "options": { + "query": "Training" + } + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 400, + -48 + ], + "id": "01099730-b224-4b81-98cc-b924e2b02367", + "name": "Entrenamiento ingles", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + } + }, + { + "parameters": { + "sendTo": "eidan.then14@gmail.com", + "options": {} + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.2, + "position": [ + 640, + -224 + ], + "id": "e6c3acf5-d54b-4e00-b7a9-74038d27e387", + "name": "Send a message", + "webhookId": "a6043707-89d1-4c99-8de2-e60d9aaf7ed2", + "credentials": { + "gmailOAuth2": { + "id": "QWNicjw1khRm5BVI", + "name": "Eidan - Gmail account" + } + }, + "disabled": true + }, + { + "parameters": { + "pollTimes": { + "item": [] + }, + "maxResults": 1, + "filters": { + "sender": "notifications@app.bamboohr.com" + } + }, + "type": "n8n-nodes-base.gmailTrigger", + "typeVersion": 1.4, + "position": [ + 272, + 112 + ], + "id": "4f97bda3-cbd1-4fa7-8be7-83bcda000f74", + "name": "Gmail Trigger", + "credentials": { + "gmailOAuth2": { + "id": "QWNicjw1khRm5BVI", + "name": "Eidan - Gmail account" + } + } + }, + { + "parameters": { + "fieldsUi": { + "fieldValues": [] + } + }, + "type": "n8n-nodes-base.supabase", + "typeVersion": 1, + "position": [ + 1088, + -432 + ], + "id": "dcdef9fc-9c61-45dd-9604-56037eac4c31", + "name": "Create a row", + "credentials": { + "supabaseApi": { + "id": "2PlsR6rpK7rQTIEn", + "name": "Sofia test - Supabase account" + } + }, + "disabled": true + }, + { + "parameters": { + "pollTimes": { + "item": [ + { + "mode": "everyMinute" + } + ] + }, + "calendarId": { + "__rl": true, + "mode": "list", + "value": "" + }, + "triggerOn": "eventStarted", + "options": {} + }, + "type": "n8n-nodes-base.googleCalendarTrigger", + "typeVersion": 1, + "position": [ + -352, + -464 + ], + "id": "92aaf072-5cf8-4ffd-b641-20fa5fb88103", + "name": "Google Calendar Trigger", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + }, + "disabled": true + }, + { + "parameters": { + "pollTimes": { + "item": [ + { + "mode": "everyMinute" + } + ] + }, + "calendarId": { + "__rl": true, + "mode": "list", + "value": "" + }, + "triggerOn": "eventEnded", + "options": {} + }, + "type": "n8n-nodes-base.googleCalendarTrigger", + "typeVersion": 1, + "position": [ + -352, + -304 + ], + "id": "e0c4da60-bbbe-4cc1-b340-1749e204b6b2", + "name": "Google Calendar Trigger1", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + }, + "disabled": true } ], "connections": { @@ -263,7 +834,7 @@ "main": [ [ { - "node": "Informacion del empleado", + "node": "Get an employee", "type": "main", "index": 0 } @@ -353,6 +924,39 @@ } ] ] + }, + "Informacion del empleado": { + "main": [ + [] + ] + }, + "Get an employee": { + "main": [ + [ + { + "node": "Informacion del empleado2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Informacion del empleado2": { + "main": [ + [ + { + "node": "Pais?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Pais?": { + "main": [ + [], + [] + ] } }, "settings": { @@ -360,48 +964,49 @@ "binaryMode": "separate" }, "staticData": null, - "meta": null, + "meta": { + "templateCredsSetupCompleted": true + }, "pinData": { - "Webhook": [ + "Informacion del empleado": [ { "json": { - "headers": { - "host": "agenteit.digitalcompass.agency", - "user-agent": "BambooHR-WebHooks/1.0 (+https://www.bamboohr.com)", - "content-length": "120", - "accept": "*/*", - "content-type": "application/json", - "traceparent": "00-6a280cf7000000006690d4bafe8231fc-df93b9ea18cbe5cb-01", - "tracestate": "dd=t.dm:-0", - "x-bamboohr-signature": "1bd6b6b90c34e262c390aca8387bce2e135aa317d5a556899ee800541499637d", - "x-bamboohr-timestamp": "1781009655", - "x-datadog-parent-id": "16110424707123897803", - "x-datadog-sampling-priority": "1", - "x-datadog-tags": "_dd.p.tid=6a280cf700000000,_dd.p.dm=-0", - "x-datadog-trace-id": "7390640888113934844", - "x-forwarded-for": "3.148.107.221", - "x-forwarded-host": "agenteit.digitalcompass.agency", - "x-forwarded-port": "443", - "x-forwarded-proto": "https", - "x-forwarded-server": "07b4f09d2c65", - "x-real-ip": "3.148.107.221", - "accept-encoding": "gzip" - }, - "params": {}, - "query": {}, - "body": { - "employees": [ - { - "changedFields": [], - "fields": {}, - "id": "50732", - "action": "Created", - "timestamp": "2026-06-09T06:54:14-06:00" - } - ] - }, - "webhookUrl": "https://agenteit.digitalcompass.agency/webhook/glmway", - "executionMode": "production" + "id": "50748", + "displayName": "Sara Gabriela Gil Cifuentes", + "mobilePhone": null, + "workPhone": null, + "workEmail": null, + "status": "Active", + "employeeNumber": "1072642085", + "supervisor": "Salamanca Cruz, Carlos", + "supervisorEmail": "csalamanca@gomezleemarketing.com", + "location": "Colombia", + "jobTitle": "Gestor de Experiencia", + "department": "Field Force", + "hireDate": "2026-06-12", + "supervisorEId": "48338" + }, + "pairedItem": { + "item": 0 + } + } + ], + "Get row(s) in sheet": [ + { + "json": { + "row_number": 724, + "id": 46822, + "name": "Liane Meliza Gomez Leon", + "workEmail": "rrhhcolombia@gomezleemarketing.com", + "mobilePhone": 3057218123, + "workPhone": "", + "status": "Active", + "cedula": 1015429431, + "supervisor": "Maximo Gomez Lee", + "supervisorEmail": "mgomez@gomezleemarketing.com", + "country": "Colombia", + "cargo": "Coordinador RRHH", + "departamento": "Recursos Humanos" }, "pairedItem": { "item": 0 @@ -409,9 +1014,9 @@ } ] }, - "versionId": "59828cee-1aaa-4404-a707-7e1cdd27e145", - "activeVersionId": "17ba7135-a76e-4cea-a8c9-23825a99d8cc", - "versionCounter": 20, + "versionId": "2a5d75bc-a663-4d29-b6cb-837650965712", + "activeVersionId": "ae5f0096-4d77-451f-bd7c-f8fdf88e0a45", + "versionCounter": 214, "triggerCount": 1, "shared": [ { @@ -434,9 +1039,9 @@ ], "tags": [], "activeVersion": { - "updatedAt": "2026-06-08T18:26:55.000Z", - "createdAt": "2026-06-08T14:06:38.604Z", - "versionId": "17ba7135-a76e-4cea-a8c9-23825a99d8cc", + "updatedAt": "2026-06-12T15:55:04.000Z", + "createdAt": "2026-06-12T15:11:38.980Z", + "versionId": "ae5f0096-4d77-451f-bd7c-f8fdf88e0a45", "workflowId": "F1iPg8hktNAebZua", "nodes": [ { @@ -454,19 +1059,716 @@ "id": "4cff954f-86fd-4835-8463-b083e3a66f35", "name": "Webhook", "webhookId": "2dea176c-88de-41b6-851d-c9f6a703ab69" + }, + { + "parameters": { + "url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.body.employees[0].id }}?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": [ + 432, + -192 + ], + "id": "89b4b09b-b56a-4b21-beab-f1eace2ebd7d", + "name": "Informacion del empleado", + "retryOnFail": true, + "waitBetweenTries": 2000, + "credentials": { + "httpBasicAuth": { + "id": "vXrW3oJWVhNbzB07", + "name": "GLM Credential" + } + } + }, + { + "parameters": {}, + "type": "n8n-nodes-base.manualTrigger", + "typeVersion": 1, + "position": [ + -656, + 544 + ], + "id": "a2082638-94e3-4a91-aeac-f7849833a6a1", + "name": "When clicking ‘Execute workflow’" + }, + { + "parameters": { + "method": "POST", + "url": "=https://git.digitalcompass.agency/api/v1/repos/mgomez/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json", + "sendHeaders": true, + "headerParameters": { + "parameters": [ + { + "name": "Authorization", + "value": "token f68f177ebd3d5795ffc09c1cd880c4007b063fd8" + } + ] + }, + "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": [ + 304, + 656 + ], + "id": "e428eaaf-f678-45ac-bbcc-926f8bd574b7", + "name": "Subir archivo", + "retryOnFail": false + }, + { + "parameters": { + "url": "=https://git.digitalcompass.agency/api/v1/repos/EidanThen/{{ $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": [ + -304, + 544 + ], + "id": "58d2c064-8982-42b0-8f1a-a10d018dff94", + "name": "Obtener archivo", + "credentials": { + "httpHeaderAuth": { + "id": "KMhOYCzV5kCW5ztz", + "name": "Header Auth account 3" + } + }, + "onError": "continueErrorOutput" + }, + { + "parameters": { + "method": "PUT", + "url": "=https://git.digitalcompass.agency/api/v1/repos/mgomez/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json", + "sendHeaders": true, + "headerParameters": { + "parameters": [ + { + "name": "Authorization", + "value": "token f68f177ebd3d5795ffc09c1cd880c4007b063fd8" + } + ] + }, + "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": [ + 304, + 448 + ], + "id": "f804d797-946f-4673-8291-308d47ede436", + "name": "Actualizar archivo" + }, + { + "parameters": { + "operation": "get", + "workflowId": { + "__rl": true, + "value": "F1iPg8hktNAebZua", + "mode": "list", + "cachedResultName": "GLMWay (#F1iPg8hktNAebZua)" + }, + "requestOptions": {} + }, + "type": "n8n-nodes-base.n8n", + "typeVersion": 1, + "position": [ + -48, + 448 + ], + "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": [ + -48, + 656 + ], + "id": "f96e2477-f9db-4d36-a162-836d05dcd8ab", + "name": "Get a workflow2", + "credentials": { + "n8nApi": { + "id": "73Ydc9X8h5HXvFrt", + "name": "Eidan - n8n account" + } + } + }, + { + "parameters": { + "assignments": { + "assignments": [ + { + "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": [ + -480, + 544 + ], + "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": [ + 128, + 448 + ], + "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": [ + 128, + 656 + ], + "id": "30ffb25f-3ad7-465d-9630-887828df95f6", + "name": "Code in JavaScript4" + }, + { + "parameters": { + "url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.supervisorEId }}?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": [ + -336, + 64 + ], + "id": "a34b5746-bdbc-4016-bffc-f953b5c0e7be", + "name": "Informacion del supervisor", + "retryOnFail": true, + "waitBetweenTries": 2000, + "credentials": { + "httpBasicAuth": { + "id": "vXrW3oJWVhNbzB07", + "name": "GLM Credential" + } + } + }, + { + "parameters": { + "operation": "getAll", + "returnAll": true + }, + "type": "n8n-nodes-base.bambooHr", + "typeVersion": 1, + "position": [ + 928, + 368 + ], + "id": "bb1e4101-a118-4423-a863-dc0ac1cdc372", + "name": "Get many employees", + "credentials": { + "bambooHrApi": { + "id": "VwYITXROyinOC4je", + "name": "Eidan - BambooHR account" + } + } + }, + { + "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" + }, + { + "lookupColumn": "country", + "lookupValue": "={{ $json.location }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 608, + 0 + ], + "id": "d565bfde-93eb-4b39-afc8-4b294c7e9df7", + "name": "Get row(s) in sheet", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "8Pp0ek3NPsEkyXfY", + "name": "Eidan - Google Sheets account" + } + } + }, + { + "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": [ + { + "lookupValue": "Coordinador RRHH" + }, + { + "lookupValue": "={{ $json.location }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 544, + 224 + ], + "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": [ + -480, + 304 + ], + "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": [ + -144, + 224 + ], + "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, + 0 + ], + "id": "5b4b3106-f932-4430-a11e-ebcc1740f884", + "name": "Get an employee", + "credentials": { + "bambooHrApi": { + "id": "VwYITXROyinOC4je", + "name": "Eidan - BambooHR account" + } + } + }, + { + "parameters": { + "url": "=https://glm.bamboohr.com/api/v1/employees/{{ $json.id }}?fields=supervisorEmail,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": [ + 352, + 0 + ], + "id": "ae2aff4d-5874-4181-9801-cf51d5cc4ff3", + "name": "Informacion del empleado2", + "retryOnFail": true, + "waitBetweenTries": 2000, + "credentials": { + "httpBasicAuth": { + "id": "vXrW3oJWVhNbzB07", + "name": "GLM Credential" + } + } + }, + { + "parameters": { + "resource": "calendar", + "calendar": { + "__rl": true, + "value": "ethen@gomezleemarketing.com", + "mode": "list", + "cachedResultName": "ethen@gomezleemarketing.com" + }, + "options": {} + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 704, + -272 + ], + "id": "2cd687f2-a8b5-4c46-854a-4f60b4d7107f", + "name": "Get availability in a calendar", + "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, + "options": { + "iCalUID": "", + "query": "Entrenamiento" + } + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 848, + -32 + ], + "id": "01099730-b224-4b81-98cc-b924e2b02367", + "name": "Get many events", + "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: 3 }) }}", + "options": { + "iCalUID": "", + "query": "Entrenamiento" + } + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 848, + 192 + ], + "id": "901ca3ad-1e76-41fe-a1ff-a55b0f5c1ea2", + "name": "Get many events1", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "yEmGG4av5RxOK7wu", + "name": "Eidan - Google Calendar account" + } + } } ], - "connections": {}, + "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 + } + ] + ] + }, + "Informacion del empleado": { + "main": [ + [] + ] + }, + "Get an employee": { + "main": [ + [ + { + "node": "Informacion del empleado2", + "type": "main", + "index": 0 + } + ] + ] + } + }, "authors": "Eidan Then", - "name": "Version 17ba7135", + "name": "Version ae5f0096", "description": "", - "autosaved": true, + "autosaved": false, "workflowPublishHistory": [ { - "createdAt": "2026-06-08T18:26:55.338Z", - "id": 1204, + "createdAt": "2026-06-12T15:55:04.894Z", + "id": 1358, "workflowId": "F1iPg8hktNAebZua", - "versionId": "17ba7135-a76e-4cea-a8c9-23825a99d8cc", + "versionId": "ae5f0096-4d77-451f-bd7c-f8fdf88e0a45", "event": "activated", "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" }