FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
georgemandis
georgemandisconvertEmailToBlogDraft
Public
Like
1
convertEmailToBlogDraft
Home
Code
2
README.md
E
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Convert Emails to Blog Drafts

This val will receive inbound emails and create a new Markdown file in a specified GitHub repository. Create drafts for your static site (or, for the bold, publish directly!) by simply sending an email!

Notes

  • This script assumes you're using some kind of static site generator that can read from a GitHub repository. There are many to choose from in this space. I'm partial to 11ty
  • Gmail is doing some heavy-lifting for me here in terms of kindly converting my HTML email to Markdown behind the scenes. It's not a guarantee all email providers do this. If yours does not, you may have to investigate an HTML-to-Markdown conversion step.
  • We'll use the GitHub API via Octokit to create the file. You'll need to create a token and store it an an environmental variable in your Val Town settings.

Enjoy!
— George
https://george.mand.is/2024/09/using-email-and-val-town-to-draft-blog-posts/

Migrated from folder: EmailAgents/convertEmailToBlogDraft

Email
  • main.tsx
Code
README.md
E
main.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
Ā© 2025 Val Town, Inc.