498 lines
10 KiB
JSON
Executable File
498 lines
10 KiB
JSON
Executable File
{
|
||
"createdAt": "2022-05-05T11:59:53.012Z",
|
||
"updatedAt": "2022-07-15T21:02:34.058Z",
|
||
"id": 18,
|
||
"name": "Alarms",
|
||
"active": false,
|
||
"nodes": [
|
||
{
|
||
"parameters": {},
|
||
"name": "Start",
|
||
"type": "n8n-nodes-base.start",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-160,
|
||
240
|
||
],
|
||
"id": "1fa87504-a5b6-4213-85cb-cbec56344c64"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"authentication": "headerAuth",
|
||
"url": "https://api.ukrainealarm.com/api/v3/alerts/1591",
|
||
"options": {}
|
||
},
|
||
"name": "HTTP Request1",
|
||
"type": "n8n-nodes-base.httpRequest",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-620,
|
||
540
|
||
],
|
||
"credentials": {
|
||
"httpHeaderAuth": {
|
||
"id": "22",
|
||
"name": "Header Auth account 2"
|
||
}
|
||
},
|
||
"id": "6c9d49fc-89b0-4c4c-b49a-60c49d641747"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"triggerTimes": {
|
||
"item": [
|
||
{
|
||
"mode": "everyMinute"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"name": "Cron",
|
||
"type": "n8n-nodes-base.cron",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-820,
|
||
540
|
||
],
|
||
"id": "1b54c35f-2d2b-4b6b-b76b-c35b026e7450"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"chatId": "56628475",
|
||
"text": "‼️ <b>Внимание!</b>\nВоздушная тревога",
|
||
"additionalFields": {
|
||
"parse_mode": "HTML"
|
||
}
|
||
},
|
||
"name": "Telegram",
|
||
"type": "n8n-nodes-base.telegram",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
740,
|
||
740
|
||
],
|
||
"credentials": {
|
||
"telegramApi": {
|
||
"id": "38",
|
||
"name": "home.cynic.club"
|
||
}
|
||
},
|
||
"id": "b4b2a325-9dff-4c2b-83b7-ef92cbdcf387"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"chatId": "56628475",
|
||
"text": "✅ <b>Внимание!</b>\nОтбой воздушной тревоги",
|
||
"additionalFields": {
|
||
"parse_mode": "HTML"
|
||
}
|
||
},
|
||
"name": "Telegram1",
|
||
"type": "n8n-nodes-base.telegram",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
740,
|
||
320
|
||
],
|
||
"credentials": {
|
||
"telegramApi": {
|
||
"id": "38",
|
||
"name": "home.cynic.club"
|
||
}
|
||
},
|
||
"id": "bb417ac0-1869-4a30-9ab0-43cdb8a08af8"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"chatId": "1684481",
|
||
"text": "‼️ <b>Внимание!</b>\nВоздушная тревога",
|
||
"additionalFields": {
|
||
"parse_mode": "HTML"
|
||
}
|
||
},
|
||
"name": "Telegram2",
|
||
"type": "n8n-nodes-base.telegram",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
740,
|
||
960
|
||
],
|
||
"credentials": {
|
||
"telegramApi": {
|
||
"id": "38",
|
||
"name": "home.cynic.club"
|
||
}
|
||
},
|
||
"id": "aea2850d-7ce9-4d9f-9f77-33f73632c2d5"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"chatId": "1684481",
|
||
"text": "✅ <b>Внимание!</b>\nОтбой воздушной тревоги",
|
||
"additionalFields": {
|
||
"parse_mode": "HTML"
|
||
}
|
||
},
|
||
"name": "Telegram3",
|
||
"type": "n8n-nodes-base.telegram",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
740,
|
||
500
|
||
],
|
||
"credentials": {
|
||
"telegramApi": {
|
||
"id": "38",
|
||
"name": "home.cynic.club"
|
||
}
|
||
},
|
||
"id": "632e59e6-0c11-4d92-9f85-bd9579fe6fdd"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"keepOnlySet": true,
|
||
"values": {
|
||
"string": [
|
||
{
|
||
"name": "alert",
|
||
"value": "OFF"
|
||
}
|
||
]
|
||
},
|
||
"options": {}
|
||
},
|
||
"name": "Set",
|
||
"type": "n8n-nodes-base.set",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-180,
|
||
400
|
||
],
|
||
"id": "852d5aa4-b9de-4c32-ac94-631f1ba1c881"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"conditions": {
|
||
"string": [
|
||
{
|
||
"value1": "={{$json[\"0\"][\"activeAlerts\"]}}",
|
||
"operation": "isEmpty"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"name": "IF2",
|
||
"type": "n8n-nodes-base.if",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-400,
|
||
540
|
||
],
|
||
"id": "17e92efb-0f92-4507-9c0c-2ac0735d9bc1"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"keepOnlySet": true,
|
||
"values": {
|
||
"string": [
|
||
{
|
||
"name": "alert",
|
||
"value": "ON"
|
||
}
|
||
]
|
||
},
|
||
"options": {}
|
||
},
|
||
"name": "Set1",
|
||
"type": "n8n-nodes-base.set",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-180,
|
||
780
|
||
],
|
||
"id": "331b174a-9245-47db-9b81-108ddfdfa49c"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"operation": "update",
|
||
"docId": "r8eT1qvH8UU8vrxjuytXgj",
|
||
"tableId": "Alarm",
|
||
"rowId": "1",
|
||
"fieldsToSend": {
|
||
"properties": [
|
||
{
|
||
"fieldId": "activeAlerts",
|
||
"fieldValue": "={{$json[\"alert\"]}}"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"name": "Grist",
|
||
"type": "n8n-nodes-base.grist",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
320,
|
||
460
|
||
],
|
||
"credentials": {
|
||
"gristApi": {
|
||
"id": "21",
|
||
"name": "Grist account"
|
||
}
|
||
},
|
||
"id": "9617cd2e-99f5-4492-81db-1244865aa071"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"operation": "update",
|
||
"docId": "r8eT1qvH8UU8vrxjuytXgj",
|
||
"tableId": "Alarm",
|
||
"rowId": "1",
|
||
"fieldsToSend": {
|
||
"properties": [
|
||
{
|
||
"fieldId": "activeAlerts",
|
||
"fieldValue": "={{$json[\"alert\"]}}"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"name": "Grist1",
|
||
"type": "n8n-nodes-base.grist",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
320,
|
||
840
|
||
],
|
||
"credentials": {
|
||
"gristApi": {
|
||
"id": "21",
|
||
"name": "Grist account"
|
||
}
|
||
},
|
||
"id": "7f4cad51-a9ec-4e4b-a504-57bf6d2c32b7"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"mode": "removeKeyMatches",
|
||
"propertyName1": "alert",
|
||
"propertyName2": "activeAlerts"
|
||
},
|
||
"name": "Merge",
|
||
"type": "n8n-nodes-base.merge",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
80,
|
||
460
|
||
],
|
||
"id": "3e8aed3d-36ab-49d6-ad29-75ebb67ab1bc"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"docId": "r8eT1qvH8UU8vrxjuytXgj",
|
||
"tableId": "Alarm",
|
||
"additionalOptions": {}
|
||
},
|
||
"name": "Grist2",
|
||
"type": "n8n-nodes-base.grist",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-180,
|
||
560
|
||
],
|
||
"credentials": {
|
||
"gristApi": {
|
||
"id": "21",
|
||
"name": "Grist account"
|
||
}
|
||
},
|
||
"id": "8609fcd4-4748-47af-b809-8ff47babbf7d"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"mode": "removeKeyMatches",
|
||
"propertyName1": "alert",
|
||
"propertyName2": "activeAlerts"
|
||
},
|
||
"name": "Merge1",
|
||
"type": "n8n-nodes-base.merge",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
80,
|
||
840
|
||
],
|
||
"id": "d465df99-066f-4745-a82b-288d268ad1d0"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"docId": "r8eT1qvH8UU8vrxjuytXgj",
|
||
"tableId": "Alarm",
|
||
"additionalOptions": {}
|
||
},
|
||
"name": "Grist3",
|
||
"type": "n8n-nodes-base.grist",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
-180,
|
||
940
|
||
],
|
||
"credentials": {
|
||
"gristApi": {
|
||
"id": "21",
|
||
"name": "Grist account"
|
||
}
|
||
},
|
||
"id": "7b7095a7-b05e-4a86-9c3a-73e3fef820e5"
|
||
}
|
||
],
|
||
"connections": {
|
||
"Cron": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "HTTP Request1",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"HTTP Request1": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "IF2",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Set": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Merge",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"IF2": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Set",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
],
|
||
[
|
||
{
|
||
"node": "Set1",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Set1": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Merge1",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Grist1": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Telegram",
|
||
"type": "main",
|
||
"index": 0
|
||
},
|
||
{
|
||
"node": "Telegram2",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Grist": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Telegram1",
|
||
"type": "main",
|
||
"index": 0
|
||
},
|
||
{
|
||
"node": "Telegram3",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Grist2": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Merge",
|
||
"type": "main",
|
||
"index": 1
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Merge": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Grist",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Merge1": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Grist1",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Grist3": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Merge1",
|
||
"type": "main",
|
||
"index": 1
|
||
}
|
||
]
|
||
]
|
||
}
|
||
},
|
||
"settings": {
|
||
"errorWorkflow": "25",
|
||
"saveDataSuccessExecution": "all"
|
||
},
|
||
"staticData": null,
|
||
"dataLoaded": false,
|
||
"pinData": null,
|
||
"versionId": "3fcf02d0-bb33-4cb4-9fa8-1fd89a9005da",
|
||
"triggerCount": 0,
|
||
"tags": []
|
||
} |