How I Automated My Dev.to Publishing Workflow
I write technical articles. A lot of them. Last month I had a series of 4 articles to publish on Dev.to, and manually posting each one was killing my productivity.
Here's what I did about it.
The Manual Workflow (Slow)
Each article required:
- Open dev.to/new
- Select editor mode
- Paste markdown content
- Write title
- Add tags (max 4)
- Add cover image
- Preview
- Click Publish
- Repeat × 4
That's about 5-7 minutes per article. For a 4-article series: 20-30 minutes of mindless clicking.
The Automated Workflow (Fast)
I wrote a Python script that does all of this in one command:
python publish.py ./articles/
That's it. It reads every .md file in the directory, parses the YAML frontmatter for metadata, logs into Dev.to, and publishes each one. 4 articles in ~30 seconds.
How the Script Works
The script uses Dev.to's form-based submission (not the API, which requires a separate token). It:
- Logs in via email/password with CSRF token extraction
- Parses frontmatter — extracts title, tags, and series from YAML
- Handles rate limits — Dev.to allows roughly 1 post per 30 seconds
- Tracks status — logs success/failure for each article
The Technical Trick
The key insight was that Dev.to's authenticity_token from the dashboard page works for article creation — you don't actually need to fetch the /new page's token. This simplifies the flow significantly.
# Simplified flow — full version handles errors and retries
s = login_to_devto(email, password)
csrf = get_csrf_from_dashboard(s)
for article in articles:
publish_article(s, csrf, article)
time.sleep(35) # rate limit
The Result
I went from 30 minutes of manual publishing to 30 seconds of automated publishing. The same script now handles all my Dev.to content.
Want the Full Script?
I've packaged everything into a complete tool:
- Main publish script with login
- Session persistence (no repeated logins)
- Batch processing for multiple articles
- Error handling with automatic retry
- English + Chinese documentation
$15 USDT (TRC-20) — one-time purchase, no subscription.
TNeUMpbwWFcv6v7tYHmkFkE7gC5eWzqbrs
Full details: https://telegra.ph/Devto-Batch-Publisher--15-USDT-One-Time-Purchase-04-29
Built with Python, requests, and a bit of reverse-engineering Dev.to's CSRF flow.
Top comments (0)