← Back to AI Agents
In production

Newsletter AI Agent

Your newsletter written, published, and sent while you sleep

Dual-channel system that publishes to Substack and sends via Resend Broadcasts. Generates content, scores subjects, structures 13 HTML sections, and schedules Thursday sends. Fully automatic.

13+

Newsletters sent

weekly Thursday cadence

2

Distribution channels

Substack + Resend Broadcasts

13

Sections per newsletter

custom HTML template

The Challenge

Writing a consistent weekly newsletter requires hours of curation, writing, and formatting. Most creators give up before month 3.

The Approach

Agent that automatically curates content, generates AI summaries, scores subjects to maximize opens, and publishes to two channels: Substack (reverse-engineered API, Markdown→Tiptap JSON, auto-tagging) and Resend Broadcasts (13-section HTML template).

Architecture

01

Substack API reverse-engineering: Markdown→Tiptap JSON conversion for direct publishing

02

Subject line scoring with Claude Haiku: evaluates clarity, urgency, and relevance

03

Responsive 13-section HTML template adapted for email clients

04

Weekly stats integration: site metrics automatically included

05

Dry-run mode: generates and previews without sending for manual review

Key Technical Decisions

Claude Haiku 4.5 for generation: minimal cost for curated, not creative content

Reverse-engineered Substack API vs. email only: maximizes organic discoverability

Resend Broadcasts as parallel channel: full control over format and analytics

Thursday cadence: industry data indicates best B2B open rates

How It Was Built

The agent publishes to two channels simultaneously. For Substack, reverse-engineered the undocumented API: converts Markdown to Tiptap JSON (Substack internal format), applies content-based auto-tagging, and schedules publishing. For Resend Broadcasts, generates a 13-section HTML template (hero, news, tips, tools, site metrics, etc.) and schedules delivery. Subject scoring uses Claude Haiku to evaluate multiple candidates and select the one with highest open potential.

Results

From concept to 13+ weekly editions without missing a beat. The dual system maximizes reach: Substack for organic discoverability and subscriber growth, Resend Broadcasts for full format control and advanced analytics. Weekly Thursday cadence maintains consistent engagement.

Tech Stack

Claude Haiku 4.5Substack APIResendSupabase Edge Functionspg_cron

What you get

  • Dual publishing: Substack + direct email via Resend Broadcasts
  • Automatic curation of relevant industry content
  • AI subject line scoring to maximize open rates
  • 13-section HTML template: hero, news, tips, tools, and more
  • Thursday cadence - the optimal day for B2B newsletters
  • Dry-run mode to review before sending