Files
n8n-backup-v2/workflows/dnhuvwoSObAdZ6Ha.json
2026-01-02 22:48:32 +00:00

155 lines
3.6 KiB
JSON

{
"id": "dnhuvwoSObAdZ6Ha",
"name": "Post RSS feed items from yesterday to Slack",
"nodes": [
{
"parameters": {
"functionCode": "// Create our Slack message\n// This will output a list of RSS items in the following format\n// Title - Description\nlet message = \"*:new: Posts from yesterday :new:*\\n\\n\";\n\n// Loop the input items\nfor (item of items) {\n message += \"*<\" + item.json.link + \"|\" + item.json.title + \">*\\n\" + item.json.contentSnippet + \"\\n\\n\"; \n}\n\n// Return our message\nreturn [{json: {message}}];"
},
"name": "Build our message",
"type": "n8n-nodes-base.function",
"position": [
368,
240
],
"typeVersion": 1,
"id": "cb2da17f-e839-420a-bde5-45a7f4717118"
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 8
}
]
}
},
"name": "Every Morning",
"type": "n8n-nodes-base.cron",
"position": [
-416,
272
],
"typeVersion": 1,
"id": "961e8b96-1de5-44da-9f61-3c829b0dfead"
},
{
"parameters": {
"action": "calculate",
"value": "={{Date()}}",
"operation": "subtract",
"duration": 1,
"options": {}
},
"name": "Get Yesterdays Date",
"type": "n8n-nodes-base.dateTime",
"position": [
-240,
272
],
"typeVersion": 1,
"id": "960ec636-ff35-486f-bafd-0808bc5c9969"
},
{
"parameters": {
"url": "https://n8n.io/blog/rss",
"options": {}
},
"name": "Get the RSS Feed",
"type": "n8n-nodes-base.rssFeedRead",
"position": [
-48,
272
],
"typeVersion": 1,
"id": "9b4912a7-adf3-4bba-8fc6-207c4973abf2"
},
{
"parameters": {
"conditions": {
"dateTime": [
{
"value1": "={{$item(0).$node[\"Get Yesterdays Date\"].json.data}}",
"operation": "before",
"value2": "={{$json[\"pubDate\"]}}"
}
]
}
},
"name": "If it was published after yesterday",
"type": "n8n-nodes-base.if",
"position": [
160,
272
],
"typeVersion": 1,
"id": "7a4f841b-38c8-4e5a-92cd-16b8ba3ba495",
"continueOnFail": true
}
],
"connections": {
"Every Morning": {
"main": [
[
{
"node": "Get Yesterdays Date",
"type": "main",
"index": 0
}
]
]
},
"Get the RSS Feed": {
"main": [
[
{
"node": "If it was published after yesterday",
"type": "main",
"index": 0
}
]
]
},
"Build our message": {
"main": [
[]
]
},
"Get Yesterdays Date": {
"main": [
[
{
"node": "Get the RSS Feed",
"type": "main",
"index": 0
}
]
]
},
"If it was published after yesterday": {
"main": [
[
{
"node": "Build our message",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"triggerCount": 0,
"versionId": "44effa1f-4485-4803-8049-970f8fffcfc1",
"owner": {
"type": "personal",
"projectId": "FeLO36wNUAcn61Wj",
"projectName": "Ben W <admin@ben.io>",
"personalEmail": "admin@ben.io"
},
"parentFolderId": null,
"isArchived": true
}