{ "createdAt": "2022-05-31T09:49:28.474Z", "updatedAt": "2022-05-31T09:49:28.474Z", "id": 29, "name": "Create an RSS feed based on a website's content", "active": false, "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "position": [ 240, 500 ], "typeVersion": 1, "id": "cba09900-6a6f-43f3-964f-6408e2cf351a" }, { "parameters": { "fieldToSplitOut": "post", "options": {} }, "name": "Item Lists", "type": "n8n-nodes-base.itemLists", "position": [ 1120, 500 ], "typeVersion": 1, "id": "8fbef149-cb43-43aa-a8c5-dae3ac23024d" }, { "parameters": { "extractionValues": { "values": [ { "key": "post", "cssSelector": ".blog-listing__post-content", "returnValue": "html", "returnArray": true } ] }, "options": {} }, "name": "Extract Posts", "type": "n8n-nodes-base.htmlExtract", "position": [ 900, 500 ], "typeVersion": 1, "id": "a26babf7-1137-4ba2-8bb7-b377e849a021" }, { "parameters": { "url": "={{$json[\"base_domain\"]}}/blog/category/release", "responseFormat": "string", "options": { "timeout": 10000 } }, "name": "Fetch Website", "type": "n8n-nodes-base.httpRequest", "position": [ 680, 500 ], "typeVersion": 1, "id": "07307d2e-eda0-4e20-9419-17b14076e422" }, { "parameters": { "values": { "string": [ { "name": "base_domain", "value": "https://baserow.io" } ] }, "options": {} }, "name": "Set URL", "type": "n8n-nodes-base.set", "position": [ 460, 500 ], "typeVersion": 1, "id": "175f2bda-1c7d-4ee5-8f78-107a032d80f5" }, { "parameters": { "values": { "string": [ { "name": "link", "value": "={{$item(0).$node[\"Set URL\"].json[\"base_domain\"]}}{{$json[\"link\"]}}" } ] }, "options": {} }, "name": "Complete Link", "type": "n8n-nodes-base.set", "position": [ 240, 700 ], "typeVersion": 1, "id": "b9bd43f8-90a9-498a-a94a-929cc3d7695a" }, { "parameters": { "value": "={{$json[\"date\"]}}", "dataPropertyName": "date", "toFormat": "YYYY-MM-DD", "options": {} }, "name": "Format Date", "type": "n8n-nodes-base.dateTime", "position": [ 460, 700 ], "typeVersion": 1, "id": "d00da3fc-7b62-46ff-a608-dc9c8ea1762e" }, { "parameters": { "functionCode": "return {\n rss_item: \n`\n ${item.title}\n ${item.link}\n ${item.description}\n ${item.date}\n`\n}" }, "name": "Create RSS Items", "type": "n8n-nodes-base.functionItem", "position": [ 680, 700 ], "typeVersion": 1, "id": "449c1bab-cc51-42dd-a579-a4ef5adae1bb" }, { "parameters": { "path": "baserow-releases", "responseMode": "responseNode", "options": {} }, "name": "Webhook", "type": "n8n-nodes-base.webhook", "position": [ 240, 300 ], "webhookId": "27c1e4db-568f-4bf9-9474-0898ce1173f7", "typeVersion": 1, "id": "652255e2-7c7b-4855-ab91-bc24925b7f87" }, { "parameters": { "respondWith": "text", "responseBody": "={{$json[\"feed\"]}}", "options": { "responseHeaders": { "entries": [ { "name": "content-type", "value": "application/xml" } ] } } }, "name": "Respond to Webhook", "type": "n8n-nodes-base.respondToWebhook", "position": [ 1120, 700 ], "typeVersion": 1, "id": "748e594b-8726-4145-b2d3-eca23491df66" }, { "parameters": { "functionCode": "let feed =\n`\n\n\n\n Baserow Releases\n https://baserow.io/blog/category/release\n Stay up to date with the latest changes and updates of Baserow\n ${items.map(e => e.json.rss_item).join('\\n')}\n\n\n`;\n\nreturn [{\n json: {\n feed: feed\n }\n}];" }, "name": "Prepare Response", "type": "n8n-nodes-base.function", "position": [ 900, 700 ], "typeVersion": 1, "id": "2faaa0fa-823e-4c81-a225-35cbdd908972" }, { "parameters": { "dataPropertyName": "post", "extractionValues": { "values": [ { "key": "date", "cssSelector": ".blog-listing__post-info > strong" }, { "key": "title", "cssSelector": ".blog-listing__post-title" }, { "key": "link", "cssSelector": ".blog-listing__post-title > a", "returnValue": "attribute", "attribute": "href" }, { "key": "description", "cssSelector": ".blog-listing__post-description" } ] }, "options": {} }, "name": "Extract Fields", "type": "n8n-nodes-base.htmlExtract", "position": [ 1340, 500 ], "typeVersion": 1, "id": "7863e9cd-e241-4e42-b209-0e238a4e32bc" } ], "connections": { "Start": { "main": [ [ { "node": "Set URL", "type": "main", "index": 0 } ] ] }, "Set URL": { "main": [ [ { "node": "Fetch Website", "type": "main", "index": 0 } ] ] }, "Webhook": { "main": [ [ { "node": "Set URL", "type": "main", "index": 0 } ] ] }, "Item Lists": { "main": [ [ { "node": "Extract Fields", "type": "main", "index": 0 } ] ] }, "Format Date": { "main": [ [ { "node": "Create RSS Items", "type": "main", "index": 0 } ] ] }, "Complete Link": { "main": [ [ { "node": "Format Date", "type": "main", "index": 0 } ] ] }, "Extract Posts": { "main": [ [ { "node": "Item Lists", "type": "main", "index": 0 } ] ] }, "Fetch Website": { "main": [ [ { "node": "Extract Posts", "type": "main", "index": 0 } ] ] }, "Extract Fields": { "main": [ [ { "node": "Complete Link", "type": "main", "index": 0 } ] ] }, "Create RSS Items": { "main": [ [ { "node": "Prepare Response", "type": "main", "index": 0 } ] ] }, "Prepare Response": { "main": [ [ { "node": "Respond to Webhook", "type": "main", "index": 0 } ] ] } }, "settings": {}, "staticData": null, "dataLoaded": false, "pinData": null, "versionId": "b24bba17-7774-41c7-8476-6db2c3a3b11d", "triggerCount": 0, "tags": [] }