DEV Community

Jeffrey.Feillp
Jeffrey.Feillp

Posted on

How I Automated My Dev.to Publishing Workflow (And Saved Hours)

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:

  1. Open dev.to/new
  2. Select editor mode
  3. Paste markdown content
  4. Write title
  5. Add tags (max 4)
  6. Add cover image
  7. Preview
  8. Click Publish
  9. 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/
Enter fullscreen mode Exit fullscreen mode

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:

  1. Logs in via email/password with CSRF token extraction
  2. Parses frontmatter — extracts title, tags, and series from YAML
  3. Handles rate limits — Dev.to allows roughly 1 post per 30 seconds
  4. 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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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)