Files
n8n/backups/2025-12-27/n8n_backup_gitea.json
2025-12-27 21:49:43 +00:00

1 line
4.1 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.
{"updatedAt":"2025-12-27T21:49:21.541Z","createdAt":"2025-12-27T18:31:30.486Z","id":"BlRmzgPv0m7n7rCfoFaQE","name":"n8n_backup_gitea","active":false,"isArchived":false,"nodes":[{"parameters":{"chatId":"1171589143","text":"n8n успешно запушен","additionalFields":{}},"type":"n8n-nodes-base.telegram","typeVersion":1.2,"position":[1040,-64],"id":"1a613417-3efd-4417-a7a0-5ac05f5fe068","name":"Send a text message","webhookId":"cd1430e6-5895-4ecd-b0df-41bb5c311f75","credentials":{"telegramApi":{"id":"L9KHcMiteyKROF5r","name":"Telegram main n8n"}}},{"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"0 0 * * *"}]}},"id":"c8765d52-406e-4de1-8353-7ec6cd6fb54c","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.1,"position":[-528,-64]},{"parameters":{"url":"http://10.33.33.70:30109/api/v1/workflows","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","options":{}},"id":"fc778077-ceb1-40ea-9ecf-2cff1bd31771","name":"Get All Workflows","type":"n8n-nodes-base.httpRequest","typeVersion":4.1,"position":[-304,-64],"credentials":{"httpHeaderAuth":{"id":"bXtIMzDotX8HKyWy","name":"n8n-api"}}},{"parameters":{"fieldToSplitOut":"data","options":{}},"id":"9a7e423c-dad6-4d2f-959b-1515a176188b","name":"Split into Items","type":"n8n-nodes-base.itemLists","typeVersion":3,"position":[-80,-64]},{"parameters":{"jsCode":"return items.map((item) => {\n const workflow = item.json;\n // Убираем спецсимволы из имени файла\n const safeName = workflow.name.replace(/[/\\\\?%*:|\"<>]/g, '-');\n \n // Кодируем ВЕСЬ объект воркфлоу в Base64\n const base64 = Buffer.from(JSON.stringify(workflow)).toString('base64');\n \n return {\n json: {\n safeName: safeName,\n base64Content: base64,\n today: new Date().toISOString().split('T')[0]\n }\n };\n});"},"id":"e62ffc50-788d-4ebd-96ba-e7e456617ef4","name":"Prepare Data (Base64)","type":"n8n-nodes-base.code","typeVersion":2,"position":[144,-64]},{"parameters":{"options":{}},"id":"40140d3a-3a99-4f4c-abaf-2c376fb6d3a9","name":"Loop (Split in Batches)","type":"n8n-nodes-base.splitInBatches","typeVersion":3,"position":[352,-64]},{"parameters":{"method":"POST","url":"=http://10.33.33.70:30008/api/v1/repos/ogrechko/n8n/contents/backups/{{ $json.today }}/{{ $json.safeName }}.json","authentication":"predefinedCredentialType","nodeCredentialType":"giteaApi","sendBody":true,"specifyBody":"json","jsonBody":"={\n \"content\": \"{{ $json.base64Content }}\",\n \"message\": \"Backup: {{ $json.safeName }}\",\n \"branch\": \"master\"\n}","options":{}},"id":"91ab5dc5-9ac9-4eed-9a1d-f811969bfeff","name":"Push to Gitea","type":"n8n-nodes-base.httpRequest","typeVersion":4.1,"position":[576,-64],"credentials":{"giteaApi":{"id":"JpwYw1CY65zUadHB","name":"Gitea account"}}},{"parameters":{"amount":2},"id":"bfe90672-384c-4f7d-b783-0ee0f2082f2e","name":"Wait 2s","type":"n8n-nodes-base.wait","typeVersion":1.1,"position":[800,-64],"webhookId":"4113ef8c-8ada-4b32-acdb-8ba96426bd86"}],"connections":{"Schedule Trigger":{"main":[[{"node":"Get All Workflows","type":"main","index":0}]]},"Get All Workflows":{"main":[[{"node":"Split into Items","type":"main","index":0}]]},"Split into Items":{"main":[[{"node":"Prepare Data (Base64)","type":"main","index":0}]]},"Prepare Data (Base64)":{"main":[[{"node":"Loop (Split in Batches)","type":"main","index":0}]]},"Loop (Split in Batches)":{"main":[[{"node":"Send a text message","type":"main","index":0}],[{"node":"Push to Gitea","type":"main","index":0}]]},"Push to Gitea":{"main":[[{"node":"Wait 2s","type":"main","index":0}]]},"Wait 2s":{"main":[[{"node":"Loop (Split in Batches)","type":"main","index":0}]]}},"settings":{"executionOrder":"v1","availableInMCP":false},"staticData":null,"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"7dc6e5ca-386c-450d-82a9-8dab29661d39","activeVersionId":null,"triggerCount":0,"shared":[{"updatedAt":"2025-12-27T18:31:30.486Z","createdAt":"2025-12-27T18:31:30.486Z","role":"workflow:owner","workflowId":"BlRmzgPv0m7n7rCfoFaQE","projectId":"sYuiFAb87pAir6jV"}],"activeVersion":null,"tags":[]}