Update hbd-panama-motorola.json

This commit is contained in:
2026-06-12 13:20:38 +00:00
parent 5ba10d0e79
commit 8966df1b0d
+182 -182
View File
@@ -1,6 +1,6 @@
{
"$json": {
"updatedAt": "2026-06-11T22:06:17.884Z",
"updatedAt": "2026-06-12T13:20:38.204Z",
"createdAt": "2026-04-23T15:09:38.785Z",
"id": "ZzH2eMPrsqlY7WPz",
"name": "hbdwsp",
@@ -717,20 +717,9 @@
"id": "33f79a5c-4266-42cc-904f-687c5879f79e",
"name": "Sticky Note5"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-1664,
944
],
"id": "ca97d042-ea23-4013-8acf-f0f6b66751e4",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"method": "POST",
"method": "PUT",
"url": "=https://git.digitalcompass.agency/api/v1/repos/EidanThen/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json",
"sendHeaders": true,
"headerParameters": {
@@ -743,80 +732,6 @@
},
"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": [
-704,
1056
],
"id": "200d651f-1752-4739-863d-415af6921cec",
"name": "Subir archivo",
"retryOnFail": false
},
{
"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": [
-880,
848
],
"id": "eef04499-7d3f-4e6b-afbb-372a3f36b009",
"name": "Code in JavaScript"
},
{
"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": [
-880,
1056
],
"id": "e194cb60-209b-41b5-ba08-5fbbf0d91eeb",
"name": "Code in JavaScript1"
},
{
"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": [
-1312,
944
],
"id": "05a92af4-c7a4-465e-8cfa-ef149864dbce",
"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/EidanThen/{{ $('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": {}
},
@@ -826,66 +741,8 @@
-704,
848
],
"id": "266adc8b-d8ed-41e2-a942-8db69b274230",
"name": "Actualizar archivo",
"credentials": {
"httpHeaderAuth": {
"id": "KMhOYCzV5kCW5ztz",
"name": "Header Auth account 3"
}
}
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "ZzH2eMPrsqlY7WPz",
"mode": "list",
"cachedResultName": "hbdwsp (#ZzH2eMPrsqlY7WPz)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
-1056,
848
],
"id": "585b45a1-b9f0-456f-8f9b-1d8261fc1576",
"name": "Get a workflow1",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "ZzH2eMPrsqlY7WPz",
"mode": "list",
"cachedResultName": "hbdwsp (#ZzH2eMPrsqlY7WPz)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
-1056,
1056
],
"id": "7df25b5e-ad70-4f75-8239-efb60eae12ed",
"name": "Get a workflow2",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
"id": "49c564e6-d517-4b04-bb0b-cdeefe5e3b6a",
"name": "Actualizar archivo1"
},
{
"parameters": {
@@ -916,10 +773,141 @@
"id": "1faee201-e948-45a9-a189-e7613bc5e343",
"name": "Valores"
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "ZzH2eMPrsqlY7WPz",
"mode": "list",
"cachedResultName": "hbdwsp (#ZzH2eMPrsqlY7WPz)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
-1056,
1056
],
"id": "7df25b5e-ad70-4f75-8239-efb60eae12ed",
"name": "Get a workflow2",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
},
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "ZzH2eMPrsqlY7WPz",
"mode": "list",
"cachedResultName": "hbdwsp (#ZzH2eMPrsqlY7WPz)"
},
"requestOptions": {}
},
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
-1056,
848
],
"id": "585b45a1-b9f0-456f-8f9b-1d8261fc1576",
"name": "Get a workflow1",
"credentials": {
"n8nApi": {
"id": "73Ydc9X8h5HXvFrt",
"name": "Eidan - n8n account"
}
}
},
{
"parameters": {
"method": "PUT",
"url": "=https://git.digitalcompass.agency/api/v1/repos/EidanThen/{{ $('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": [
-192,
960
],
"id": "266adc8b-d8ed-41e2-a942-8db69b274230",
"name": "Actualizar archivo",
"credentials": {
"httpHeaderAuth": {
"id": "KMhOYCzV5kCW5ztz",
"name": "Header Auth account 3"
}
}
},
{
"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": [
-1312,
944
],
"id": "05a92af4-c7a4-465e-8cfa-ef149864dbce",
"name": "Obtener archivo",
"credentials": {
"httpHeaderAuth": {
"id": "KMhOYCzV5kCW5ztz",
"name": "Header Auth account 3"
}
},
"onError": "continueErrorOutput"
},
{
"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": [
-880,
1056
],
"id": "e194cb60-209b-41b5-ba08-5fbbf0d91eeb",
"name": "Code in JavaScript1"
},
{
"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": [
-880,
848
],
"id": "eef04499-7d3f-4e6b-afbb-372a3f36b009",
"name": "Code in JavaScript"
},
{
"parameters": {
"method": "POST",
"url": "=https://git.digitalcompass.agency/api/v1/repos/EidanThen/{{ $('Valores').item.json.repo_name }}/contents/{{ $('Valores').item.json.file_name }}.json",
"sendHeaders": true,
"headerParameters": {
"parameters": [
@@ -931,17 +919,29 @@
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"message\": \"{{ $json.message }}\",\n \"content\": \"{{ $json.content }}\",\n \"sha\": \"{{ $json.sha }}\",\n \"branch\": \"{{ $json.branch }}\"\n}",
"jsonBody": "={\n \"message\": \"{{ $json.message }}\",\n \"content\": \"{{ $json.content }}\",\n \"branch\": \"{{ $json.branch }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
-416,
896
-704,
1056
],
"id": "49c564e6-d517-4b04-bb0b-cdeefe5e3b6a",
"name": "Actualizar archivo1"
"id": "200d651f-1752-4739-863d-415af6921cec",
"name": "Subir archivo",
"retryOnFail": false
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-1664,
944
],
"id": "ca97d042-ea23-4013-8acf-f0f6b66751e4",
"name": "When clicking Execute workflow"
}
],
"connections": {
@@ -1181,33 +1181,22 @@
]
]
},
"When clicking Execute workflow": {
"Valores": {
"main": [
[
{
"node": "Valores",
"node": "Obtener archivo",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"Get a workflow1": {
"main": [
[
{
"node": "Actualizar archivo",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript1": {
"main": [
[
{
"node": "Subir archivo",
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
@@ -1232,17 +1221,6 @@
]
]
},
"Get a workflow1": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Get a workflow2": {
"main": [
[
@@ -1254,11 +1232,33 @@
]
]
},
"Valores": {
"Code in JavaScript": {
"main": [
[
{
"node": "Obtener archivo",
"node": "Actualizar archivo1",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript1": {
"main": [
[
{
"node": "Subir archivo",
"type": "main",
"index": 0
}
]
]
},
"When clicking Execute workflow": {
"main": [
[
{
"node": "Valores",
"type": "main",
"index": 0
}
@@ -1305,9 +1305,9 @@
}
]
},
"versionId": "93864024-43e7-4529-b66d-fe8f29e8022c",
"versionId": "dea97a44-46ce-4042-b271-bfe8370e3bd2",
"activeVersionId": "84a9502b-ea68-43fb-9c4a-3e179091a42f",
"versionCounter": 232,
"versionCounter": 240,
"triggerCount": 1,
"shared": [
{