{ "$json": { "updatedAt": "2026-06-09T13:57:21.006Z", "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": [ 0, 0 ], "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,status,employeeNumber,supervisor,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": [ 192, 0 ], "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" } ], "connections": { "Webhook": { "main": [ [ { "node": "Informacion del empleado", "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 } ] ] } }, "settings": { "executionOrder": "v1", "binaryMode": "separate" }, "staticData": null, "meta": null, "pinData": { "Webhook": [ { "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" }, "pairedItem": { "item": 0 } } ] }, "versionId": "59828cee-1aaa-4404-a707-7e1cdd27e145", "activeVersionId": "17ba7135-a76e-4cea-a8c9-23825a99d8cc", "versionCounter": 20, "triggerCount": 1, "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 ", "type": "personal", "icon": null, "description": null, "creatorId": "de14e7e5-491b-4983-abb2-f88af42e92fd" } } ], "tags": [], "activeVersion": { "updatedAt": "2026-06-08T18:26:55.000Z", "createdAt": "2026-06-08T14:06:38.604Z", "versionId": "17ba7135-a76e-4cea-a8c9-23825a99d8cc", "workflowId": "F1iPg8hktNAebZua", "nodes": [ { "parameters": { "httpMethod": "POST", "path": "glmway", "options": {} }, "type": "n8n-nodes-base.webhook", "typeVersion": 2.1, "position": [ 0, 0 ], "id": "4cff954f-86fd-4835-8463-b083e3a66f35", "name": "Webhook", "webhookId": "2dea176c-88de-41b6-851d-c9f6a703ab69" } ], "connections": {}, "authors": "Eidan Then", "name": "Version 17ba7135", "description": "", "autosaved": true, "workflowPublishHistory": [ { "createdAt": "2026-06-08T18:26:55.338Z", "id": 1204, "workflowId": "F1iPg8hktNAebZua", "versionId": "17ba7135-a76e-4cea-a8c9-23825a99d8cc", "event": "activated", "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" } ] } } }