Node-RED Feedparser Node
This package provides a Node-RED node, `node-red-node-feedparser`, designed to monitor and parse RSS and Atom feeds. It is currently at version 1.0.5 and is part of the official Node-RED nodes collection, suggesting an active maintenance schedule tied to Node-RED's own releases. The node differentiates itself by integrating directly into Node-RED flows, allowing users to easily consume and process feed data within a visual programming environment without writing custom parsing logic. It handles the polling of feeds at configurable intervals and outputs structured data for each article, including title, description, link, and a complete article object. A key change in version 1.0 involved a rewrite to remove the deprecated `request` library and switch to a new parsing engine, resulting in changes to the output data structure.
Common errors
-
Error: ETIMEDOUT
-
Error: getaddrinfo ENOTFOUND
cause The configured RSS/Atom feed URL is inaccessible, incorrect, or the Node-RED instance lacks internet connectivity.fixVerify the feed URL is correct and reachable from where Node-RED is running. Check network connectivity and proxy settings if applicable. Ensure the feed server is operational. -
TypeError: Cannot read properties of undefined (reading 'title')
-
TypeError: Cannot read properties of null (reading 'description')
cause A downstream node is attempting to access a property (e.g., `msg.payload.title` or `msg.article.title`) that does not exist on the incoming message object, often due to changes in the feedparser's output format (especially post-v1.0) or incorrect 'Return single object' setting.fixInspect the exact output of the `feedparser` node using a debug node configured to display 'complete msg object'. Adjust your function or change nodes to correctly reference the available properties, considering the output differences for 'Return single object' mode or the v1.0 breaking changes.
Warnings
- breaking The node was re-written in v1.0, removing the deprecated `request` library and adopting a new parsing library. This change alters the structure and properties of the returned data (`msg.topic`, `msg.payload`, `msg.link`, `msg.article`), requiring users to update their flows to accommodate the new output format.
- gotcha The refresh interval for polling feeds is capped at 35790 minutes (approximately 24.8 days). Attempting to set an interval higher than this limit will likely result in the node defaulting to the maximum or exhibiting unexpected behavior.
- gotcha When the node is configured to 'return a single object', the output properties differ significantly from the default 'return each article' mode. In single object mode, the complete original response from the parsing library is returned, which may not contain `msg.topic`, `msg.payload`, or `msg.link` as top-level properties.
Install
-
npm install node-red-node-feedparser -
yarn add node-red-node-feedparser -
pnpm add node-red-node-feedparser
Quickstart
npm install node-red-node-feedparser # After installation, restart Node-RED and open the editor (e.g., http://localhost:1880). # Drag the 'feedparser' node from the palette onto your flow. # Configure it by setting a 'Feed URL' and an 'Interval' (e.g., 15 minutes). # Connect the node's output to a 'debug' node (configured to display 'complete msg object') # to observe the parsed feed articles in the debug sidebar.