create_draft
Create a new Substack draft post using markdown. The body is converted to Substack's format; the draft is saved without publishing.
Instructions
Create a new draft post. Accepts markdown body which is converted to Substack's format. Does NOT publish — creates a draft only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Post title | |
| body | No | Post body in markdown format | |
| subtitle | No | Post subtitle | |
| audience | No | Who can see this post | everyone |
Implementation Reference
- markdownToProseMirror() helper - converts markdown text to Substack's ProseMirror JSON format (handles headings, code blocks, horizontal rules, paragraphs with inline formatting).
export function markdownToProseMirror(markdown: string): string {