Files
n8n/flows/26.json

303 lines
6.0 KiB
JSON
Raw Normal View History

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
],
"typeVersion": 1
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 0
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
200,
400
],
"typeVersion": 1
},
{
"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
],
"typeVersion": 1
},
{
"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
],
"typeVersion": 1
},
{
"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
],
"typeVersion": 1
},
{
"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
],
"typeVersion": 1
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
],
"typeVersion": 1
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-05-28 02:36:44 +00:00
]
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-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-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-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
]
},
{
"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-05-30 03:18:43 +00:00
]
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
}
},
"createdAt": "2022-05-26T17:20:27.486Z",
2022-06-01 05:27:46 +00:00
"updatedAt": "2022-06-01T05:25:27.192Z",
2022-05-27 07:03:35 +00:00
"settings": {
"errorWorkflow": "25"
},
2022-05-26 20:57:30 +03:00
"staticData": null
}