Files
n8n/flows/26.json

169 lines
3.3 KiB
JSON
Executable File

{
"id": 26,
"name": "Git backup of workflows and credentials",
"active": true,
"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/"
},
"name": "Export Workflows",
"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 Credentials",
"type": "n8n-nodes-base.executeCommand",
"position": [
640,
620
],
"typeVersion": 1
},
{
"parameters": {
"command": "cd /home/node/.n8n/backup/ && git add ."
},
"name": "git add",
"type": "n8n-nodes-base.executeCommand",
"position": [
860,
620
],
"typeVersion": 1
},
{
"parameters": {
"command": "=cd /home/node/.n8n/backup/ && git commit -m \"Auto backup ({{ new Date().toISOString() }})\""
},
"name": "git commit",
"type": "n8n-nodes-base.executeCommand",
"position": [
1060,
620
],
"typeVersion": 1
},
{
"parameters": {
"command": "cd /home/node/.n8n/backup/ && git push https://nia:4159b2141ce710381857585e10f643c40ea613e3@lab.cynic.club/nia/n8n.git --all \n"
},
"name": "git push",
"type": "n8n-nodes-base.executeCommand",
"position": [
1260,
620
],
"typeVersion": 1
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "Export Workflows",
"type": "main",
"index": 0
}
]
]
},
"Start": {
"main": [
[
{
"node": "Export Workflows",
"type": "main",
"index": 0
}
]
]
},
"Export Workflows": {
"main": [
[
{
"node": "Export Credentials",
"type": "main",
"index": 0
}
]
]
},
"Export Credentials": {
"main": [
[
{
"node": "git add",
"type": "main",
"index": 0
}
]
]
},
"git add": {
"main": [
[
{
"node": "git commit",
"type": "main",
"index": 0
}
]
]
},
"git commit": {
"main": [
[
{
"node": "git push",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-05-26T17:20:27.486Z",
"updatedAt": "2022-05-27T10:09:00.742Z",
"settings": {
"errorWorkflow": "25"
},
"staticData": null
}