Mail to Blog is a streamlined workflow that allows users to publish blog posts directly via email without logging into a CMS dashboard or using a third-party application. The user sends an email where the subject becomes the post title and the body becomes the content, and the post is published within seconds. The workflow uses Postmark for inbound email parsing, Hugo and GitHub for static site generation and hosting, and Cloudflare Workers to receive parsed email data, convert it to Markdown, and commit to GitHub. To set up the workflow, the user needs to create a GitHub repository, initialize a Hugo site, configure a theme, and set up GitHub Actions for automatic deployment. The user also needs to generate a GitHub token, sign up for Cloudflare Workers, and create a new worker from the web interface. The worker script converts the parsed email to Markdown and commits a new post to GitHub using the personal access token. Once deployed, the worker script is recorded, and the user needs to modify the script by entering the correct GitHub username and repo name. Postmark handles inbound email parsing, assigning a unique address, parsing incoming emails into structured JSON, and sending the JSON to the configured webhook. The user can then publish a new post by sending an email to the Postmark inbound address, and the post will appear on the site within minutes.
dev.to
dev.to
