Files
n8n/flows/26.json

327 lines
6.9 KiB
JSON
Raw Normal View History

2022-05-26 20:57:30 +03:00
{
2022-10-27 21:01:19 +00:00
"createdAt": "2022-05-26T17:20:27.486Z",
"updatedAt": "2022-06-21T03:20:20.469Z",
2022-05-26 20:57:30 +03:00
"id": 26,
"name": "Git backup of workflows and credentials",
2022-05-27 10:09:13 +00:00
"active": true,
2022-05-26 20:57:30 +03:00
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"position": [
200,
620
],
2022-08-03 21:00:21 +00:00
"typeVersion": 1,
"id": "cf28aca0-f5d1-4164-8513-452e949a782a"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 0
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
200,
400
],
2022-08-03 21:00:21 +00:00
"typeVersion": 1,
"id": "97f1183c-5136-44eb-83d3-6edfc70a5cd9"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"command": "npx n8n export:workflow --backup --output /home/node/.n8n/backup/flows/"
},
2022-05-27 10:07:13 +00:00
"name": "Export Workflows",
2022-05-26 20:57:30 +03:00
"type": "n8n-nodes-base.executeCommand",
"position": [
460,
620
],
2022-08-03 21:00:21 +00:00
"typeVersion": 1,
"id": "3b5e3a9e-4ea7-41ba-b59a-f11fd0cb79be"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"command": "npx n8n export:credentials --backup --output /home/node/.n8n/backup/credentials/"
},
2022-05-27 10:07:13 +00:00
"name": "Export Credentials",
2022-05-26 20:57:30 +03:00
"type": "n8n-nodes-base.executeCommand",
"position": [
640,
620
],
2022-08-03 21:00:21 +00:00
"typeVersion": 1,
"id": "f72a0e71-4f56-4c90-8617-6ea376ee3899"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
2022-05-27 07:03:35 +00:00
"command": "cd /home/node/.n8n/backup/ && git add ."
2022-05-26 20:57:30 +03:00
},
2022-05-27 10:07:13 +00:00
"name": "git add",
2022-05-26 20:57:30 +03:00
"type": "n8n-nodes-base.executeCommand",
"position": [
2022-05-30 03:18:43 +00:00
800,
2022-05-30 05:52:24 +00:00
360
2022-05-26 20:57:30 +03:00
],
2022-08-03 21:00:21 +00:00
"typeVersion": 1,
"id": "81be2c11-d3e0-45ae-99f9-640524a04488"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
2022-05-27 07:05:16 +00:00
"command": "=cd /home/node/.n8n/backup/ && git commit -m \"Auto backup ({{ new Date().toISOString() }})\""
2022-05-26 20:57:30 +03:00
},
2022-05-27 10:07:13 +00:00
"name": "git commit",
2022-05-26 20:57:30 +03:00
"type": "n8n-nodes-base.executeCommand",
"position": [
2022-05-30 05:52:24 +00:00
1180,
320
2022-05-26 20:57:30 +03:00
],
2022-08-03 21:00:21 +00:00
"typeVersion": 1,
"id": "9acce3e6-fa8e-4aa7-b51b-f8fb86ab419b"
2022-05-27 09:27:45 +00:00
},
{
"parameters": {
2022-05-27 10:05:20 +00:00
"command": "cd /home/node/.n8n/backup/ && git push https://nia:4159b2141ce710381857585e10f643c40ea613e3@lab.cynic.club/nia/n8n.git --all \n"
2022-05-27 09:27:45 +00:00
},
2022-05-27 10:07:13 +00:00
"name": "git push",
2022-05-27 09:27:45 +00:00
"type": "n8n-nodes-base.executeCommand",
"position": [
2022-05-30 05:52:24 +00:00
1360,
380
2022-05-27 09:27:45 +00:00
],
2022-08-03 21:00:21 +00:00
"typeVersion": 1,
"id": "978fc3dc-4df5-4758-af67-2d7c87e20c47"
2022-05-28 02:36:44 +00:00
},
{
"parameters": {
"command": "git config --global user.email \"ihor.nahornyy@gmail.com\" &&\n git config --global user.name \"nia\""
},
"name": "add username",
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
2022-05-30 05:52:24 +00:00
1000,
360
2022-08-03 21:00:21 +00:00
],
"id": "c3c605fc-0519-4c8a-8df1-f3957ff65a89"
2022-05-30 03:15:13 +00:00
},
{
"parameters": {
"operation": "addConfig",
"repositoryPath": "/home/node/.n8n/backup",
"key": "user.email",
"value": "ihor.nahornyy@gmail.com",
"options": {}
},
"name": "Git",
"type": "n8n-nodes-base.git",
"typeVersion": 1,
"position": [
2022-05-30 05:52:24 +00:00
1000,
620
2022-08-03 21:00:21 +00:00
],
"id": "e891c92f-90c5-4562-bffb-b4a3133f2af6"
2022-05-30 03:15:13 +00:00
},
{
"parameters": {
"operation": "addConfig",
"repositoryPath": "/home/node/.n8n/backup",
"key": "user.name",
"value": "nia",
"options": {}
},
"name": "Git1",
"type": "n8n-nodes-base.git",
"typeVersion": 1,
"position": [
2022-05-30 05:52:24 +00:00
1160,
620
2022-08-03 21:00:21 +00:00
],
"id": "de49bfa5-9563-4345-b415-8bd27413d6b7"
2022-05-30 03:15:13 +00:00
},
{
"parameters": {
"authentication": "gitPassword",
"operation": "push",
"repositoryPath": "/home/node/.n8n/backup",
"options": {
"targetRepository": "https://lab.cynic.club/nia/n8n.git"
}
},
"name": "Git2",
"type": "n8n-nodes-base.git",
"typeVersion": 1,
"position": [
2022-05-30 05:52:24 +00:00
1480,
620
2022-05-30 03:15:13 +00:00
],
"credentials": {
"gitPassword": {
"id": "30",
"name": "Git account"
}
2022-08-03 21:00:21 +00:00
},
"id": "7c68e35c-f5ec-4a8b-8d38-ee874100534e"
2022-05-30 03:18:43 +00:00
},
{
"parameters": {
"operation": "add",
"repositoryPath": "/home/node/.n8n/backup",
"pathsToAdd": "."
},
"name": "Git3",
"type": "n8n-nodes-base.git",
"typeVersion": 1,
"position": [
2022-05-30 05:52:24 +00:00
820,
620
2022-08-03 21:00:21 +00:00
],
"id": "52382fb1-c266-4e8d-904d-12381c0a92bf"
2022-05-30 05:52:24 +00:00
},
{
"parameters": {
"operation": "commit",
"repositoryPath": "/home/node/.n8n/backup",
"message": "=Auto backup ({{ new Date().toISOString() }})",
"options": {}
},
"name": "Git4",
"type": "n8n-nodes-base.git",
"typeVersion": 1,
"position": [
1320,
620
2022-08-03 21:00:21 +00:00
],
"id": "fe2b1325-e552-42b9-b8b0-ec8cd7dfbd94"
2022-05-26 20:57:30 +03:00
}
],
"connections": {
"Cron": {
"main": [
[
{
2022-05-27 10:07:13 +00:00
"node": "Export Workflows",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
"Start": {
"main": [
[
{
2022-05-27 10:07:13 +00:00
"node": "Export Workflows",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
2022-05-27 10:07:13 +00:00
"Export Workflows": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-05-27 10:07:13 +00:00
"node": "Export Credentials",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
"Export Credentials": {
"main": [
[
{
2022-05-30 03:18:43 +00:00
"node": "Git3",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
2022-05-27 10:07:13 +00:00
"git add": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-05-28 02:36:44 +00:00
"node": "add username",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
2022-05-27 09:27:45 +00:00
},
2022-05-27 10:07:13 +00:00
"git commit": {
2022-05-30 03:18:43 +00:00
"main": [
[]
]
},
"Git": {
2022-05-28 02:36:44 +00:00
"main": [
[
{
2022-05-30 03:18:43 +00:00
"node": "Git1",
2022-05-28 02:36:44 +00:00
"type": "main",
"index": 0
}
]
]
2022-05-30 03:15:13 +00:00
},
2022-05-30 03:18:43 +00:00
"Git1": {
2022-05-30 03:15:13 +00:00
"main": [
[
{
2022-05-30 05:52:24 +00:00
"node": "Git4",
2022-05-30 03:15:13 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-05-30 03:18:43 +00:00
"Git3": {
2022-05-30 03:15:13 +00:00
"main": [
2022-05-30 03:18:43 +00:00
[
{
"node": "Git",
"type": "main",
"index": 0
}
]
2022-05-30 03:15:13 +00:00
]
2022-05-30 05:52:24 +00:00
},
"Git4": {
"main": [
[
{
"node": "Git2",
"type": "main",
"index": 0
}
]
]
2022-05-26 20:57:30 +03:00
}
},
2022-05-27 07:03:35 +00:00
"settings": {
"errorWorkflow": "25"
},
2022-06-09 21:00:39 +00:00
"staticData": null,
2022-12-07 22:01:07 +00:00
"dataLoaded": false,
2022-07-20 21:00:15 +00:00
"pinData": null,
2022-12-07 22:01:07 +00:00
"versionId": "9b91cdd0-e062-4b2c-91a2-63f70ec6f0da",
2022-06-09 21:00:39 +00:00
"tags": [
{
"createdAt": "2022-05-19T09:37:15.931Z",
2022-10-27 21:01:19 +00:00
"updatedAt": "2022-05-19T09:37:15.931Z",
"id": "2",
"name": "my"
2022-06-09 21:00:39 +00:00
}
2022-12-07 22:01:07 +00:00
]
2022-05-26 20:57:30 +03:00
}