# RSS Newsletter Assembly Pack (`bread-kim/rss-newsletter-assembly-pack`) Actor

Turn RSS feed updates into a clean newsletter package. Select only new items, remove duplicates, and generate newsletter-ready HTML, Markdown, and a downloadable ZIP for review and publishing.

- **URL**: https://apify.com/bread-kim/rss-newsletter-assembly-pack.md
- **Developed by:** [bread kim](https://apify.com/bread-kim) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## RSS Newsletter Assembly Pack

A private Apify Actor that turns **RSS 2.0 or Atom 1.0 XML supplied in the input** into a deterministic newsletter pack. It does not fetch feeds or articles, subscribe to sources, schedule runs, rewrite content with AI, or send email.

The intended recurring pipeline is: your authorized HTTP/RSS collector → this Actor → your review/email tool. Free alternatives include the n8n RSS node plus a custom template. This product is useful when you want bounded cross-feed deduplication, caller-owned incremental checkpoints, safe HTML/Markdown, QA evidence, and a reproducible ZIP in one step. Paid demand remains unproven.

### Input and output

`newsletterTitle` and `feeds` are required. Each feed has a unique `id` and an `xml` string—not a URL. See [examples/input.json](examples/input.json). Optional previous keys suppress already delivered items; include/exclude terms are literal case-insensitive NFC substring matches against title plus plain summary, with exclusion winning. `maxItems` defaults to 25.

Every valid input produces exactly one default-dataset row identical to `OUTPUT`, including `EMPTY_DIGEST`, `PARTIAL_DIGEST`, and `FAILED_FEEDS`. Invalid input writes a safe `INVALID_INPUT` OUTPUT and no dataset row. The main artifact is a fixed eight-file ZIP:

- `newsletter.html` and `newsletter.md`: escaped, reviewable newsletter copy;
- `digest.json`: selected real entries and ordered source feed IDs;
- `next-checkpoint.json`: keys owned by the caller;
- `QA.json`: counts, feed results, warnings, and provenance;
- `APPLY.md`, `LICENSES.txt`, and `MANIFEST.json`.

The same files are stored under fixed KVS record names. Excerpts are stripped to plain text and capped at 240 Unicode code points. Article links must be absolute HTTP(S), contain no credentials or explicit port, and look public; links are never fetched or DNS-verified. Relative links are rejected as invalid items because the input contract intentionally has no base URL.

### Checkpoint lifecycle

Only selected/delivered candidates are added to the returned checkpoint. Seen, filtered, invalid, duplicate, and `maxItems`-held-back candidates are not newly added. Persist `NEXT_CHECKPOINT.json` externally **only after your downstream delivery succeeds**, then pass its keys into the next run. The Actor is stateless and never overwrites a checkpoint automatically. Retrying identical input produces identical artifact bytes, but the Actor does not claim exactly-once delivery.

### Limits

The full JSON input is at most 1 MiB: 1–10 feeds, each XML string at most 100 KiB, at most 100 entries per feed and 1,000 parsed entries total, at most 50 selected items, 5,000 incoming keys, and 6,000 returned keys. Feed nesting is capped at 40 and node count is bounded. DOCTYPE and ENTITY declarations, RDF/JSON Feed/unknown dialects, malformed XML, secrets, unsafe Unicode, unknown input fields, and oversize input are rejected or safely diagnosed as documented in [REQUIREMENTS.md](REQUIREMENTS.md).

### Local verification

Node 22.23.3 is the pinned container runtime. No credentials are needed for local tests.

```sh
npm ci --include=dev --ignore-scripts
npm run preflight
AUTOMATON_CONTAINER_SMOKE=1 node dist/main.js
```

The Dockerfile is a clean multi-stage build. Per the host execution boundary, this builder did not run Docker; Docker build and disposable no-network container smoke remain mandatory before any upload or deployment. No cloud build, upload, publication, pricing mutation, schedule, or webhook was performed.

### Content rights

Use only feeds and newsletter content you are authorized to process. Output intentionally contains titles, links, and short feed-provided excerpts, not full articles or paywalled bodies. Copyright remains with each source. Review source terms and the assembled newsletter before delivery.

# Actor input Schema

## `newsletterTitle` (type: `string`):

Required title used verbatim after safe text normalization; one to one hundred characters.

## `feeds` (type: `array`):

One to ten caller-retrieved RSS 2.0 or Atom 1.0 XML documents; each XML string is at most 100 KiB.

## `previousItemKeys` (type: `array`):

Up to five thousand exact lowercase SHA-256 keys from a previously confirmed delivery checkpoint.

## `includeKeywords` (type: `array`):

Up to ten literal case-insensitive NFC substrings; an empty list includes all entries.

## `excludeKeywords` (type: `array`):

Up to ten literal case-insensitive NFC substrings; exclusion wins over inclusion.

## `maxItems` (type: `integer`):

One to fifty new matching items included in this digest; held-back items are not checkpointed.

## Actor input object example

```json
{
  "newsletterTitle": "Weekly Digest",
  "feeds": [
    {
      "id": "rss-demo",
      "xml": "<rss version=\"2.0\"><channel><title>Demo RSS</title><link>https://example.com</link><item><guid>001</guid><title>Automation launch</title><link>https://example.com/automation</link><description>Safe summary</description></item></channel></rss>"
    },
    {
      "id": "atom-demo",
      "xml": "<feed xmlns=\"http://www.w3.org/2005/Atom\"><title>Demo Atom</title><entry><id>002</id><title>Weekly update</title><link rel=\"alternate\" href=\"https://example.com/weekly\"/><summary>New weekly summary</summary></entry></feed>"
    }
  ],
  "previousItemKeys": [],
  "includeKeywords": [],
  "excludeKeywords": [],
  "maxItems": 25
}
```

# Actor output Schema

## `output` (type: `string`):

Status, exact counts, feed diagnostics, verification states, and artifact hashes.

## `dataset` (type: `string`):

Exactly one authoritative OUTPUT row for every valid input, including empty, partial, and failed-feed results.

## `zip` (type: `string`):

Eight deterministic newsletter, JSON, checkpoint, QA, integration, license, and manifest files.

## `html` (type: `string`):

Email-compatible escaped HTML without scripts, stylesheets, or remote images.

## `markdown` (type: `string`):

Escaped Markdown newsletter for caller review or downstream use.

## `digest` (type: `string`):

Selected real entries and ordered source provenance.

## `checkpoint` (type: `string`):

Caller-owned keys to persist only after downstream delivery succeeds.

## `qa` (type: `string`):

Feed status, safe diagnostic codes, counts, and provenance.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "newsletterTitle": "Weekly Digest",
    "feeds": [
        {
            "id": "rss-demo",
            "xml": "<rss version=\"2.0\"><channel><title>Demo RSS</title><link>https://example.com</link><item><guid>001</guid><title>Automation launch</title><link>https://example.com/automation</link><description>Safe summary</description></item></channel></rss>"
        },
        {
            "id": "atom-demo",
            "xml": "<feed xmlns=\"http://www.w3.org/2005/Atom\"><title>Demo Atom</title><entry><id>002</id><title>Weekly update</title><link rel=\"alternate\" href=\"https://example.com/weekly\"/><summary>New weekly summary</summary></entry></feed>"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bread-kim/rss-newsletter-assembly-pack").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "newsletterTitle": "Weekly Digest",
    "feeds": [
        {
            "id": "rss-demo",
            "xml": "<rss version=\"2.0\"><channel><title>Demo RSS</title><link>https://example.com</link><item><guid>001</guid><title>Automation launch</title><link>https://example.com/automation</link><description>Safe summary</description></item></channel></rss>",
        },
        {
            "id": "atom-demo",
            "xml": "<feed xmlns=\"http://www.w3.org/2005/Atom\"><title>Demo Atom</title><entry><id>002</id><title>Weekly update</title><link rel=\"alternate\" href=\"https://example.com/weekly\"/><summary>New weekly summary</summary></entry></feed>",
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("bread-kim/rss-newsletter-assembly-pack").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "newsletterTitle": "Weekly Digest",
  "feeds": [
    {
      "id": "rss-demo",
      "xml": "<rss version=\\"2.0\\"><channel><title>Demo RSS</title><link>https://example.com</link><item><guid>001</guid><title>Automation launch</title><link>https://example.com/automation</link><description>Safe summary</description></item></channel></rss>"
    },
    {
      "id": "atom-demo",
      "xml": "<feed xmlns=\\"http://www.w3.org/2005/Atom\\"><title>Demo Atom</title><entry><id>002</id><title>Weekly update</title><link rel=\\"alternate\\" href=\\"https://example.com/weekly\\"/><summary>New weekly summary</summary></entry></feed>"
    }
  ]
}' |
apify call bread-kim/rss-newsletter-assembly-pack --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bread-kim/rss-newsletter-assembly-pack"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qKVWbuyBf0tZgcQ55/builds/7azjdCwg5FH7E5gKb/openapi.json
