Public
AI-summarize newsletters and email you a TL;DR
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.

📬 Newsletter TL;DR

Automatically summarize newsletters and get a TL;DR delivered to your email.

How it works

  1. You subscribe to any newsletter using your val's email address
  2. When a newsletter arrives, it's summarized by AI (OpenAI gpt-4o-mini)
  3. A TL;DR summary is emailed to your Val Town account email

Setup

1. Add your GEMINI API key

👉 Add GEMINI_API_KEY here: https://www.val.town/x/shlmt/newsletter-tldr/environment-variables?key=GEMINI_API_KEY

Get a key at Google AI Studio.

2. Subscribe to newsletters

Use your val's email address when subscribing to any newsletter:

That's it! Every time a newsletter email arrives, you'll get a TL;DR in your inbox.

Files

  • main.ts — email handler (entrypoint, triggered on incoming mail)
  • summarize.ts — calls Gemini to generate the TL;DR summary
  • shabat.ts - check if is assur-bmelacha time.
  • send-queued.ts - chron every 12h, check if mutar-bmelacha & send the queued emails.