All work

AI Automation

AI Newsletter Automation Agent

A purpose-built AI automation dashboard designed to eliminate the manual work behind weekly newsletter creation. The system runs a multi-stage pipeline: Apify scrapes the web and social media for content on user-defined topics, Exa and Tavily handle semantic search to surface the most relevant articles and reports, and an LLM (routed through OpenRouter) summarizes sources, detects trends, and generates a full newsletter draft — complete with subject line variations, a hook, thematically segmented sections, and a CTA — all matching the client's writing tone. Mem0 persists style decisions and format preferences across every run so no preference needs to be re-explained. Before anything goes live, the client reviews and edits the draft directly in the dashboard. Due to LinkedIn's platform restriction (no third-party Newsletter API), and Substack's lack of a public API, the final publish step is a deliberate one-click copy-paste — but all the research, writing, and structure work is fully automated. The same configurable pipeline works for multiple content angles without any code changes.

Type
AI Automation
Year
2026
Status
Delivered
  • Next.js
  • Supabase
  • OpenRouter
  • Apify
  • Exa
  • Tavily
  • Mem0
  • Publer
  • Vercel
  • TypeScript

The story

The problem

Creating a weekly newsletter from scratch is a multi-hour process: researching trending topics, collecting and reading sources, summarizing insights, writing a draft that matches a specific tone, and then formatting it for both LinkedIn and Substack. There was no system that could automate this research-to-draft pipeline while remembering past style decisions and keeping a human in control before publishing.

The solution

Built a dedicated Next.js dashboard where the client sets topics, source URLs, and keywords. The research pipeline (Apify + Exa/Tavily) collects and semantically ranks content, which is then summarized and fed to an LLM via OpenRouter. The LLM generates a full newsletter draft tuned to the client's voice, stored preferences are retrieved from Mem0 on every run, and the draft appears in the dashboard for inline review and editing. Approved content is formatted for both LinkedIn Newsletter (manual paste) and Substack (copy block). The platform is fully configurable per run — no code changes needed to switch topics or content angles.

My approach

Designed a modular, configurable pipeline with clear stage separation: topic ingestion → web scraping & semantic search → summarization → LLM draft generation with style memory → human review gate → formatted output blocks. Built to be reusable across different content angles without code changes.

Goals

What I built

Content Research & Ingestion

Configurable research pipeline that pulls content from the web and social media based on user-defined topics, keywords, and source URLs.

Trend Detection & Summarization

Identifies trending topics within the niche and summarizes collected sources into concise digests used as LLM input context.

Newsletter Draft Generation

LLM-powered draft generation via OpenRouter that matches Katerina's writing tone, with style memory retrieved from Mem0 on every run.

Human Review Gate

Dashboard view for reviewing, editing, and approving drafts before any content is published. Nothing goes live without explicit approval.

Publishing & Output

Formatted output blocks for LinkedIn Newsletter (manual paste) and Substack (copy block). Publer handles regular LinkedIn posts if needed.

Key capabilities

Tech stack

Frontend

Backend & infrastructure

AI layer

Payments & integrations

Architecture

The result