2022-05-28 02:36:44 +00:00
|
|
|
{
|
|
|
|
|
"id": 27,
|
|
|
|
|
"name": "olx",
|
|
|
|
|
"active": false,
|
|
|
|
|
"nodes": [
|
|
|
|
|
{
|
|
|
|
|
"parameters": {},
|
|
|
|
|
"name": "Start",
|
|
|
|
|
"type": "n8n-nodes-base.start",
|
|
|
|
|
"typeVersion": 1,
|
|
|
|
|
"position": [
|
|
|
|
|
240,
|
|
|
|
|
300
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"parameters": {
|
2022-05-31 21:01:01 +00:00
|
|
|
"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",
|
2022-05-28 02:36:44 +00:00
|
|
|
"responseFormat": "string",
|
|
|
|
|
"options": {}
|
|
|
|
|
},
|
|
|
|
|
"name": "HTTP Request",
|
|
|
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
|
|
|
"typeVersion": 2,
|
|
|
|
|
"position": [
|
|
|
|
|
460,
|
|
|
|
|
300
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"parameters": {
|
|
|
|
|
"extractionValues": {
|
|
|
|
|
"values": [
|
|
|
|
|
{
|
2022-05-31 21:01:01 +00:00
|
|
|
"key": "items",
|
2022-06-02 21:00:54 +00:00
|
|
|
"cssSelector": "div.css-wmzjt6",
|
2022-05-28 02:36:44 +00:00
|
|
|
"returnValue": "html",
|
|
|
|
|
"returnArray": true
|
2022-06-02 21:00:54 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"key": "link",
|
|
|
|
|
"cssSelector": "a.css-1bbgabe",
|
|
|
|
|
"returnValue": "attribute",
|
|
|
|
|
"attribute": "href",
|
|
|
|
|
"returnArray": true
|
2022-05-28 02:36:44 +00:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-05-31 21:01:01 +00:00
|
|
|
"options": {}
|
2022-05-28 02:36:44 +00:00
|
|
|
},
|
|
|
|
|
"name": "HTML Extract",
|
|
|
|
|
"type": "n8n-nodes-base.htmlExtract",
|
|
|
|
|
"typeVersion": 1,
|
|
|
|
|
"position": [
|
|
|
|
|
680,
|
|
|
|
|
300
|
|
|
|
|
]
|
2022-05-31 21:01:01 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"parameters": {
|
2022-06-02 21:00:54 +00:00
|
|
|
"operation": "aggregateItems",
|
|
|
|
|
"fieldsToAggregate": {
|
|
|
|
|
"fieldToAggregate": [
|
|
|
|
|
{
|
|
|
|
|
"fieldToAggregate": "items"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"fieldToAggregate": "link"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"options": {
|
|
|
|
|
"mergeLists": false
|
|
|
|
|
}
|
2022-05-31 21:01:01 +00:00
|
|
|
},
|
|
|
|
|
"name": "Item Lists",
|
|
|
|
|
"type": "n8n-nodes-base.itemLists",
|
|
|
|
|
"typeVersion": 1,
|
|
|
|
|
"position": [
|
|
|
|
|
880,
|
|
|
|
|
300
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"parameters": {
|
|
|
|
|
"dataPropertyName": "items",
|
|
|
|
|
"extractionValues": {
|
|
|
|
|
"values": [
|
|
|
|
|
{
|
|
|
|
|
"key": "title",
|
2022-06-02 21:00:54 +00:00
|
|
|
"cssSelector": ".css-v3vynn-Text"
|
2022-05-31 21:01:01 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"key": "link",
|
|
|
|
|
"cssSelector": "a.css-1bbgabe",
|
2022-06-02 21:00:54 +00:00
|
|
|
"returnValue": "html"
|
2022-05-31 21:01:01 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"key": "image",
|
2022-06-02 21:00:54 +00:00
|
|
|
"cssSelector": ".css-gwhqbt",
|
2022-05-31 21:01:01 +00:00
|
|
|
"returnValue": "attribute",
|
|
|
|
|
"attribute": "src"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"key": "price",
|
2022-06-02 21:00:54 +00:00
|
|
|
"cssSelector": ".css-l0108r-Text"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"key": "date",
|
|
|
|
|
"cssSelector": "p.css-p6wsjo-Text.eu5v0x0"
|
2022-05-31 21:01:01 +00:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"options": {}
|
|
|
|
|
},
|
|
|
|
|
"name": "HTML Extract1",
|
|
|
|
|
"type": "n8n-nodes-base.htmlExtract",
|
|
|
|
|
"typeVersion": 1,
|
2022-06-02 21:00:54 +00:00
|
|
|
"position": [
|
|
|
|
|
1160,
|
|
|
|
|
120
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"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": [
|
|
|
|
|
{
|
|
|
|
|
"hour": 20
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"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": [
|
|
|
|
|
880,
|
|
|
|
|
100
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"parameters": {
|
|
|
|
|
"values": {
|
|
|
|
|
"string": [
|
|
|
|
|
{
|
|
|
|
|
"value": "={{undefined}} {{$node[\"HTML Extract\"].json[\"items\"][0]}}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"value": "={{undefined}} {{undefined}}"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"options": {}
|
|
|
|
|
},
|
|
|
|
|
"name": "Set",
|
|
|
|
|
"type": "n8n-nodes-base.set",
|
|
|
|
|
"typeVersion": 1,
|
2022-05-31 21:01:01 +00:00
|
|
|
"position": [
|
|
|
|
|
1100,
|
|
|
|
|
300
|
|
|
|
|
]
|
2022-05-28 02:36:44 +00:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"connections": {
|
|
|
|
|
"Start": {
|
|
|
|
|
"main": [
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"node": "HTTP Request",
|
|
|
|
|
"type": "main",
|
|
|
|
|
"index": 0
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"HTTP Request": {
|
|
|
|
|
"main": [
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"node": "HTML Extract",
|
|
|
|
|
"type": "main",
|
|
|
|
|
"index": 0
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
]
|
2022-05-31 21:01:01 +00:00
|
|
|
},
|
|
|
|
|
"HTML Extract": {
|
|
|
|
|
"main": [
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"node": "Item Lists",
|
|
|
|
|
"type": "main",
|
|
|
|
|
"index": 0
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"Item Lists": {
|
|
|
|
|
"main": [
|
|
|
|
|
[
|
|
|
|
|
{
|
2022-06-02 21:00:54 +00:00
|
|
|
"node": "Set",
|
|
|
|
|
"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
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"Only new": {
|
|
|
|
|
"main": [
|
|
|
|
|
[]
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"Cron2": {
|
|
|
|
|
"main": [
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"node": "ProductHunt RSS Fintech",
|
|
|
|
|
"type": "main",
|
|
|
|
|
"index": 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"node": "HTTP Request",
|
2022-05-31 21:01:01 +00:00
|
|
|
"type": "main",
|
|
|
|
|
"index": 0
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
]
|
2022-05-28 02:36:44 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"createdAt": "2022-05-27T16:18:47.443Z",
|
2022-06-02 21:00:54 +00:00
|
|
|
"updatedAt": "2022-06-02T12:15:56.043Z",
|
2022-05-28 02:36:44 +00:00
|
|
|
"settings": {},
|
|
|
|
|
"staticData": null
|
|
|
|
|
}
|