Update archivo.json
This commit is contained in:
+382
@@ -0,0 +1,382 @@
|
||||
{
|
||||
"$json": {
|
||||
"updatedAt": "2026-06-03T21:23:43.015Z",
|
||||
"createdAt": "2026-06-03T20:22:29.809Z",
|
||||
"id": "nvV9JrJGy1AEZdYI",
|
||||
"name": "Gitea n8n test",
|
||||
"description": null,
|
||||
"active": false,
|
||||
"isArchived": false,
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "get",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"value": "nvV9JrJGy1AEZdYI",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Gitea n8n test (#nvV9JrJGy1AEZdYI)"
|
||||
},
|
||||
"requestOptions": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.n8n",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-256,
|
||||
-144
|
||||
],
|
||||
"id": "af9f2e9f-a19f-41d9-9871-c491419e4548",
|
||||
"name": "Get a workflow",
|
||||
"credentials": {
|
||||
"n8nApi": {
|
||||
"id": "73Ydc9X8h5HXvFrt",
|
||||
"name": "Eidan - n8n account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3519ad4c-6d66-4963-ab76-ee5517d88d67",
|
||||
"name": "repo_name",
|
||||
"value": "n8n-prueba",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [
|
||||
-160,
|
||||
32
|
||||
],
|
||||
"id": "b6317eb2-986d-4973-b108-4d626bfc2c74",
|
||||
"name": "Edit Fields1"
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-320,
|
||||
32
|
||||
],
|
||||
"id": "198926a6-c823-456d-be1e-35b7c31b3152",
|
||||
"name": "When clicking ‘Execute workflow’"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://git.digitalcompass.agency/api/v1/users/EidanThen/repos",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "token f68f177ebd3d5795ffc09c1cd880c4007b063fd8"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.4,
|
||||
"position": [
|
||||
288,
|
||||
-224
|
||||
],
|
||||
"id": "6bc3109a-056a-4b43-8c00-953009ca90c3",
|
||||
"name": "Obtener repos"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://git.digitalcompass.agency/api/v1/repos/EidanThen/n8n-prueba/contents/archivo.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": [
|
||||
848,
|
||||
160
|
||||
],
|
||||
"id": "095684ea-b184-4f2c-8f4d-c879c9879dbd",
|
||||
"name": "Subir archivo",
|
||||
"retryOnFail": false
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "const sha = $('Obtener archivo').first().json.sha;\nconst data = { $json };\n\nreturn [{\n json: {\n message: \"Update archivo.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": [
|
||||
672,
|
||||
-48
|
||||
],
|
||||
"id": "70718bd0-b69a-4e24-8b99-9b8befdc7a7a",
|
||||
"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: \"Update archivo.json\",\n content: base64,\n sha: sha,\n branch: \"main\"\n }\n}];"
|
||||
},
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
672,
|
||||
160
|
||||
],
|
||||
"id": "dae8528c-ea17-4f09-8612-92c67879003c",
|
||||
"name": "Code in JavaScript1"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://git.digitalcompass.agency/api/v1/repos/EidanThen/n8n-prueba/contents/archivo.json",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "token f68f177ebd3d5795ffc09c1cd880c4007b063fd8"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.4,
|
||||
"position": [
|
||||
96,
|
||||
32
|
||||
],
|
||||
"id": "78024966-85c5-417d-939f-9d5df7e4d050",
|
||||
"name": "Obtener archivo",
|
||||
"onError": "continueErrorOutput"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "PUT",
|
||||
"url": "https://git.digitalcompass.agency/api/v1/repos/EidanThen/n8n-prueba/contents/archivo.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": [
|
||||
848,
|
||||
-48
|
||||
],
|
||||
"id": "27c22629-bdc8-4de5-a2b7-6b155b8f44dc",
|
||||
"name": "Actualizar archivo"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "get",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"value": "nvV9JrJGy1AEZdYI",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Gitea n8n test (#nvV9JrJGy1AEZdYI)"
|
||||
},
|
||||
"requestOptions": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.n8n",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
496,
|
||||
-48
|
||||
],
|
||||
"id": "7c151d40-68d4-4021-910e-f7047f20725a",
|
||||
"name": "Get a workflow1",
|
||||
"credentials": {
|
||||
"n8nApi": {
|
||||
"id": "73Ydc9X8h5HXvFrt",
|
||||
"name": "Eidan - n8n account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "get",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"value": "nvV9JrJGy1AEZdYI",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Gitea n8n test (#nvV9JrJGy1AEZdYI)"
|
||||
},
|
||||
"requestOptions": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.n8n",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
496,
|
||||
160
|
||||
],
|
||||
"id": "3b5ccdea-7d04-41a0-83bb-0d4907b11cc3",
|
||||
"name": "Get a workflow2",
|
||||
"credentials": {
|
||||
"n8nApi": {
|
||||
"id": "73Ydc9X8h5HXvFrt",
|
||||
"name": "Eidan - n8n account"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"When clicking ‘Execute workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Obtener archivo",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get a workflow": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Code in JavaScript": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Actualizar archivo",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Code in JavaScript1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Subir archivo",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Subir archivo": {
|
||||
"main": [
|
||||
[],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"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 JavaScript",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get a workflow2": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Code in JavaScript1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1",
|
||||
"binaryMode": "separate"
|
||||
},
|
||||
"staticData": null,
|
||||
"meta": null,
|
||||
"pinData": {},
|
||||
"versionId": "bca6f711-d8d5-40a0-a215-6a145d41a3b4",
|
||||
"activeVersionId": null,
|
||||
"versionCounter": 161,
|
||||
"triggerCount": 0,
|
||||
"shared": [
|
||||
{
|
||||
"updatedAt": "2026-06-03T20:22:29.813Z",
|
||||
"createdAt": "2026-06-03T20:22:29.813Z",
|
||||
"role": "workflow:owner",
|
||||
"workflowId": "nvV9JrJGy1AEZdYI",
|
||||
"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": null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user