Files
n8n/flows/26.json

260 lines
5.0 KiB
JSON
Raw Normal View History

2022-05-26 20:57:30 +03:00
{
"id": 26,
"name": "Git backup of workflows and credentials",
"active": false,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"position": [
200,
620
],
"typeVersion": 1
},
{
"parameters": {
"command": "npx n8n export:credentials --backup --output repo/credentials/"
},
"name": "Export Credentials",
"type": "n8n-nodes-base.executeCommand",
"position": [
590,
400
],
"typeVersion": 1
},
{
"parameters": {
"command": "git -C repo add ."
},
"name": "git add",
"type": "n8n-nodes-base.executeCommand",
"position": [
740,
400
],
"typeVersion": 1
},
{
"parameters": {
"command": "=git -C repo commit -m \"Auto backup ({{ new Date().toISOString() }})\""
},
"name": "git commit",
"type": "n8n-nodes-base.executeCommand",
"position": [
890,
400
],
"typeVersion": 1
},
{
"parameters": {
"command": "git -C repo push"
},
"name": "git push",
"type": "n8n-nodes-base.executeCommand",
"position": [
1040,
2022-05-27 09:34:40 +00:00
320
2022-05-26 20:57:30 +03:00
],
"typeVersion": 1
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 0
},
{
"hour": 12
},
{
"hour": 6
},
{
"hour": 18
}
]
}
},
"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/"
},
"name": "Export Workflows1",
"type": "n8n-nodes-base.executeCommand",
"position": [
460,
620
],
"typeVersion": 1
},
{
"parameters": {
"command": "npx n8n export:credentials --backup --output /home/node/.n8n/backup/credentials/"
},
"name": "Export Credentials1",
"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 07:03:35 +00:00
"name": "git add2",
2022-05-26 20:57:30 +03:00
"type": "n8n-nodes-base.executeCommand",
"position": [
2022-05-27 07:03:35 +00:00
860,
2022-05-26 20:57:30 +03:00
620
],
"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 07:03:35 +00:00
"name": "git commit1",
2022-05-26 20:57:30 +03:00
"type": "n8n-nodes-base.executeCommand",
"position": [
2022-05-27 07:03:35 +00:00
1060,
2022-05-26 20:57:30 +03:00
620
],
"typeVersion": 1
2022-05-27 09:27:45 +00:00
},
{
"parameters": {
2022-05-27 09:30:53 +00:00
"command": "cd /home/node/.n8n/backup/ && git push \n origin master \n"
2022-05-27 09:27:45 +00:00
},
"name": "git push1",
"type": "n8n-nodes-base.executeCommand",
"position": [
1260,
620
],
"typeVersion": 1
2022-05-26 20:57:30 +03:00
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "Export Workflows1",
"type": "main",
"index": 0
}
]
]
},
"Start": {
"main": [
[
{
"node": "Export Workflows1",
"type": "main",
"index": 0
}
]
]
},
"git add": {
"main": [
[
{
"node": "git commit",
"type": "main",
"index": 0
}
]
]
},
"git commit": {
"main": [
[
{
"node": "git push",
"type": "main",
"index": 0
}
]
]
},
"Export Credentials": {
"main": [
[
{
"node": "git add",
"type": "main",
"index": 0
}
]
]
},
"Export Workflows1": {
"main": [
[
{
"node": "Export Credentials1",
"type": "main",
"index": 0
}
]
]
},
"Export Credentials1": {
"main": [
[
{
"node": "git add2",
"type": "main",
"index": 0
}
]
]
},
"git add2": {
"main": [
[
{
2022-05-27 07:03:35 +00:00
"node": "git commit1",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
2022-05-27 09:27:45 +00:00
},
"git commit1": {
"main": [
[
{
"node": "git push1",
"type": "main",
"index": 0
}
]
]
2022-05-26 20:57:30 +03:00
}
},
"createdAt": "2022-05-26T17:20:27.486Z",
2022-05-27 09:34:40 +00:00
"updatedAt": "2022-05-27T09:34:24.534Z",
2022-05-27 07:03:35 +00:00
"settings": {
"saveExecutionProgress": "DEFAULT",
"errorWorkflow": "25"
},
2022-05-26 20:57:30 +03:00
"staticData": null
}