logo
Published on

Building an AI-Curated Newsletter

Read in: 한국어
Authors

1. When You Have No Time to Read the News

There is no way to keep up with all the tech news and industry updates pouring in every day. Let's build an automated newsletter where AI reads RSS feeds, picks the important stories, and sends you summaries.

Newsletter automation overview

2. Overall Architecture

Pipeline
1. CollectFetch latest articles from RSS feeds
2. FilterAI selects the top 5-10 by relevance and importance
3. SummarizeSummarize each article in 2-3 lines
4. SendInsert summaries into a newsletter template and email them out

3. Collecting RSS Feeds

import Parser from 'rss-parser';

const parser = new Parser();

const FEEDS = [
  'https://techcrunch.com/feed/',
  'https://news.ycombinator.com/rss',
  'https://blog.anthropic.com/rss.xml',
  // Add any feeds you want
];

async function collectArticles() {
  const articles = [];

  for (const feedUrl of FEEDS) {
    const feed = await parser.parseURL(feedUrl);
    for (const item of feed.items.slice(0, 10)) {
      articles.push({
        title: item.title,
        link: item.link,
        content: item.contentSnippet || item.content,
        date: item.pubDate,
        source: feed.title,
      });
    }
  }

  // Filter to articles from the last 24 hours only
  return articles.filter(a =>
    new Date(a.date) > new Date(Date.now() - 24 * 60 * 60 * 1000)
  );
}

4. AI Filtering + Summarization

const prompt = `The following is a list of today's tech news articles.

1. Select the 5-7 most important and interesting articles.
2. Summarize each article in 2-3 lines.
3. Explain in one line why each article matters.

Selection criteria:
- News with significant industry impact
- Practical technical insights
- Stories that signal trend shifts

Exclude:
- Simple product launch promotions
- Rumor/speculation articles
- Duplicate news

Article list:
${articles.map(a => `[${a.source}] ${a.title}\n${a.content}`).join('\n\n')}`;

5. Newsletter Template

<h1>Today's Tech News — ${date}</h1>

${articles.map(article => `
<div class="article-card">
  <h3><a href="${article.link}">${article.title}</a></h3>
  <p class="source">${article.source}</p>
  <p>${article.summary}</p>
  <p class="why"><strong>Why it matters:</strong> ${article.importance}</p>
</div>
`).join('')}

<p>This newsletter was automatically curated by AI.</p>

6. Automated Delivery

Sending Emails

import { Resend } from 'resend';

const resend = new Resend(process.env.RESEND_API_KEY);

await resend.emails.send({
  from: 'newsletter@mysite.com',
  to: subscribers,
  subject: `Today's Tech News — ${today}`,
  html: newsletterHtml,
});

Scheduling

# Run every morning at 8 AM (cron)
0 8 * * * node /path/to/newsletter.js

7. Summary

StepToolRole
Collectionrss-parserGather articles from RSS feeds
FilteringClaude/Gemini APISelect articles by importance
SummarizationClaude/Gemini API2-3 line summary per article
DeliveryResend/SendGridAutomated email delivery

A curated newsletter is sent automatically every morning. You can cut news reading time from 1 hour to 5 minutes.