Public
Test API fetching 3 member pages hourly
apicronframersqlite
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

How do I get a daily email digest of an RSS feed?

This val is a daily cron that fetches an RSS feed, finds the items published since its last run, and emails you a digest. The last-run timestamp is stored in blob storage, so you never get the same item twice. If nothing new was published, no email is sent.

Setup

  1. Remix this val.
  2. In main.tsx, set FEED_URL to the feed you want (any RSS or Atom feed works).
  3. The cron is scheduled daily at 13:00 UTC (9am Eastern). Adjust the schedule on main.tsx in the editor if you want a different time — cron expressions run in UTC.
  4. Optional: click Run on main.tsx to test it immediately. On the first run it looks back 24 hours.

The digest is sent to your Val Town account email via std/email. No API keys or environment variables are needed.

Files

  • main.tsx — the cron handler: load lastRunAt from blob, fetch new items, send the digest, save the new timestamp
  • rss.ts — fetches and parses the feed (rss-parser), filters items newer than since
  • digest.tsx — renders the email HTML with Hono JSX
  • email.tsstd/email wrapper with a small retry, since sends can fail transiently