Files
n8n/flows/18.json

478 lines
9.1 KiB
JSON
Raw Normal View History

2022-05-26 20:57:30 +03:00
{
"id": 18,
"name": "Alarms",
2022-07-16 21:00:56 +00:00
"active": false,
2022-05-26 20:57:30 +03:00
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
-160,
240
2022-05-26 20:57:30 +03:00
]
},
{
"parameters": {
"authentication": "headerAuth",
"url": "https://api.ukrainealarm.com/api/v3/alerts/1591",
"options": {}
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
-620,
2022-07-14 21:00:57 +00:00
540
2022-05-26 20:57:30 +03:00
],
"credentials": {
"httpHeaderAuth": {
"id": "22",
"name": "Header Auth account 2"
}
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
2022-07-15 21:00:57 +00:00
"mode": "everyMinute"
2022-05-26 20:57:30 +03:00
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
2022-07-14 21:00:57 +00:00
-820,
2022-05-26 20:57:30 +03:00
540
]
},
{
"parameters": {
2022-07-14 21:00:57 +00:00
"chatId": "56628475",
"text": "‼️ <b>Внимание!</b>\nВоздушная тревога",
"additionalFields": {
"parse_mode": "HTML"
2022-05-26 20:57:30 +03:00
}
},
2022-07-14 21:00:57 +00:00
"name": "Telegram",
"type": "n8n-nodes-base.telegram",
2022-05-26 20:57:30 +03:00
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
740,
740
2022-07-14 21:00:57 +00:00
],
"credentials": {
"telegramApi": {
"id": "38",
"name": "home.cynic.club"
}
}
},
{
"parameters": {
"chatId": "56628475",
"text": "✅ <b>Внимание!</b>\nОтбой воздушной тревоги",
"additionalFields": {
"parse_mode": "HTML"
}
},
"name": "Telegram1",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
740,
320
2022-07-14 21:00:57 +00:00
],
"credentials": {
"telegramApi": {
"id": "38",
"name": "home.cynic.club"
}
}
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
2022-07-14 21:00:57 +00:00
"chatId": "1684481",
"text": "‼️ <b>Внимание!</b>\nВоздушная тревога",
"additionalFields": {
"parse_mode": "HTML"
}
2022-05-26 20:57:30 +03:00
},
2022-07-14 21:00:57 +00:00
"name": "Telegram2",
"type": "n8n-nodes-base.telegram",
2022-05-26 20:57:30 +03:00
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
740,
960
2022-05-26 20:57:30 +03:00
],
"credentials": {
2022-07-14 21:00:57 +00:00
"telegramApi": {
"id": "38",
"name": "home.cynic.club"
2022-05-26 20:57:30 +03:00
}
}
},
2022-07-14 21:00:57 +00:00
{
"parameters": {
"chatId": "1684481",
"text": "✅ <b>Внимание!</b>\nОтбой воздушной тревоги",
"additionalFields": {
"parse_mode": "HTML"
}
},
"name": "Telegram3",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
740,
500
2022-07-14 21:00:57 +00:00
],
"credentials": {
"telegramApi": {
"id": "38",
"name": "home.cynic.club"
}
}
},
{
"parameters": {
2022-07-15 21:00:57 +00:00
"keepOnlySet": true,
"values": {
"string": [
{
"name": "alert",
"value": "OFF"
}
]
},
"options": {}
2022-07-14 21:00:57 +00:00
},
2022-07-15 21:00:57 +00:00
"name": "Set",
"type": "n8n-nodes-base.set",
2022-07-14 21:00:57 +00:00
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
-180,
400
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"0\"][\"activeAlerts\"]}}",
"operation": "isEmpty"
}
]
}
},
"name": "IF2",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
-400,
2022-07-14 21:00:57 +00:00
540
2022-07-15 21:00:57 +00:00
]
2022-07-14 21:00:57 +00:00
},
2022-05-26 20:57:30 +03:00
{
"parameters": {
2022-07-15 21:00:57 +00:00
"keepOnlySet": true,
"values": {
"string": [
{
"name": "alert",
"value": "ON"
}
]
},
2022-05-26 20:57:30 +03:00
"options": {}
},
2022-07-15 21:00:57 +00:00
"name": "Set1",
"type": "n8n-nodes-base.set",
2022-05-26 20:57:30 +03:00
"typeVersion": 1,
"position": [
2022-07-14 21:00:57 +00:00
-180,
2022-07-15 21:00:57 +00:00
780
]
},
{
"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
2022-05-26 20:57:30 +03:00
],
"credentials": {
2022-07-15 21:00:57 +00:00
"gristApi": {
"id": "21",
"name": "Grist account"
2022-05-26 20:57:30 +03:00
}
2022-07-14 21:00:57 +00:00
}
},
{
"parameters": {
2022-07-15 21:00:57 +00:00
"operation": "update",
"docId": "r8eT1qvH8UU8vrxjuytXgj",
"tableId": "Alarm",
"rowId": "1",
"fieldsToSend": {
"properties": [
2022-07-14 21:00:57 +00:00
{
2022-07-15 21:00:57 +00:00
"fieldId": "activeAlerts",
"fieldValue": "={{$json[\"alert\"]}}"
2022-07-14 21:00:57 +00:00
}
]
}
2022-05-26 20:57:30 +03:00
},
2022-07-15 21:00:57 +00:00
"name": "Grist1",
"type": "n8n-nodes-base.grist",
2022-07-14 21:00:57 +00:00
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
320,
840
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
2022-07-14 21:00:57 +00:00
},
{
2022-07-15 21:00:57 +00:00
"parameters": {
"mode": "removeKeyMatches",
"propertyName1": "alert",
"propertyName2": "activeAlerts"
},
"name": "Merge",
"type": "n8n-nodes-base.merge",
2022-07-14 21:00:57 +00:00
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
80,
460
2022-07-14 21:00:57 +00:00
]
},
{
"parameters": {
2022-07-15 21:00:57 +00:00
"docId": "r8eT1qvH8UU8vrxjuytXgj",
"tableId": "Alarm",
"additionalOptions": {}
},
"name": "Grist2",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
-180,
560
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
2022-07-14 21:00:57 +00:00
}
2022-07-15 21:00:57 +00:00
}
},
{
"parameters": {
"mode": "removeKeyMatches",
"propertyName1": "alert",
"propertyName2": "activeAlerts"
2022-07-14 21:00:57 +00:00
},
2022-07-15 21:00:57 +00:00
"name": "Merge1",
"type": "n8n-nodes-base.merge",
2022-07-14 21:00:57 +00:00
"typeVersion": 1,
"position": [
2022-07-15 21:00:57 +00:00
80,
840
2022-07-14 21:00:57 +00:00
]
2022-07-15 21:00:57 +00:00
},
{
"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"
}
}
2022-05-26 20:57:30 +03:00
}
],
"connections": {
2022-07-14 21:00:57 +00:00
"Cron": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
2022-07-14 21:00:57 +00:00
"HTTP Request1": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-07-15 21:00:57 +00:00
"node": "IF2",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
2022-07-14 21:00:57 +00:00
}
]
]
},
2022-07-15 21:00:57 +00:00
"Set": {
2022-07-14 21:00:57 +00:00
"main": [
[
2022-05-26 20:57:30 +03:00
{
2022-07-15 21:00:57 +00:00
"node": "Merge",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
2022-07-15 21:00:57 +00:00
"IF2": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-07-15 21:00:57 +00:00
"node": "Set",
"type": "main",
"index": 0
}
],
[
{
"node": "Set1",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
2022-07-15 21:00:57 +00:00
"Set1": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-07-15 21:00:57 +00:00
"node": "Merge1",
2022-07-14 21:00:57 +00:00
"type": "main",
"index": 0
}
2022-07-15 21:00:57 +00:00
]
]
},
"Grist1": {
"main": [
2022-07-14 21:00:57 +00:00
[
{
2022-07-15 21:00:57 +00:00
"node": "Telegram",
"type": "main",
"index": 0
},
{
"node": "Telegram2",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
2022-07-15 21:00:57 +00:00
"Grist": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-07-15 21:00:57 +00:00
"node": "Telegram1",
2022-07-14 21:00:57 +00:00
"type": "main",
"index": 0
},
{
2022-07-15 21:00:57 +00:00
"node": "Telegram3",
2022-07-14 21:00:57 +00:00
"type": "main",
"index": 0
}
2022-07-15 21:00:57 +00:00
]
]
},
"Grist2": {
"main": [
2022-07-14 21:00:57 +00:00
[
{
2022-07-15 21:00:57 +00:00
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Grist",
2022-07-14 21:00:57 +00:00
"type": "main",
"index": 0
2022-07-15 21:00:57 +00:00
}
]
]
},
"Merge1": {
"main": [
[
2022-07-14 21:00:57 +00:00
{
2022-07-15 21:00:57 +00:00
"node": "Grist1",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
2022-07-15 21:00:57 +00:00
},
"Grist3": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
2022-05-26 20:57:30 +03:00
}
},
"createdAt": "2022-05-05T11:59:53.012Z",
2022-07-16 21:00:56 +00:00
"updatedAt": "2022-07-15T21:02:34.058Z",
2022-07-14 21:00:57 +00:00
"settings": {
"errorWorkflow": "25",
2022-07-15 21:00:57 +00:00
"saveDataSuccessExecution": "all"
2022-07-14 21:00:57 +00:00
},
2022-06-09 21:00:39 +00:00
"staticData": null,
"tags": []
2022-05-26 20:57:30 +03:00
}