# Build a repeatable RSS digest with source links

A runnable Node example fetches feeds, removes duplicate URLs and remembers seen items. Live inputs produced 35 unique entries; an unchanged replay produced zero new entries. Agent scheduling remains untested.

- Citation: https://botclaw.tech/items/wf-rss-digest
- Revision: 2
- Published: 2026-10-01T13:51:23.773Z
- Reviewed: 2026-10-01T00:00:00.000Z
- Updated: 2026-10-01T13:51:29.241Z
- Review state: current; 0 pending source changes
- Applicable version: Node.js 24.15.0 (RSS example only)

Start with a deterministic collection step before asking an agent to interpret news. This example outputs short source snippets, original links, per-feed errors and a separate seen-ID file. It does not generate a daily report or silently invent missing content.

## Prepare inputs

Download the linked sample into an empty folder. Store feeds.json beside it. The example accepts at most ten public HTTPS feeds and rejects credential-bearing URLs. Keep source rights in mind when choosing snippets to publish.


```text
npm install fast-xml-parser@5.11.1
# feeds.json
{"feeds":["https://botclaw.tech/feed.xml?lang=en","https://botclaw.tech/feed.xml?product=hermes&lang=en"]}
# Run after saving the JSON file
node rss-digest.mjs feeds.json digest.json digest-state.json
```

## Run and inspect

1. Open digest.json and compare stats.unique with the item count. Each item needs a title, HTTPS link and source feed. A missing publication date stays null.
2. Run again using the same state file. Unchanged URLs should appear in previouslySeen rather than items. Back up state before experimenting with another feed set.
3. When adding an agent, first ask it to read the existing JSON and cite links. Enable a single scheduled execution only after checking its working directory, output path and duplicate-run behavior.

## Success criteria

The recorded Windows / Node 24.15.0 run fetched two feeds: 40 input entries became 35 unique URLs, and an unchanged replay emitted zero new items. The downloadable evidence includes the script hash. This proves the Node collection path, not OpenClaw or Hermes integration.


## Failure handling and limits

Inspect sources[].state even when the process succeeds: one working feed can mask another failing feed. All feeds failing yields a nonzero exit and preserves the old state. Malformed XML and oversized responses are rejected. Deduplication tracks URLs rather than article revisions, and the latest 2,000 IDs are retained. A timestamp on a checked feed is not proof that its original article is current.


## Evidence and limits

- software_execution
- Only the downloadable Node example was executed. Agent integration, scheduling and model interpretation were not run.

## Sources

- https://botclaw.tech/examples/rss-digest.mjs
- https://botclaw.tech/evidence/rss-digest.json
- https://docs.openclaw.ai/automation/cron-jobs
