Files
n8n/flows/33.json

141 lines
2.6 KiB
JSON

{
"id": 33,
"name": "Git backup of ESPHOME",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"position": [
180,
620
],
"typeVersion": 1
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 23
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
200,
260
],
"typeVersion": 1
},
{
"parameters": {
"command": "=git commit -m \"Auto backup ({{ new Date().toISOString() }})\"",
"cwd": "/opt/esphome/config"
},
"name": "git commit1",
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
720,
260
],
"credentials": {
"sshPassword": {
"id": "33",
"name": "automation"
}
}
},
{
"parameters": {
"command": "git push https://nia:4159b2141ce710381857585e10f643c40ea613e3@lab.cynic.club/nia/esphome.git --all ",
"cwd": "/opt/esphome/config"
},
"name": "git push1",
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
940,
260
],
"credentials": {
"sshPassword": {
"id": "33",
"name": "automation"
}
}
},
{
"parameters": {
"command": "git add .",
"cwd": "/opt/esphome/config"
},
"name": "git add",
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
480,
260
],
"credentials": {
"sshPassword": {
"id": "33",
"name": "automation"
}
}
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "git add",
"type": "main",
"index": 0
}
]
]
},
"git commit1": {
"main": [
[
{
"node": "git push1",
"type": "main",
"index": 0
}
]
]
},
"git add": {
"main": [
[
{
"node": "git commit1",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-06-15T06:06:51.257Z",
"updatedAt": "2022-06-21T03:20:36.367Z",
"settings": {
"errorWorkflow": "25"
},
"staticData": null,
"tags": [
{
"id": "2",
"name": "my",
"createdAt": "2022-05-19T09:37:15.931Z",
"updatedAt": "2022-05-19T09:37:15.931Z"
}
]
}