Files
n8n/flows/18.json

328 lines
6.4 KiB
JSON
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"id": 18,
"name": "Alarms",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-280,
340
]
},
{
"parameters": {
"authentication": "headerAuth",
"url": "https://api.ukrainealarm.com/api/v3/alerts/1591",
"options": {}
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
-600,
540
],
"credentials": {
"httpHeaderAuth": {
"id": "22",
"name": "Header Auth account 2"
}
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 1,
"unit": "minutes"
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
-820,
540
]
},
{
"parameters": {
"chatId": "56628475",
"text": "‼️ <b>Внимание!</b>\nВоздушная тревога",
"additionalFields": {
"parse_mode": "HTML"
}
},
"name": "Telegram",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
700,
480
],
"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": [
700,
660
],
"credentials": {
"telegramApi": {
"id": "38",
"name": "home.cynic.club"
}
}
},
{
"parameters": {
"chatId": "1684481",
"text": "‼️ <b>Внимание!</b>\nВоздушная тревога",
"additionalFields": {
"parse_mode": "HTML"
}
},
"name": "Telegram2",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
700,
260
],
"credentials": {
"telegramApi": {
"id": "38",
"name": "home.cynic.club"
}
}
},
{
"parameters": {
"chatId": "1684481",
"text": "✅ <b>Внимание!</b>\nОтбой воздушной тревоги",
"additionalFields": {
"parse_mode": "HTML"
}
},
"name": "Telegram3",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
700,
820
],
"credentials": {
"telegramApi": {
"id": "38",
"name": "home.cynic.club"
}
}
},
{
"parameters": {
"amount": 30,
"unit": "seconds"
},
"name": "Wait",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
-380,
540
],
"webhookId": "c31ac807-621c-49af-848b-d7c8141e0468"
},
{
"parameters": {
"authentication": "headerAuth",
"url": "https://api.ukrainealarm.com/api/v3/alerts/1591",
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
-180,
540
],
"credentials": {
"httpHeaderAuth": {
"id": "22",
"name": "Header Auth account 2"
}
}
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$node[\"HTTP Request\"].json[\"0\"][\"activeAlerts\"]}}",
"operation": "notEqual",
"value2": "={{$json[\"0\"][\"activeAlerts\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
20,
540
]
},
{
"parameters": {},
"name": "NoOp",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
360,
740
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"0\"][\"activeAlerts\"]}}",
"operation": "isNotEmpty"
}
]
}
},
"name": "IF1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
360,
400
]
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "IF1",
"type": "main",
"index": 0
}
],
[
{
"node": "NoOp",
"type": "main",
"index": 0
}
]
]
},
"IF1": {
"main": [
[
{
"node": "Telegram2",
"type": "main",
"index": 0
},
{
"node": "Telegram",
"type": "main",
"index": 0
}
],
[
{
"node": "Telegram1",
"type": "main",
"index": 0
},
{
"node": "Telegram3",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-05-05T11:59:53.012Z",
"updatedAt": "2022-07-14T13:56:23.575Z",
"settings": {
"errorWorkflow": "25",
"saveDataSuccessExecution": "none"
},
"staticData": null,
"tags": []
}