2022-05-31 21:01:01 +00:00
{
"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
} ,
{
"parameters" : {
"fieldToSplitOut" : "post" ,
"options" : { }
} ,
"name" : "Item Lists" ,
"type" : "n8n-nodes-base.itemLists" ,
"position" : [
1120 ,
500
] ,
"typeVersion" : 1
} ,
{
"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
} ,
{
"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
} ,
{
"parameters" : {
"values" : {
"string" : [
{
"name" : "base_domain" ,
"value" : "https://baserow.io"
}
]
} ,
"options" : { }
} ,
"name" : "Set URL" ,
"type" : "n8n-nodes-base.set" ,
"position" : [
460 ,
500
] ,
"typeVersion" : 1
} ,
{
"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
} ,
{
"parameters" : {
"value" : "={{$json[\"date\"]}}" ,
"dataPropertyName" : "date" ,
"toFormat" : "YYYY-MM-DD" ,
"options" : { }
} ,
"name" : "Format Date" ,
"type" : "n8n-nodes-base.dateTime" ,
"position" : [
460 ,
700
] ,
"typeVersion" : 1
} ,
{
"parameters" : {
"functionCode" : "return {\n rss_item: \n`<item>\n <title>${item.title}</title>\n <link>${item.link}</link>\n <description>${item.description}</description>\n <pubDate>${item.date}</pubDate>\n</item>`\n}"
} ,
"name" : "Create RSS Items" ,
"type" : "n8n-nodes-base.functionItem" ,
"position" : [
680 ,
700
] ,
"typeVersion" : 1
} ,
{
"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
} ,
{
"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
} ,
{
"parameters" : {
"functionCode" : "let feed =\n`<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<rss version=\"2.0\">\n\n<channel>\n <title>Baserow Releases</title>\n <link>https://baserow.io/blog/category/release</link>\n <description>Stay up to date with the latest changes and updates of Baserow</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 Response" ,
"type" : "n8n-nodes-base.function" ,
"position" : [
900 ,
700
] ,
"typeVersion" : 1
} ,
{
"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
}
] ,
"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
}
]
]
}
} ,
"createdAt" : "2022-05-31T09:49:28.474Z" ,
"updatedAt" : "2022-05-31T09:49:28.474Z" ,
"settings" : { } ,
2022-06-09 21:00:39 +00:00
"staticData" : null ,
2022-07-20 21:00:15 +00:00
"pinData" : null ,
2022-06-09 21:00:39 +00:00
"tags" : [ ]
2022-05-31 21:01:01 +00:00
}