Files
n8n/flows/56.json

757 lines
15 KiB
JSON
Raw Normal View History

2022-07-18 21:00:57 +00:00
{
2022-10-27 21:01:19 +00:00
"createdAt": "2022-07-18T17:30:44.606Z",
2022-12-29 22:00:59 +00:00
"updatedAt": "2022-12-29T01:24:21.004Z",
2022-07-18 21:00:57 +00:00
"id": 56,
"name": "olx final",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
200,
-40
2022-08-03 21:00:21 +00:00
],
"id": "de16547c-d521-48c5-a9f0-a66833478aaa"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 15,
"unit": "minutes"
}
]
}
},
"name": "Cron2",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
200,
2022-08-01 21:00:31 +00:00
260
2022-08-03 21:00:21 +00:00
],
"id": "e87c4d6d-641e-42f3-b00e-bedadf06c7ba"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"operation": "create",
"docId": "d61nLm6Fn99jwqxd6hdT9d",
"tableId": "Items",
"dataToSend": "autoMapInputs"
},
"name": "Grist",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
3180,
180
2022-07-18 21:00:57 +00:00
],
2022-08-04 21:00:21 +00:00
"id": "af87dff3-b055-4600-ad98-814c0bd8c11d",
2022-07-18 21:00:57 +00:00
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-04 21:00:21 +00:00
}
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"values": {
"string": [
{
"name": "link",
"value": "={{$node[\"IF\"].json[\"link\"]}}"
},
{
"name": "tag",
"value": "={{$node[\"IF\"].json[\"tag\"]}}"
},
{
"name": "city",
"value": "={{$node[\"IF\"].json[\"city\"]}}"
},
{
"name": "date",
"value": "={{$now.toString()}}"
}
]
},
"options": {}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
2980,
180
2022-08-03 21:00:21 +00:00
],
"id": "74d9d7ad-6ea0-423d-84a6-a896b00f24d2"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"url": "={{$json[\"url\"]}}",
"responseFormat": "string",
2022-08-04 21:00:21 +00:00
"options": {}
2022-07-18 21:00:57 +00:00
},
"name": "HTTP Request3",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
2022-08-03 21:00:21 +00:00
780,
0
],
"id": "7093ed10-1cc1-4275-825a-5a2daece858c"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "items",
"cssSelector": "div.css-19ucd76",
"returnValue": "html",
"returnArray": true
}
]
},
"options": {}
},
"name": "HTML Extract3",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
940,
2022-08-03 21:00:21 +00:00
0
],
"id": "ba770d6e-e70e-485b-a737-5b673d6fac73"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"fieldToSplitOut": "items",
"include": "allOtherFields",
2022-08-04 21:00:21 +00:00
"options": {
"destinationFieldName": ""
}
2022-07-18 21:00:57 +00:00
},
"name": "Item Lists1",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
1300,
2022-08-03 21:00:21 +00:00
0
],
"id": "bf3adaed-0ce8-413e-a300-60fea4705d03"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"dataPropertyName": "items",
"extractionValues": {
"values": [
{
"key": "link",
"cssSelector": "a.css-1bbgabe",
"returnValue": "attribute",
"attribute": "href"
},
{
"key": "city",
"cssSelector": "p.css-p6wsjo-Text.eu5v0x0"
}
]
},
"options": {}
},
"name": "HTML Extract4",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
1500,
2022-08-03 21:00:21 +00:00
0
],
"id": "5d8bee6c-1d8b-4135-a4c7-2b4eff38434e"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"link\"]}}",
"operation": "isNotEmpty"
},
{
"value1": "={{$json[\"city\"]}}",
"operation": "contains",
"value2": "Сегодня"
}
]
}
},
"name": "IF1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
1880,
2022-08-03 21:00:21 +00:00
0
],
"id": "290731f6-16e9-492d-8c20-782390d7bf10"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"docId": "d61nLm6Fn99jwqxd6hdT9d",
"tableId": "Url",
2022-08-04 21:00:21 +00:00
"returnAll": true,
2022-07-18 21:00:57 +00:00
"additionalOptions": {}
},
"name": "get url",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
420,
20
],
2022-08-04 21:00:21 +00:00
"id": "c29f1c92-3353-4359-8710-e5e49ee3387e",
2022-07-18 21:00:57 +00:00
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-04 21:00:21 +00:00
}
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "tag",
2022-08-04 21:00:21 +00:00
"value": "={{$node[\"IF3\"].json[\"tag\"]}}"
2022-07-18 21:00:57 +00:00
},
{
"name": "items",
"value": "={{$json[\"items\"]}}"
},
{
"name": "filter",
2022-08-04 21:00:21 +00:00
"value": "={{$node[\"IF3\"].json[\"filter\"]}}"
2022-07-18 21:00:57 +00:00
}
]
},
"options": {}
},
"name": "Set items",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
1120,
2022-08-03 21:00:21 +00:00
0
],
"id": "7361270e-d2e2-40e0-b75f-d4d67d9cf9b7"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"mode": "removeKeyMatches",
"propertyName1": "link",
"propertyName2": "link"
},
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
2120,
2022-08-03 21:00:21 +00:00
0
],
"id": "30464610-8eab-433f-b16d-946b37feb25a"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"docId": "d61nLm6Fn99jwqxd6hdT9d",
"tableId": "Items",
"returnAll": true,
"additionalOptions": {}
},
"name": "Grist2",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
1880,
220
2022-07-18 21:00:57 +00:00
],
2022-08-04 21:00:21 +00:00
"id": "c9981bf9-9680-4285-a541-53d60fc5cb51",
2022-07-18 21:00:57 +00:00
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-04 21:00:21 +00:00
}
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"url": "={{$json[\"link\"]}}",
"responseFormat": "string",
"options": {}
},
"name": "HTTP Request4",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
2022-08-04 21:00:21 +00:00
2560,
2022-08-03 21:00:21 +00:00
-20
],
"id": "840f0f33-51d4-447f-a80b-1b954d693af5"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "price",
"cssSelector": "h3.css-okktvh-Text.eu5v0x0"
},
{
"key": "content",
"cssSelector": "div.css-g5mtbi-Text"
},
{
"key": "image",
"cssSelector": "img.css-1bmvjcs",
"returnValue": "attribute",
"attribute": "src"
},
{
"key": "title",
"cssSelector": "h1.css-r9zjja-Text.eu5v0x0"
}
]
},
"options": {
"trimValues": true
}
},
"name": "HTML Extract5",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
2760,
2022-08-03 21:00:21 +00:00
-20
],
"id": "dd30fb8a-a61d-4ccc-9d1d-9b5b381dbb6f"
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"link\"]}}",
"operation": "contains",
"value2": "={{$json[\"filter\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
2320,
2022-08-03 21:00:21 +00:00
0
],
"id": "15b02816-a39a-4ebd-94d6-829d0fdac228"
2022-07-19 21:00:59 +00:00
},
{
"parameters": {
"chatId": "1684481",
"text": "=#{{$node[\"IF\"].json[\"tag\"]}}\n<b>{{$json[\"title\"]}} - {{$json[\"price\"]}}</b>\n📍 <i>{{$node[\"IF\"].json[\"city\"]}}</i>\n<a href=\"{{$node[\"IF\"].json[\"link\"]}}\">Подробнее</a>",
"additionalFields": {
"parse_mode": "HTML"
}
},
"name": "Telegram",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
2960,
2022-08-03 21:00:21 +00:00
-20
2022-07-19 21:00:59 +00:00
],
2022-08-04 21:00:21 +00:00
"id": "204a3fb3-aea1-4047-9bc0-8a3fa2a88336",
2022-07-19 21:00:59 +00:00
"credentials": {
"telegramApi": {
"id": "31",
"name": "Telegram account"
}
2022-08-04 21:00:21 +00:00
}
2022-07-19 21:00:59 +00:00
},
{
"parameters": {
"values": {
"string": [
{
"name": "link",
"value": "=https://m.olx.ua{{$json[\"link\"]}}"
},
{
"name": "tag",
"value": "={{$node[\"Item Lists1\"].json[\"tag\"]}}"
},
{
"name": "filter",
"value": "={{$node[\"Item Lists1\"].json[\"filter\"]}}"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
2022-08-04 21:00:21 +00:00
1680,
2022-08-03 21:00:21 +00:00
0
],
"id": "4cb8528b-88a3-4cdb-aab8-5ad8f01013d4"
2022-08-01 21:00:31 +00:00
},
{
"parameters": {
"docId": "d61nLm6Fn99jwqxd6hdT9d",
"tableId": "Items",
"returnAll": true,
"additionalOptions": {}
},
"name": "Grist3",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
420,
260
],
2022-08-04 21:00:21 +00:00
"id": "7f5ca892-e4c4-42b0-a11a-1bbcec8463ec",
2022-08-01 21:00:31 +00:00
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-04 21:00:21 +00:00
}
2022-08-01 21:00:31 +00:00
},
{
"parameters": {
"conditions": {
"dateTime": [
{
"value1": "={{ $json[\"data\"] }}",
"operation": "before",
"value2": "={{$today.minus({days: 14}).toString()}}"
}
]
}
},
"name": "IF2",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
820,
260
2022-08-03 21:00:21 +00:00
],
"id": "3151a1cd-04f1-467e-af31-b065c5e55f8d"
2022-08-01 21:00:31 +00:00
},
{
"parameters": {
"value": "={{ $json[\"date\"] }}",
"toFormat": "YYYY-MM-DD",
"options": {
"fromFormat": "X"
}
},
"name": "Date & Time",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [
620,
260
2022-08-03 21:00:21 +00:00
],
"id": "c72abc1d-c604-4624-9be0-40ac2b057409"
2022-08-01 21:00:31 +00:00
},
{
"parameters": {
"operation": "delete",
"docId": "d61nLm6Fn99jwqxd6hdT9d",
"tableId": "Items",
"rowId": "={{ $json[\"id\"] }}"
},
"name": "Grist4",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
1020,
240
],
2022-08-04 21:00:21 +00:00
"id": "aea4fd53-5ea8-4529-9621-60371e5b69c6",
2022-08-01 21:00:31 +00:00
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-04 21:00:21 +00:00
}
2022-08-03 21:00:21 +00:00
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json[\"active\"] }}",
"value2": true
}
]
}
},
"name": "IF3",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
580,
20
],
"id": "6c41f659-aede-46f8-a432-de09d295057e"
2022-07-18 21:00:57 +00:00
}
],
"connections": {
"Cron2": {
"main": [
[
{
"node": "get url",
"type": "main",
"index": 0
2022-08-01 21:00:31 +00:00
},
{
"node": "Grist3",
"type": "main",
"index": 0
2022-07-18 21:00:57 +00:00
}
]
]
},
"Set1": {
"main": [
[
{
"node": "Grist",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request3": {
"main": [
[
{
"node": "HTML Extract3",
"type": "main",
"index": 0
}
]
]
},
"HTML Extract3": {
"main": [
[
{
"node": "Set items",
"type": "main",
"index": 0
}
]
]
},
"Item Lists1": {
"main": [
[
{
"node": "HTML Extract4",
"type": "main",
"index": 0
}
]
]
},
"HTML Extract4": {
"main": [
[
{
2022-07-19 21:00:59 +00:00
"node": "Set",
2022-07-18 21:00:57 +00:00
"type": "main",
"index": 0
}
]
]
},
"IF1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"get url": {
"main": [
[
{
2022-08-03 21:00:21 +00:00
"node": "IF3",
2022-07-18 21:00:57 +00:00
"type": "main",
"index": 0
}
]
]
},
"Set items": {
"main": [
[
{
"node": "Item Lists1",
"type": "main",
"index": 0
}
]
]
},
"Grist2": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request4": {
"main": [
[
{
"node": "HTML Extract5",
"type": "main",
"index": 0
}
]
]
},
2022-08-01 21:00:31 +00:00
"HTML Extract5": {
2022-07-18 21:00:57 +00:00
"main": [
[
{
2022-08-01 21:00:31 +00:00
"node": "Set1",
"type": "main",
"index": 0
},
{
"node": "Telegram",
2022-07-18 21:00:57 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-08-01 21:00:31 +00:00
"IF": {
2022-07-18 21:00:57 +00:00
"main": [
[
{
2022-08-01 21:00:31 +00:00
"node": "HTTP Request4",
2022-07-18 21:00:57 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-08-01 21:00:31 +00:00
"Set": {
2022-07-18 21:00:57 +00:00
"main": [
[
{
2022-08-01 21:00:31 +00:00
"node": "IF1",
2022-07-18 21:00:57 +00:00
"type": "main",
"index": 0
2022-08-01 21:00:31 +00:00
}
]
]
},
"Grist3": {
"main": [
[
2022-07-18 21:00:57 +00:00
{
2022-08-01 21:00:31 +00:00
"node": "Date & Time",
2022-07-18 21:00:57 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-08-01 21:00:31 +00:00
"IF2": {
2022-07-18 21:00:57 +00:00
"main": [
[
{
2022-08-01 21:00:31 +00:00
"node": "Grist4",
2022-07-18 21:00:57 +00:00
"type": "main",
"index": 0
}
]
]
2022-07-19 21:00:59 +00:00
},
2022-08-01 21:00:31 +00:00
"Date & Time": {
2022-07-19 21:00:59 +00:00
"main": [
[
{
2022-08-01 21:00:31 +00:00
"node": "IF2",
2022-07-19 21:00:59 +00:00
"type": "main",
"index": 0
}
]
]
2022-08-03 21:00:21 +00:00
},
"IF3": {
"main": [
[
{
"node": "HTTP Request3",
"type": "main",
"index": 0
}
]
]
2022-07-18 21:00:57 +00:00
}
},
"settings": {
"errorWorkflow": "25"
},
"staticData": null,
2022-12-07 22:01:07 +00:00
"dataLoaded": true,
2022-07-21 21:00:28 +00:00
"pinData": {},
2022-12-07 22:01:07 +00:00
"versionId": "eaf5a435-216b-4d73-bdb7-98f8ea23ad83",
2022-12-21 22:01:02 +00:00
"triggerCount": 1,
2022-07-18 21:00:57 +00:00
"tags": [
{
"createdAt": "2022-06-21T19:20:51.822Z",
2022-10-27 21:01:19 +00:00
"updatedAt": "2022-06-21T19:20:51.822Z",
"id": "3",
"name": "olx"
2022-07-18 21:00:57 +00:00
}
2022-12-07 22:01:07 +00:00
]
2022-07-18 21:00:57 +00:00
}