Request icon
Get icon
Script icon
ForEach icon
Set icon
Schedule icon

Post New RSS Feed Items to Mastodon

Poll a Tiny Tiny RSS public feed every 10 minutes and post new items to Mastodon, using Kestra KV store to track the last-posted item and prevent duplicates.

Categories
Business

Automatically cross-post new RSS feed items to Mastodon on a schedule. This blueprint polls a Tiny Tiny RSS (tt-rss) public published feed every 10 minutes, parses the feed XML for new entries, and posts each one as a Mastodon status (toot) with its title and link. It uses Kestra's built-in KV store to remember the last item already posted, so the same article is never tooted twice even if the feed lags or the flow re-runs. It solves the toil of manually copying blog posts, release notes, or curated links into the fediverse.

How it works

  1. The every_ten_minutes trigger (io.kestra.plugin.core.trigger.Schedule) fires on the */10 * * * * cron.
  2. fetch_rss_feed (io.kestra.plugin.core.http.Request) does a GET against the rss_feed_url input and returns the raw RSS XML.
  3. get_last_posted_id (io.kestra.plugin.core.kv.Get) reads the rss_mastodon_last_id key with errorOnMissing: false, so the first run starts cleanly with no stored value.
  4. parse_new_items (io.kestra.plugin.scripts.python.Script) installs defusedxml, parses the feed, and walks each item collecting its guid, title, and link, stopping at the last posted id so only newer entries are kept.
  5. post_new_items (io.kestra.plugin.core.flow.ForEach) iterates the new items with concurrencyLimit: 1 and, for each, the toot_item HTTP POST calls the Mastodon /api/v1/statuses endpoint with a bearer token.
  6. update_last_id (io.kestra.plugin.core.kv.Set) writes the latest item id back to KV so the next poll resumes exactly where this one finished.

What you get

  • Hands-off cross-posting from any tt-rss public feed to your Mastodon timeline.
  • Built-in deduplication via KV store, no duplicate toots.
  • Ordered posting (concurrencyLimit: 1) so items appear in feed order.
  • A single declarative YAML flow with no external scheduler or server to maintain.

Who it's for

  • Content curators aggregating feeds in tt-rss who want automatic fediverse syndication.
  • Open-source maintainers syncing blog or release-feed updates to their Mastodon presence.
  • Community and DevRel teams broadcasting announcements without manual posting.

Why orchestrate this with Kestra

A feed reader can show you new items but cannot act on them. Kestra closes that gap: the Schedule trigger drives the poll, KV state makes the flow idempotent across runs, retries can recover from transient Mastodon or network errors, and every execution is logged with full lineage so you can see exactly what was posted and when. The whole pipeline is declarative YAML, version-controllable and reviewable, instead of a cron script gluing together curl and a database.

Prerequisites

  • A Tiny Tiny RSS instance with a public published feed URL.
  • A Mastodon account and instance domain (e.g. mastodon.social).
  • A Mastodon application access token with write:statuses scope.

Secrets

  • MASTODON_ACCESS_TOKEN: bearer token for your Mastodon application, used to authorize the status POST.

Quick start

  1. Add the MASTODON_ACCESS_TOKEN secret to your Kestra instance.
  2. Set the rss_feed_url input to your tt-rss public feed URL.
  3. Set the mastodon_instance input to your Mastodon domain.
  4. Execute once to backfill, then let the 10-minute schedule run it automatically.

How to extend

  • Swap the rss_feed_url for any standard RSS feed, not just tt-rss.
  • Add hashtags, attribution, or truncation logic to the toot body in toot_item.
  • Change the cron in every_ten_minutes to poll more or less often.
  • Fan out to other networks by adding HTTP tasks for Bluesky, Discord, or Slack.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.