Auto backup (2022-06-02T21:00:54.563Z)

This commit is contained in:
nia
2022-06-02 21:00:54 +00:00
parent 8b4adbe7cb
commit 71f0127ee4
5 changed files with 196 additions and 18 deletions

View File

@@ -162,11 +162,11 @@
}
},
"createdAt": "2022-04-29T05:12:17.339Z",
"updatedAt": "2022-06-01T16:45:40.498Z",
"updatedAt": "2022-06-02T13:19:06.965Z",
"settings": {},
"staticData": {
"node:IMAP Email": {
"lastMessageUid": 6266
"lastMessageUid": 6269
}
}
}

View File

@@ -33,9 +33,16 @@
"values": [
{
"key": "items",
"cssSelector": "div.css-19ucd76",
"cssSelector": "div.css-wmzjt6",
"returnValue": "html",
"returnArray": true
},
{
"key": "link",
"cssSelector": "a.css-1bbgabe",
"returnValue": "attribute",
"attribute": "href",
"returnArray": true
}
]
},
@@ -51,8 +58,20 @@
},
{
"parameters": {
"fieldToSplitOut": "items",
"options": {}
"operation": "aggregateItems",
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "items"
},
{
"fieldToAggregate": "link"
}
]
},
"options": {
"mergeLists": false
}
},
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
@@ -69,23 +88,26 @@
"values": [
{
"key": "title",
"cssSelector": "h6.css-v3vynn-Text.eu5v0x0"
"cssSelector": ".css-v3vynn-Text"
},
{
"key": "link",
"cssSelector": "a.css-1bbgabe",
"returnValue": "attribute",
"attribute": "href"
"returnValue": "html"
},
{
"key": "image",
"cssSelector": "img",
"cssSelector": ".css-gwhqbt",
"returnValue": "attribute",
"attribute": "src"
},
{
"key": "price",
"cssSelector": "p"
"cssSelector": ".css-l0108r-Text"
},
{
"key": "date",
"cssSelector": "p.css-p6wsjo-Text.eu5v0x0"
}
]
},
@@ -94,6 +116,119 @@
"name": "HTML Extract1",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"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,
"position": [
1100,
300
@@ -138,7 +273,50 @@
"main": [
[
{
"node": "HTML Extract1",
"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",
"type": "main",
"index": 0
}
@@ -147,7 +325,7 @@
}
},
"createdAt": "2022-05-27T16:18:47.443Z",
"updatedAt": "2022-05-31T17:44:57.696Z",
"updatedAt": "2022-06-02T12:15:56.043Z",
"settings": {},
"staticData": null
}