n8n Workflow

Get Only New Rss With Photo

This n8n workflow retrieves tasks and integrates with various services. Get Only New Rss With Photo - ready to import and run in your n8n instance.

n8n workflow.json

About This Script

This n8n workflow retrieves tasks and integrates with various services. Get Only New Rss With Photo - ready to import and run in your n8n instance.
Features:
  • Scheduled automation with cron triggers
  • Custom JavaScript function processing
  • Retrieves data from external sources
Source Code
{
    "nodes": [
        {
            "name": "Cron",
            "type": "n8n-nodes-base.cron",
            "position": [
                1050,
                920
            ],
            "parameters": {
                "triggerTimes": {
                    "item": [
                        {
                            "mode": "everyX",
                            "unit": "minutes",
                            "value": 5
                        }
                    ]
                }
            },
            "typeVersion": 1,
            "id": "b7409776-bec8-4c43-9578-aca5690694ca"
        },
        {
            "name": "RSS Feed Read",
            "type": "n8n-nodes-base.rssFeedRead",
            "position": [
                1220,
                920
            ],
            "parameters": {
                "url": "http://www.theverge.com/rss/full.xml"
            },
            "executeOnce": true,
            "typeVersion": 1,
            "id": "ad7052b0-5bf1-4d10-a407-6a2ee6fb81c9"
        },
        {
            "name": "Extract Image1",
            "type": "n8n-nodes-base.htmlExtract",
            "position": [
                1740,
                920
            ],
            "parameters": {
                "options": [],
                "dataPropertyName": "=content",
                "extractionValues": {
                    "values": [
                        {
                            "key": "image",
                            "attribute": "src",
                            "cssSelector": "img",
                            "returnValue": "attribute"
                        }
                    ]
                }
            },
            "typeVersion": 1,
            "id": "535fc1da-8526-409c-aed7-ce9ba24d69f9"
        },
        {
            "name": "Filter RSS Data",
            "type": "n8n-nodes-base.set",
            "position": [
                1390,
                920
            ],
            "parameters": {
                "values": {
                    "string": [
                        {
                            "name": "Title",
                            "value": "={{$node[\"RSS Feed Read\"].json[\"title\"]}}"
                        },
                        {
                            "name": "Subtitle",
                            "value": "={{$json[\"contentSnippet\"]}}"
                        },
                        {
                            "name": "Author",
                            "value": "={{$json[\"creator\"]}}"
                        },
                        {
                            "name": "URL",
                            "value": "={{$node[\"RSS Feed Read\"].json[\"link\"]}}"
                        },
                        {
                            "name": "Date",
                            "value": "={{$node[\"RSS Feed Read\"].json[\"pubDate\"]}}"
                        },
                        {
                            "name": "content",
                            "value": "={{$json[\"content\"]}}"
                        }
                    ]
                },
                "options": [],
                "keepOnlySet": true
            },
            "typeVersion": 1,
            "id": "cb1344ce-fdad-4052-ae21-6f10ef6bc616"
        },
        {
            "name": "Only get new RSS1",
            "type": "n8n-nodes-base.function",
            "position": [
                1560,
                920
            ],
            "parameters": {
                "functionCode": "const staticData = getWorkflowStaticData('global');\nconst newRSSIds = items.map(item => item.json[\"Date\"]);\nconst oldRSSIds = staticData.oldRSSIds; \n\nif (!oldRSSIds) {\n  staticData.oldRSSIds = newRSSIds;\n  return items;\n}\n\n\nconst actualNewRSSIds = newRSSIds.filter((id) => !oldRSSIds.includes(id));\nconst actualNewRSS = items.filter((data) => actualNewRSSIds.includes(data.json['Date']));\nstaticData.oldRSSIds = [...actualNewRSSIds, ...oldRSSIds];\n\nreturn actualNewRSS;\n"
            },
            "typeVersion": 1,
            "id": "61edad9c-f5aa-4c02-8529-faaba8a7c595"
        }
    ],
    "connections": {
        "Cron": {
            "main": [
                [
                    {
                        "node": "RSS Feed Read",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "RSS Feed Read": {
            "main": [
                [
                    {
                        "node": "Filter RSS Data",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Extract Image1": {
            "main": [
                []
            ]
        },
        "Filter RSS Data": {
            "main": [
                [
                    {
                        "node": "Only get new RSS1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Only get new RSS1": {
            "main": [
                [
                    {
                        "node": "Extract Image1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n #automation #workflow
Quick Actions
More in n8n Workflows