How I Automate My Substack Workflow
Everything after the writing
My Medium friends can read this over on Medium.
I write my own articles. AI helps me plan, outline, draft. Then I go back in and rewrite it, cut what isn't working, add a joke that might not land. That part stays mine.
What I stopped wanting to do by hand was everything after that. Open Substack, paste the article in, watch the formatting come apart, go find a header image, set the subtitle, decide about the email toggle. Then, on a good day, remember to write a Note about it before moving on to the next draft.
So I automated that part. The clicking.
I already automated the other half of this job. That system pulled twenty years of scattered articles into one archive. This is the other end of the pipeline: what happens once a piece is done and sitting in a folder, ready to go out.
Conversion
A finished article in my self-built editor app is an HTML file. That's easy to work with and easy to copy to Medium. Can't automate that because Medium won't let me. That's still copy-paste. But that HTML makes it a lot quicker and easier.
Substack's different.
Substack gets Markdown with frontmatter on top: title, subtitle, a slug, a short SEO description. The H1 and the subtitle move into that frontmatter and disappear from the body, so they don't show up twice once Substack renders its own title block. Section headers stay. Blockquotes become markdown quotes, bold stays bold, links stay links.
Then the header image. I default to Medium's cover shot, pulled straight from my RSS feed, so both platforms show the same photo for the same piece. Only when Medium doesn't have one, or it's the wrong shape for a wide cover, do I fall back to another photo. Either way it gets resized and converted to webp before it goes up.
Right under that image sits one line in italics, pointing my Medium friends to the Medium version, linked to the live URL. Then mabye a product ad for my Gumroad products at the very end, an image and a button, whichever product fits the article.
That's my automation. I write the article. Claude does the rest on Substack.
Draft, Not Live
Running the upload creates a draft on Substack. I still open it and click publish myself. I could directly publish with the automation. Maybe I will soon.
Writing a Note has no draft stage. Run the command, it's live in the feed, no review screen in between. My Substack Note command has a dry run flag. It builds the exact post and prints it without touching the network, so I can catch a bad line before it's a bad post everyone can see.
About Notes...
Notes
Once a post is live, the last step is a Note about it. A hook, one stat if the piece has one, a clear line about what it's about, then a link.
The first Note I ever sent through this thing linked back to the Medium version of the article instead of the Substack post it was supposed to promote. Minor error.
I fixed the process. The link in a Note now points to the Substack post, checked against the live sitemap first, never assumed from whatever URL happened to be open in a tab.
No Public API
Substack doesn't have a public API. Not one I have access to, anyway. Because they seem to have one now, but not for every account.
Medium killed its own years ago, by the way.
So I built a small command line interface (CLI) instead, with Claude Code, working off three open source projects that had each reverse engineered a piece of Substack's private API. One had the draft flow mostly right, except its image upload used the wrong format. One had the cleanest map of how Notes work. A small Ruby gem had the one piece neither of the other two touched: how to attach an image to a Note.
Posts and Notes run on two different document formats underneath. I had to figure that out.
Downsides
Nothing here is supported. Substack can change any of these endpoints tomorrow, and the whole thing stops working until I go find out why.
There's no delete or edit for Notes yet, so a wrong one just sits there until I manually delete it.
And every command still runs by hand, on purpose. Nothing posts on a timer or completely autonomously. A Note goes out under my name the second it's public, and I want a person between me and that button. Even if the person is just me, typing one more line.
The Bottom Line
The writing was boring for me. Everything after it kind of was.
So I cut that part with that automation.
I publish on Substack* and Medium. If you're building something similar for your own posts, most of it is more findable than it looks. I wrote up the exact endpoints, schemas, and code as a guide, if you'd rather skip the reverse-engineering part yourself. You can let AI help you build an automation that makes each boring step faster or automatic.
That's pretty cool.




