Files
n8n/flows/53.json

194 lines
4.3 KiB
JSON
Raw Normal View History

2022-07-15 21:00:57 +00:00
{
"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": [
2022-07-18 21:00:57 +00:00
1420,
2022-07-15 21:00:57 +00:00
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": [
2022-07-18 21:00:57 +00:00
1220,
2022-07-15 21:00:57 +00:00
320
],
"typeVersion": 1
},
{
"parameters": {
2022-07-18 21:00:57 +00:00
"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 <enclosure url=\"${item.image}\" type=\"image/jpg\" />\n <category>${item.tag}</category>\n</item>`\n}"
2022-07-15 21:00:57 +00:00
},
"name": "Create RSS Items1",
"type": "n8n-nodes-base.functionItem",
"position": [
2022-07-18 21:00:57 +00:00
1020,
2022-07-15 21:00:57 +00:00
320
],
"typeVersion": 1
2022-07-18 21:00:57 +00:00
},
{
"parameters": {
"operation": "limit",
"maxItems": 10,
"keep": "lastItems"
},
"name": "Item Lists1",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
800,
320
]
2022-07-15 21:00:57 +00:00
}
],
"connections": {
"Grist1": {
"main": [
[
{
2022-07-18 21:00:57 +00:00
"node": "Item Lists1",
2022-07-15 21:00:57 +00:00
"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
}
]
]
2022-07-18 21:00:57 +00:00
},
"Item Lists1": {
"main": [
[
{
"node": "Create RSS Items1",
"type": "main",
"index": 0
}
]
]
2022-07-15 21:00:57 +00:00
}
},
"createdAt": "2022-07-15T11:11:44.964Z",
2022-07-18 21:00:57 +00:00
"updatedAt": "2022-07-18T20:13:30.287Z",
2022-07-15 21:00:57 +00:00
"settings": {
"errorWorkflow": "25"
},
"staticData": null,
"tags": [
{
"id": "3",
"name": "olx",
"createdAt": "2022-06-21T19:20:51.822Z",
"updatedAt": "2022-06-21T19:20:51.822Z"
}
]
}