
Markdown to the WeChat Draft Box: the Complete Pipeline
Five stages from inspect to draft/add, why every draft needs an explicit cover, and how to debug 45004.
Markdown to the WeChat Draft Box: the Complete Pipeline
The draft path has five stages, and the first two never touch the network. Full reference.
The five stages
md2wechat inspect article.md --json— metadata (title ≤ 32 chars, author ≤ 16, digest ≤ 128), image inventory, andreadiness.targetswith blockers such asMISSING_COVERorMISSING_WECHAT_CONFIG.- Preflight — validates intent, assets, and cover before any remote call.
- Convert — renders HTML through the Convert API (
POST https://www.md2wechat.cn/api/convert). - Upload —
--uploadturns article images into WeChat materials and rewrites the URLs;--coveruploads the cover and returns amedia_id. - Draft — WeChat
draft/addreturnsdraft_idanddraft_url.
Every draft needs an explicit cover
md2wechat convert article.md --draft --cover cover.jpg--cover <path> and --cover-media-id <media_id> are mutually exclusive; inspect fails closed with CONFLICTING_COVER_INPUTS, COVER_MEDIA_ID_INVALID, or MISSING_COVER. Details: Cover Image.
Debugging 45004
WeChat error 45004 means an invalid digest — check the digest length first (limit 128 characters). Clear readiness blockers before retrying; --save-draft saves the draft JSON without submitting, and create_draft <json> submits later. test-draft <html> <cover> is the minimal smoke path.
Safety boundary
Draft creation is a side effect. It requires explicit user intent, valid credentials, and — when the platform asks — a whitelisted egress (Whitelist).
More Posts

How to Use md2wechat-skill in Claude Code, Codex, and OpenCode
A validation-oriented comparison of candidate md2wechat-skill setup paths for Claude Code, Codex, and OpenCode, with install steps, discovery commands, and reusable prompts.

56 Advanced Layout Modules: a Usage Guide
Nine categories, nine body formats, and how to pick the few modules an article actually needs.

Why Advanced Layout Improves the Product Value of md2wechat Agent API
Advanced layout modules do more than improve presentation. They make the API easier to understand, easier to integrate, and easier to position as a higher-value product.
Newsletter
Join the community
Subscribe to our newsletter for the latest news and updates