Skip to main content
Data Connectors · Information

RSS Feed

The node fetches an RSS or Atom feed, filters out entries it has already seen and emits every new post as a single NewsObserved object. It is designed for news, press releases and event announcements published by municipalities and associations.

  • Data source
  • Trigger-based
  • NewsObserved
Node type
rss-feed
Package
@htag/node-red-contrib-hypertegrity-information
Inputs / outputs
1 / 1
Data source
Any public RSS or Atom feed

When to use this node​

Many municipalities, public authorities and associations publish their news as an RSS or Atom feed. The RSS Feed node brings these posts into a Node-RED flow without requiring you to parse the feed format yourself. Every post is forwarded only once, even if the feed is polled several times a day.

Typical use cases are:

  • Municipal news transferred into an NGSI-LD context broker so that dashboards and apps can display them.
  • Press releases from several sources merged into one common data model.
  • Event announcements polled regularly, with only new entries passed on for further processing.

How the node works​

1

Trigger

An incoming message starts the fetch. The node never polls the feed on its own.

2

Fetch and parse

The feed is downloaded and split into individual entries. RSS and Atom are supported alike.

3

Filter duplicates

Each entry is compared with a stored cache by its GUID. Known entries are skipped.

4

Emit

Every new entry leaves the node as its own message carrying a flat NewsObserved object.

Result: A stream of individual, previously unseen posts that can be passed directly to the NGSI-LD Builder.

The node is deliberately trigger-based. Combine it with an Inject node that fires at a fixed interval, for example every 15 minutes. This keeps the polling frequency under your control and avoids unnecessary load on the feed provider.

Configuration​

You find the settings in the node's edit dialog on the Settings tab. The Information tab contains notes on character encoding.

FieldTypeDefaultMeaning
NameTextemptyDisplay name of the node in the flow.
RSS URLTyped input (str, msg, flow, global, env)emptyAddress of the feed. As plain text you may use environment variables in the form ${NAME}.
Cache sizeNumber (num, flow, global, env)100Number of GUIDs the node remembers. Older entries drop out on a FIFO basis and may be emitted again.
Enable URL encodingCheckboxenabledURL-encodes title and description and replaces brackets. Emojis are always removed regardless of this setting.
Choosing the cache size

The cache size should be larger than the number of entries the feed delivers at once. If a feed always returns the latest 50 posts, a cache of 100 entries is a sensible value.

Input​

The input serves as trigger and as control channel. Any message without a control command starts a fetch.

PropertyTypeMeaning
msg.payloadanyTriggers the fetch. If the payload contains one of the control commands below, only the cache is modified and no feed is fetched.
msg.payload = "flush"stringClears the entire GUID cache. The next fetch emits all entries again.
msg.payload = "flush_first"stringRemoves the oldest entry from the cache.
msg.payload = "<GUID or URL>"stringRemoves exactly this entry from the cache so that the corresponding post is emitted again. Strings starting with http, containing a slash or longer than 10 characters are recognised.
msg.flushCache = truebooleanClears the cache and still performs the fetch afterwards.
msg.urlstringUsed when the RSS URL in the dialog is set to type msg with path url.

Output​

For every new post the node sends a separate message. The payload is a flat object modelled on the Smart Data Model NewsObserved that can be handed to the NGSI-LD Builder without further transformation.

{
"id": "https___www_exampletown_org_news_new_town_hall",
"type": "NewsObserved",
"dateObserved": "2026-10-01T08:15:00.000Z",
"newsTitle": "New%20town%20hall%20opened",
"newsIntro": "The%20town%20opens%20...",
"publishedAt": "2026-09-30T14:00:00.000Z",
"newsUrl": "https://www.exampletown.org/news/new-town-hall"
}
FieldMeaning
idDerived from the post's GUID. All characters except letters and digits are replaced by _.
typeAlways NewsObserved.
dateObservedTime of the fetch in ISO 8601 format.
newsTitleTitle of the post, sanitised and URL-encoded when encoding is enabled.
newsIntroSummary or content of the post, sanitised in the same way.
publishedAtPublication date from the feed. If missing, the fetch time is used.
newsUrlLink to the full post.

With URL encoding enabled, texts are stored encoded in the database. The Information tab of the node shows a PostgreSQL function that decodes the texts again in queries.

Example flow​

The package ships with an example flow. Import it in Node-RED via Menu → Import → Examples → @htag/node-red-contrib-hypertegrity-information → rss-feed.

Step 1

Inject

An Inject node triggers the fetch manually or at a fixed interval.

Step 2

RSS Feed

The node fetches the configured feed and emits new entries one by one.

Step 3

Debug

A Debug node shows the NewsObserved objects in the sidebar.

Show example flow as JSON
[
{"id": "tab1", "type": "tab", "label": "RSS Feed", "disabled": false, "info": ""},
{"id": "inject1", "type": "inject", "z": "tab1", "name": "", "props": [{"p": "payload"}, {"p": "topic", "vt": "str"}], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 160, "y": 140, "wires": [["rss1"]]},
{"id": "rss1", "type": "rss-feed", "z": "tab1", "name": "St. Katharinen", "url": "https://www.st-katharinen.de/rss-news", "urlType": "str", "cacheSize": 100, "cacheSizeType": "num", "encodeTextMode": true, "x": 420, "y": 140, "wires": [["debug1"]]},
{"id": "debug1", "type": "debug", "z": "tab1", "name": "RSS output", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 680, "y": 140, "wires": []}
]

Status and errors​

IndicatorMeaning
Blue dot "Cache flushed"The cache was reset via flush or msg.flushCache.
Blue ring "Removed oldest"The oldest cache entry was removed via flush_first.
Blue ring "Removed: …"A single entry was removed from the cache.
Error "No RSS URL resolved"The URL is empty or the referenced context variable does not exist.
Error "Error fetching or parsing"The feed is unreachable or not valid RSS/Atom. The message contains the cause.

Errors are reported via node.error and can be handled with a Catch node.

Notes​

  • Persistent context: The GUID cache lives in the global context under the key rss_guid_cache_<node id>. To survive a Node-RED restart, a persistent context store must be configured in settings.js. Without it, all entries are emitted again after every restart.
  • Polling frequency: Choose the Inject interval with care. For municipal news feeds, intervals of 15 to 60 minutes are usually sufficient.
  • Personal data: Feeds may contain names of authors or contact persons. Check whether this content may be published before forwarding it to a context broker.

References​