Auto backup (2022-07-15T21:00:57.157Z)

This commit is contained in:
nia
2022-07-15 21:00:57 +00:00
parent 0d70475255
commit f8d87c0738
6 changed files with 478 additions and 164 deletions

View File

@@ -9,8 +9,8 @@
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-280,
340
-160,
240
]
},
{
@@ -23,7 +23,7 @@
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
-600,
-620,
540
],
"credentials": {
@@ -38,9 +38,7 @@
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 1,
"unit": "minutes"
"mode": "everyMinute"
}
]
}
@@ -65,8 +63,8 @@
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
700,
480
740,
740
],
"credentials": {
"telegramApi": {
@@ -87,8 +85,8 @@
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
700,
660
740,
320
],
"credentials": {
"telegramApi": {
@@ -109,8 +107,8 @@
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
700,
260
740,
960
],
"credentials": {
"telegramApi": {
@@ -131,8 +129,8 @@
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
700,
820
740,
500
],
"credentials": {
"telegramApi": {
@@ -143,66 +141,23 @@
},
{
"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",
"keepOnlySet": true,
"values": {
"string": [
{
"name": "alert",
"value": "OFF"
}
]
},
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"name": "Set",
"type": "n8n-nodes-base.set",
"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
400
]
},
{
@@ -211,18 +166,165 @@
"string": [
{
"value1": "={{$json[\"0\"][\"activeAlerts\"]}}",
"operation": "isNotEmpty"
"operation": "isEmpty"
}
]
}
},
"name": "IF1",
"name": "IF2",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
360,
400
-400,
540
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "alert",
"value": "ON"
}
]
},
"options": {}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
-180,
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
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"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"
}
}
},
{
"parameters": {
"mode": "removeKeyMatches",
"propertyName1": "alert",
"propertyName2": "activeAlerts"
},
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
80,
460
]
},
{
"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"
}
}
},
{
"parameters": {
"mode": "removeKeyMatches",
"propertyName1": "alert",
"propertyName2": "activeAlerts"
},
"name": "Merge1",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
80,
840
]
},
{
"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"
}
}
}
],
"connections": {
@@ -241,67 +343,71 @@
"main": [
[
{
"node": "Wait",
"node": "IF2",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"Set": {
"main": [
[
{
"node": "HTTP Request",
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"IF2": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "IF1",
"node": "Set",
"type": "main",
"index": 0
}
],
[
{
"node": "NoOp",
"node": "Set1",
"type": "main",
"index": 0
}
]
]
},
"IF1": {
"Set1": {
"main": [
[
{
"node": "Telegram2",
"node": "Merge1",
"type": "main",
"index": 0
},
}
]
]
},
"Grist1": {
"main": [
[
{
"node": "Telegram",
"type": "main",
"index": 0
},
{
"node": "Telegram2",
"type": "main",
"index": 0
}
],
]
]
},
"Grist": {
"main": [
[
{
"node": "Telegram1",
@@ -315,13 +421,57 @@
}
]
]
},
"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
}
]
]
}
},
"createdAt": "2022-05-05T11:59:53.012Z",
"updatedAt": "2022-07-14T13:56:23.575Z",
"updatedAt": "2022-07-15T05:57:23.180Z",
"settings": {
"errorWorkflow": "25",
"saveDataSuccessExecution": "none"
"saveDataSuccessExecution": "all"
},
"staticData": null,
"tags": []

View File

@@ -67,10 +67,6 @@
"dataPropertyName": "items",
"extractionValues": {
"values": [
{
"key": "title",
"cssSelector": ".css-v3vynn-Text"
},
{
"key": "link",
"cssSelector": "a.css-1bbgabe",
@@ -78,13 +74,7 @@
"attribute": "href"
},
{
"key": "image",
"cssSelector": ".css-gwhqbt",
"returnValue": "attribute",
"attribute": "src"
},
{
"key": "date",
"key": "city",
"cssSelector": "p.css-p6wsjo-Text.eu5v0x0"
}
]
@@ -148,7 +138,7 @@
"conditions": {
"string": [
{
"value1": "={{$json[\"title\"]}}",
"value1": "={{$json[\"link\"]}}",
"operation": "isNotEmpty"
}
]
@@ -166,7 +156,6 @@
"parameters": {
"docId": "d61nLm6Fn99jwqxd6hdT9d",
"tableId": "Items",
"returnAll": true,
"additionalOptions": {
"filter": {
"filterProperties": [
@@ -202,8 +191,8 @@
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
1520,
400
1500,
300
]
},
{
@@ -217,7 +206,7 @@
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
1700,
2280,
500
],
"credentials": {
@@ -258,6 +247,10 @@
"cssSelector": "img.css-1bmvjcs",
"returnValue": "attribute",
"attribute": "src"
},
{
"key": "title",
"cssSelector": "h1.css-r9zjja-Text.eu5v0x0"
}
]
},
@@ -273,31 +266,6 @@
300
]
},
{
"parameters": {
"operation": "sendPhoto",
"chatId": "1684481",
"binaryData": true,
"additionalFields": {
"caption": "=#{{$node[\"Set\"].json[\"tag\"]}}\n<b>{{$node[\"Merge1\"].json[\"title\"]}} - {{$json[\"price\"]}}</b>\n<i>{{$node[\"Merge1\"].json[\"date\"]}}</i>\n{{$json[\"trim_content\"]}} ...\n<a href=\"{{$node[\"Merge1\"].json[\"link\"]}}\">Подробнее</a>",
"parse_mode": "HTML"
}
},
"name": "Telegram2",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
2540,
300
],
"credentials": {
"telegramApi": {
"id": "31",
"name": "Telegram account"
}
},
"disabled": true
},
{
"parameters": {
"operation": "multiStep",
@@ -323,7 +291,7 @@
"type": "n8n-nodes-base.editImage",
"typeVersion": 1,
"position": [
2380,
2280,
300
]
},
@@ -337,7 +305,7 @@
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
2220,
2100,
300
]
},
@@ -349,8 +317,8 @@
"type": "n8n-nodes-base.functionItem",
"typeVersion": 1,
"position": [
2040,
300
2000,
60
]
},
{
@@ -359,7 +327,7 @@
"chatId": "1684481",
"binaryData": true,
"additionalFields": {
"caption": "=#{{$node[\"Set\"].json[\"tag\"]}}\n<b>{{$node[\"Merge1\"].json[\"title\"]}} - {{$json[\"price\"]}}</b>\n<i>{{$node[\"Merge1\"].json[\"date\"]}}</i>\n<a href=\"{{$node[\"Merge1\"].json[\"link\"]}}\">Подробнее</a>",
"caption": "=#{{$node[\"Set\"].json[\"tag\"]}}\n<b>{{$json[\"title\"]}} - {{$json[\"price\"]}}</b>\n<i>{{$node[\"HTML Extract1\"].json[\"city\"]}}</i>\n<a href=\"{{$node[\"Merge1\"].json[\"link\"]}}\">Подробнее</a>",
"parse_mode": "HTML"
}
},
@@ -367,8 +335,8 @@
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
2540,
440
2520,
300
],
"credentials": {
"telegramApi": {
@@ -376,6 +344,38 @@
"name": "Telegram account"
}
}
},
{
"parameters": {
"values": {
"string": [
{
"name": "link",
"value": "={{$node[\"Merge1\"].json[\"link\"]}}"
},
{
"name": "tag",
"value": "={{$node[\"Set\"].json[\"tag\"]}}"
},
{
"name": "city",
"value": "={{$node[\"HTML Extract1\"].json[\"city\"]}}"
},
{
"name": "date",
"value": "={{$now.toString()}}"
}
]
},
"options": {}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
2100,
500
]
}
],
"connections": {
@@ -481,11 +481,6 @@
"Merge1": {
"main": [
[
{
"node": "Grist",
"type": "main",
"index": 0
},
{
"node": "HTTP Request1",
"type": "main",
@@ -509,7 +504,12 @@
"main": [
[
{
"node": "FunctionItem",
"node": "Set1",
"type": "main",
"index": 0
},
{
"node": "HTTP Request2",
"type": "main",
"index": 0
}
@@ -519,11 +519,6 @@
"Edit Image": {
"main": [
[
{
"node": "Telegram2",
"type": "main",
"index": 0
},
{
"node": "Telegram",
"type": "main",
@@ -543,11 +538,11 @@
]
]
},
"FunctionItem": {
"Set1": {
"main": [
[
{
"node": "HTTP Request2",
"node": "Grist",
"type": "main",
"index": 0
}
@@ -556,7 +551,7 @@
}
},
"createdAt": "2022-05-27T16:18:47.443Z",
"updatedAt": "2022-07-13T08:33:43.050Z",
"updatedAt": "2022-07-15T17:16:33.702Z",
"settings": {
"errorWorkflow": "25"
},

169
flows/53.json Normal file
View File

@@ -0,0 +1,169 @@
{
"id": 53,
"name": "olx ps4game che rss",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
400,
140
]
},
{
"parameters": {
"docId": "d61nLm6Fn99jwqxd6hdT9d",
"tableId": "Items",
"returnAll": true,
"additionalOptions": {
"filter": {
"filterProperties": [
{
"field": "tag",
"values": "ps4_games_ch"
}
]
}
}
},
"name": "Grist1",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
600,
320
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"respondWith": "text",
"responseBody": "={{$json[\"feed\"]}}",
"options": {
"responseHeaders": {
"entries": [
{
"name": "content-type",
"value": "application/xml"
}
]
}
}
},
"name": "Respond to Webhook1",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1180,
320
],
"typeVersion": 1
},
{
"parameters": {
"path": "ps4game_che",
"responseMode": "responseNode",
"options": {}
},
"name": "Webhook1",
"type": "n8n-nodes-base.webhook",
"position": [
400,
320
],
"webhookId": "f1a20d18-72bb-4d4a-8bad-0f465f6029c9",
"typeVersion": 1
},
{
"parameters": {
"functionCode": "let feed =\n`<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<rss version=\"2.0\">\n\n<channel>\n <title>olx ps4 игры Чернигов</title>\n <link>https://olx.ua</link>\n <description>Stay up to date with the latest changes and updates of olx</description>\n ${items.map(e => e.json.rss_item).join('\\n')}\n</channel>\n\n</rss>`;\n\nreturn [{\n json: {\n feed: feed\n }\n}];"
},
"name": "Prepare Response1",
"type": "n8n-nodes-base.function",
"position": [
1000,
320
],
"typeVersion": 1
},
{
"parameters": {
"functionCode": "return {\n rss_item: \n`<item>\n <title>${item.title} - ${item.price}</title>\n <link>${item.link}</link>\n <description>${item.content}</description>\n <pubDate>${item.date}</pubDate>\n <image>\n <url>${item.image}</url>\n <title>${item.title}</title>\n <link>${item.link}</link>\n </image>\n <category>${item.tag}</category>\n</item>`\n}"
},
"name": "Create RSS Items1",
"type": "n8n-nodes-base.functionItem",
"position": [
800,
320
],
"typeVersion": 1
}
],
"connections": {
"Grist1": {
"main": [
[
{
"node": "Create RSS Items1",
"type": "main",
"index": 0
}
]
]
},
"Webhook1": {
"main": [
[
{
"node": "Grist1",
"type": "main",
"index": 0
}
]
]
},
"Prepare Response1": {
"main": [
[
{
"node": "Respond to Webhook1",
"type": "main",
"index": 0
}
]
]
},
"Create RSS Items1": {
"main": [
[
{
"node": "Prepare Response1",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-07-15T11:11:44.964Z",
"updatedAt": "2022-07-15T17:28:39.242Z",
"settings": {
"errorWorkflow": "25"
},
"staticData": null,
"tags": [
{
"id": "3",
"name": "olx",
"createdAt": "2022-06-21T19:20:51.822Z",
"updatedAt": "2022-06-21T19:20:51.822Z"
}
]
}