Task: Share Fedora Magazine blog posts to LinkedIn

n8n workflow:
{"id":4,"name":"Fedora Magazineshare to Linkedin","nodes":[{"name":"Diff","type":"n8n-nodes-base.function","position":[130,470],"parameters":{"functionCode":"const articles_new = items[0].json.articles;\nconst articles_old = items[1].json.articles;\n/*const difference = articles_new.filter((el) => {\n *return articles_old.some((f) => {\n *   return f.link === el.link && f.title === el.title && f.description === el.description;\n * });\n *});\n */\n//const difference = articles_new.filter(x.link => !articles_old.includes(x.link));\nconst difference = articles_new.filter(({ link: id1 }) => !articles_old.some(({ link: id2 }) => id2 === id1));\nconsole.log(difference);\nreturn [{ json: {\n  \"old\": articles_old,\n  \"new\": articles_new,\n  \"diff\": difference\n} }];"},"typeVersion":1},{"name":"Get Sitemap","type":"n8n-nodes-base.httpRequest","position":[-530,470],"parameters":{"url":"https://fedoramagazine.org/feed/","options":{},"responseFormat":"string"},"typeVersion":1},{"name":"Extract URLs","type":"n8n-nodes-base.function","position":[-240,460],"parameters":{"functionCode":"const articles = [];\nfor (const item of items) {\n  for (const url of item.json.rss.channel.item) {\n    articles.push( { title: url.title.replace(/[?&#x?[0-9]+;]?/gm, ''), link: url.link, description: url.description.replace(/<(?:.|\\n)*?>/gm, '').replace(/[?&#x?[0-9]+;]?/gm, '') });\n  }\n}\nreturn [ { json: { articles: articles}} ];\n"},"typeVersion":1},{"name":"Old and New","type":"n8n-nodes-base.merge","position":[-50,580],"parameters":{},"typeVersion":1},{"name":"Read Old","type":"n8n-nodes-base.readBinaryFile","position":[-530,650],"parameters":{"filePath":"/home/node/.n8n/old_fedora.json"},"typeVersion":1,"continueOnFail":true},{"name":"Write Old","type":"n8n-nodes-base.writeBinaryFile","position":[450,650],"parameters":{"fileName":"/home/node/.n8n/old_fedora.json"},"typeVersion":1},{"name":"Select New","type":"n8n-nodes-base.function","position":[130,650],"parameters":{"functionCode":"return [ items[0] ];"},"typeVersion":1},{"name":"XML to JSON","type":"n8n-nodes-base.xml","position":[-380,470],"parameters":{"options":{}},"typeVersion":1},{"name":"Data to JSON","type":"n8n-nodes-base.moveBinaryData","position":[-380,650],"parameters":{"options":{"keepSource":false}},"typeVersion":1},{"name":"JSON to Data","type":"n8n-nodes-base.moveBinaryData","position":[290,650],"parameters":{"mode":"jsonToBinary","options":{}},"typeVersion":1},{"name":"Cron","type":"n8n-nodes-base.cron","position":[-740,470],"parameters":{"triggerTimes":{"item":[{"mode":"everyHour"}]}},"typeVersion":1},{"name":"IF","type":"n8n-nodes-base.if","position":[290,470],"parameters":{"conditions":{"number":[{"value1":"={{$node[\"Diff\"].json[\"diff\"].length}}","operation":"larger"}],"string":[]}},"typeVersion":1},{"name":"Clear Old","type":"n8n-nodes-base.writeBinaryFile","position":[-210,900],"parameters":{"fileName":"/home/node/.n8n/old_fedora.json"},"typeVersion":1},{"name":"Function","type":"n8n-nodes-base.function","position":[-540,900],"parameters":{"functionCode":"items[0].json.articles = [];\nreturn items;"},"typeVersion":1},{"name":"JSON to Data1","type":"n8n-nodes-base.moveBinaryData","position":[-370,900],"parameters":{"mode":"jsonToBinary","options":{}},"typeVersion":1},{"name":"LinkedIn","type":"n8n-nodes-base.linkedIn","position":[660,450],"parameters":{"text":"={{$json[\"description\"]}}","person":"SnT0gtcclr","postAs":"person","additionalFields":{"title":"={{$json[\"title\"]}}","visibility":"PUBLIC","originalUrl":"= {{$json[\"link\"]}}"},"shareMediaCategory":"ARTICLE"},"credentials":{"linkedInOAuth2Api":{"id":"1","name":"LinkedIn Profile"}},"typeVersion":1},{"name":"UnEscape HTML texts","type":"n8n-nodes-base.function","position":[460,440],"parameters":{"functionCode":"const articles = [];\nfor ( item in items[0].json.diff ) {\n  items[0].json.diff[item].description = unescape(items[0].json.diff[item].description) + \"\\n\\n\\n\" + \"Read more on the following blog article!\";\n  items[0].json.diff[item].title = unescape(items[0].json.diff[item].title) + \"\\n\\n\";\n  articles.push(items[0].json.diff[item]);\n}\nreturn articles.map(item => {\n  return {\n    json: item\n  }\n});\n"},"typeVersion":1}],"active":true,"settings":{"timezone":"Europe/Bucharest","saveManualExecutions":true,"saveExecutionProgress":true},"connections":{"IF":{"main":[[{"node":"UnEscape HTML texts","type":"main","index":0}]]},"Cron":{"main":[[{"node":"Get Sitemap","type":"main","index":0}]]},"Diff":{"main":[[{"node":"IF","type":"main","index":0}]]},"Function":{"main":[[{"node":"JSON to Data1","type":"main","index":0}]]},"Read Old":{"main":[[{"node":"Data to JSON","type":"main","index":0}]]},"Select New":{"main":[[{"node":"JSON to Data","type":"main","index":0}]]},"Get Sitemap":{"main":[[{"node":"XML to JSON","type":"main","index":0}]]},"Old and New":{"main":[[{"node":"Diff","type":"main","index":0},{"node":"Select New","type":"main","index":0}]]},"XML to JSON":{"main":[[{"node":"Extract URLs","type":"main","index":0}]]},"Data to JSON":{"main":[[{"node":"Old and New","type":"main","index":1}]]},"Extract URLs":{"main":[[{"node":"Old and New","type":"main","index":0}]]},"JSON to Data":{"main":[[{"node":"Write Old","type":"main","index":0}]]},"JSON to Data1":{"main":[[{"node":"Clear Old","type":"main","index":0}]]},"UnEscape HTML texts":{"main":[[{"node":"LinkedIn","type":"main","index":0}]]}}}