How I automate my Substack newsletter with content from my blog
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Very little changes for anyone else; it is one developer documenting a personal, duct-taped blog-to-newsletter pipeline he has run since 2023.
Technology writer Simon Willison published a video showing how he builds his email newsletter automatically from his blog. A web-based notebook called Observable pulls recent posts from his blog's database, formats them as a ready-to-paste email, and filters out items already sent. He copies the result into Substack, a newsletter platform, makes small edits, and sends it in a few minutes.
Willison demonstrates a near-free, mostly manual automation: content flows from his Django/Heroku/PostgreSQL blog through GitHub Actions to SQLite served by Datasette on Fly.io, then an Observable notebook renders it as rich text for Substack. The glue is 143 lines of SQL that build HTML via string concatenation, deliberately crude but maintained for fun. The takeaway for decision-makers is that small-scale newsletter automation needs minutes of human editing, not a product.
An Observable notebook fetches JSON from Willison's public Datasette instance using a 143-line SQL query with UNION ALL over blog_entry, blog_blogmark, blog_quotation, blog_note and TIL tables, generating HTML, including three-letter month URL slugs, via SQLite string concatenation and correlated subqueries for tags. The notebook filters previously sent items and exposes a 'copy rich text to clipboard' button; he manually fixes Substack's YouTube auto-embeds and stray blank lines before sending.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Substack Observable Datasette SQLite Fly.io GitHub Actions Heroku
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
datasette-charts 0.5a0
Datasette Charts 0.5a0 adds calendar heatmaps, box plots and active-over-time charts, enabling richer data visualisation directly in the browser without extra libraries.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.