112 lines
2.6 KiB
JSON
112 lines
2.6 KiB
JSON
|
|
{
|
||
|
|
"name": "Backup Monitor — Receiver",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"parameters": {
|
||
|
|
"httpMethod": "POST",
|
||
|
|
"path": "backup-notify",
|
||
|
|
"authentication": "headerAuth",
|
||
|
|
"responseMode": "responseNode",
|
||
|
|
"options": {}
|
||
|
|
},
|
||
|
|
"id": "336a3720-38df-4431-8218-3574c634a23a",
|
||
|
|
"name": "Webhook",
|
||
|
|
"type": "n8n-nodes-base.webhook",
|
||
|
|
"typeVersion": 2,
|
||
|
|
"position": [
|
||
|
|
240,
|
||
|
|
300
|
||
|
|
],
|
||
|
|
"webhookId": "21ee456d-da9f-4c4a-b9ed-cecf1f082ede",
|
||
|
|
"credentials": {
|
||
|
|
"httpHeaderAuth": {
|
||
|
|
"id": "REPLACE_WITH_BACKUP_CREDENTIAL_ID",
|
||
|
|
"name": "backup-monitor-token"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"parameters": {
|
||
|
|
"resource": "row",
|
||
|
|
"operation": "insert",
|
||
|
|
"dataTableId": {
|
||
|
|
"__rl": true,
|
||
|
|
"mode": "list",
|
||
|
|
"value": "REPLACE_WITH_DATATABLE_ID",
|
||
|
|
"cachedResultName": "backup_runs"
|
||
|
|
},
|
||
|
|
"columns": {
|
||
|
|
"mappingMode": "defineBelow",
|
||
|
|
"value": {
|
||
|
|
"timestamp": "={{ $json.body.timestamp }}",
|
||
|
|
"machine": "={{ $json.body.machine }}",
|
||
|
|
"destination": "={{ $json.body.destination }}",
|
||
|
|
"status": "={{ $json.body.status }}",
|
||
|
|
"bytes_transferred": "={{ $json.body.bytes_transferred }}",
|
||
|
|
"snapshot_id": "={{ $json.body.snapshot_id }}",
|
||
|
|
"log_path": "={{ $json.body.log_path }}",
|
||
|
|
"notes": "={{ $json.body.notes }}"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"id": "4a4d9d99-c1f4-4440-9998-9649afff9fed",
|
||
|
|
"name": "Insert to backup_runs",
|
||
|
|
"type": "n8n-nodes-base.dataTable",
|
||
|
|
"typeVersion": 1,
|
||
|
|
"position": [
|
||
|
|
520,
|
||
|
|
300
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"parameters": {
|
||
|
|
"respondWith": "json",
|
||
|
|
"responseBody": "={{ JSON.stringify({ ok: true }) }}",
|
||
|
|
"options": {
|
||
|
|
"responseCode": 200
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"id": "8683674c-4010-4c69-bba7-e79a38454863",
|
||
|
|
"name": "Respond 200",
|
||
|
|
"type": "n8n-nodes-base.respondToWebhook",
|
||
|
|
"typeVersion": 1.1,
|
||
|
|
"position": [
|
||
|
|
800,
|
||
|
|
300
|
||
|
|
]
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"connections": {
|
||
|
|
"Webhook": {
|
||
|
|
"main": [
|
||
|
|
[
|
||
|
|
{
|
||
|
|
"node": "Insert to backup_runs",
|
||
|
|
"type": "main",
|
||
|
|
"index": 0
|
||
|
|
}
|
||
|
|
]
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"Insert to backup_runs": {
|
||
|
|
"main": [
|
||
|
|
[
|
||
|
|
{
|
||
|
|
"node": "Respond 200",
|
||
|
|
"type": "main",
|
||
|
|
"index": 0
|
||
|
|
}
|
||
|
|
]
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"active": false,
|
||
|
|
"settings": {
|
||
|
|
"executionOrder": "v1"
|
||
|
|
},
|
||
|
|
"pinData": {},
|
||
|
|
"meta": {
|
||
|
|
"templateCredsSetupCompleted": true
|
||
|
|
},
|
||
|
|
"tags": []
|
||
|
|
}
|