499 lines
10 KiB
JSON
499 lines
10 KiB
JSON
{
|
|
"id": 27,
|
|
"name": "olx",
|
|
"active": false,
|
|
"nodes": [
|
|
{
|
|
"parameters": {},
|
|
"name": "Start",
|
|
"type": "n8n-nodes-base.start",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
180,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"url": "https://www.olx.ua/d/elektronika/igry-i-igrovye-pristavki/igry-dlya-pristavok/chernigov/?currency=UAH&search%5Border%5D=created_at:desc&search%5Bfilter_enum_console_manufacturers%5D%5B0%5D=2272",
|
|
"responseFormat": "string",
|
|
"options": {}
|
|
},
|
|
"name": "HTTP Request",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 2,
|
|
"position": [
|
|
460,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"extractionValues": {
|
|
"values": [
|
|
{
|
|
"key": "items",
|
|
"cssSelector": "div.css-19ucd76",
|
|
"returnValue": "html",
|
|
"returnArray": true
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"name": "HTML Extract",
|
|
"type": "n8n-nodes-base.htmlExtract",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
680,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"fieldToSplitOut": "items",
|
|
"options": {}
|
|
},
|
|
"name": "Item Lists",
|
|
"type": "n8n-nodes-base.itemLists",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
900,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"dataPropertyName": "items",
|
|
"extractionValues": {
|
|
"values": [
|
|
{
|
|
"key": "title",
|
|
"cssSelector": ".css-v3vynn-Text"
|
|
},
|
|
{
|
|
"key": "link",
|
|
"cssSelector": "a.css-1bbgabe",
|
|
"returnValue": "attribute",
|
|
"attribute": "href"
|
|
},
|
|
{
|
|
"key": "image",
|
|
"cssSelector": ".css-gwhqbt",
|
|
"returnValue": "attribute",
|
|
"attribute": "src"
|
|
},
|
|
{
|
|
"key": "date",
|
|
"cssSelector": "p.css-p6wsjo-Text.eu5v0x0"
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"name": "HTML Extract1",
|
|
"type": "n8n-nodes-base.htmlExtract",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1140,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"url": "=https://www.producthunt.com/feed?category=fintech"
|
|
},
|
|
"name": "ProductHunt RSS Fintech",
|
|
"type": "n8n-nodes-base.rssFeedRead",
|
|
"position": [
|
|
560,
|
|
660
|
|
],
|
|
"typeVersion": 1
|
|
},
|
|
{
|
|
"parameters": {
|
|
"keepOnlySet": true,
|
|
"values": {
|
|
"string": [
|
|
{
|
|
"name": "Startup Name",
|
|
"value": "={{$node[\"ProductHunt RSS Fintech\"].json[\"title\"]}}"
|
|
},
|
|
{
|
|
"name": "Founder",
|
|
"value": "={{$node[\"ProductHunt RSS Fintech\"].json[\"author\"]}}"
|
|
},
|
|
{
|
|
"name": "URL",
|
|
"value": "={{$json[\"link\"]}}"
|
|
},
|
|
{
|
|
"name": "Publication Date",
|
|
"value": "={{$json[\"pubDate\"]}}"
|
|
},
|
|
{
|
|
"name": "Startup Pitch",
|
|
"value": "={{$json[\"content\"]}}"
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"name": "Filter RSS Data1",
|
|
"type": "n8n-nodes-base.set",
|
|
"position": [
|
|
770,
|
|
660
|
|
],
|
|
"typeVersion": 1
|
|
},
|
|
{
|
|
"parameters": {
|
|
"functionCode": "const staticData = getWorkflowStaticData('global');\nconst newRSSIds = items.map(item => item.json[\"Date\"]);\nconst oldRSSIds = staticData.oldRSSIds; \n\nif (!oldRSSIds) {\n staticData.oldRSSIds = newRSSIds;\n return items;\n}\n\n\nconst actualNewRSSIds = newRSSIds.filter((id) => !oldRSSIds.includes(id));\nconst actualNewRSS = items.filter((data) => actualNewRSSIds.includes(data.json['Date']));\nstaticData.oldRSSIds = [...actualNewRSSIds, ...oldRSSIds];\n\nreturn actualNewRSS;\n"
|
|
},
|
|
"name": "Only new",
|
|
"type": "n8n-nodes-base.function",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
970,
|
|
660
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"triggerTimes": {
|
|
"item": [
|
|
{
|
|
"mode": "everyX",
|
|
"value": 15,
|
|
"unit": "minutes"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"name": "Cron2",
|
|
"type": "n8n-nodes-base.cron",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
400,
|
|
660
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"functionCode": "const staticData = getWorkflowStaticData('global');\nconst newRSSIds = items.map(item => item.json[\"Date\"]);\nconst oldRSSIds = staticData.oldRSSIds; \n\nif (!oldRSSIds) {\n staticData.oldRSSIds = newRSSIds;\n return items;\n}\n\n\nconst actualNewRSSIds = newRSSIds.filter((id) => !oldRSSIds.includes(id));\nconst actualNewRSS = items.filter((data) => actualNewRSSIds.includes(data.json['Date']));\nstaticData.oldRSSIds = [...actualNewRSSIds, ...oldRSSIds];\n\nreturn actualNewRSS;\n"
|
|
},
|
|
"name": "Only new1",
|
|
"type": "n8n-nodes-base.function",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1760,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"values": {
|
|
"string": [
|
|
{
|
|
"name": "link",
|
|
"value": "=https://olx.ua{{$json[\"link\"]}}"
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"name": "Set",
|
|
"type": "n8n-nodes-base.set",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1560,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"conditions": {
|
|
"string": [
|
|
{
|
|
"value1": "={{$json[\"title\"]}}",
|
|
"operation": "isNotEmpty"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"name": "IF",
|
|
"type": "n8n-nodes-base.if",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1340,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"operation": "create",
|
|
"docId": "d61nLm6Fn99jwqxd6hdT9d",
|
|
"tableId": "Ps4_games_ch",
|
|
"dataToSend": "autoMapInputs"
|
|
},
|
|
"name": "Grist",
|
|
"type": "n8n-nodes-base.grist",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1760,
|
|
540
|
|
],
|
|
"credentials": {
|
|
"gristApi": {
|
|
"id": "21",
|
|
"name": "Grist account"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"chatId": "1684481",
|
|
"text": "={{$json[\"title\"]}}\n{{$json[\"date\"]}}\n{{$json[\"link\"]}}",
|
|
"additionalFields": {}
|
|
},
|
|
"name": "Telegram",
|
|
"type": "n8n-nodes-base.telegram",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1980,
|
|
300
|
|
],
|
|
"credentials": {
|
|
"telegramApi": {
|
|
"id": "31",
|
|
"name": "Telegram account"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"connections": {
|
|
"Start": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "HTTP Request",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"HTTP Request": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "HTML Extract",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"HTML Extract": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Item Lists",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Item Lists": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "HTML Extract1",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"ProductHunt RSS Fintech": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Filter RSS Data1",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Filter RSS Data1": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Only new",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Cron2": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "HTTP Request",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"HTML Extract1": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "IF",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"IF": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Set",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Only new": {
|
|
"main": [
|
|
[]
|
|
]
|
|
},
|
|
"Set": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Only new1",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Grist": {
|
|
"main": [
|
|
[]
|
|
]
|
|
},
|
|
"Only new1": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Telegram",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"createdAt": "2022-05-27T16:18:47.443Z",
|
|
"updatedAt": "2022-06-09T09:46:18.718Z",
|
|
"settings": {},
|
|
"staticData": {
|
|
"global": {
|
|
"oldRSSIds": [
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null
|
|
]
|
|
}
|
|
},
|
|
"tags": []
|
|
} |