If you have been following my series on building passive income with AI agents, you already know I publish regular English technical articles to dev.to. This post is different. This is the story of how I turned the whole thing into a fully unattended, self-running system 鈥?so that content keeps going out even when I am asleep, offline, or working on something else.
The tool that made this possible is OpenClaw. It is an open-source, local-first AI agent platform. Here is exactly how I set up an automated content pipeline, the mistakes I made along the way, and the parts you cannot automate (yet).
The Goal
I wanted a system that could, on a schedule:
- Generate a new SEO-oriented technical article from a topic list
- Format it as Markdown
- Push it to dev.to through a logged-in browser session
- Record that it was published so it never duplicates
- Repeat, forever, with zero human input between runs
The Building Blocks
1. A scheduled task that checks for new content
The heart of the system is a scheduled job (a cron in OpenClaw) that runs every 20 minutes. On each run it:
- Reads a local file called
published-state.json - Lists the Markdown files in a
content/articles/folder - Publishes any file whose name is not already in the published list
- Updates the state file only after a successful publish
That file is my deduplication key. It is the single most important design decision in the whole system, because it is what stopped me from accidentally posting the same article twice.
2. A generating step
I queue topic ideas as Markdown files. When the folder has a new file, the pipeline generates the full article (title + ~1600 words of body) from that topic. I keep the topics in a specific vertical 鈥?AI agents, automation, and OpenClaw 鈥?because that is the corner of search where my audience actually lives.
3. A publishing step that talks to the real editor
Here is the part most tutorials skip. dev.to's editor is a React app, so you cannot just POST a string and have it work reliably. I drive a real logged-in browser tab over CDP (Chrome DevTools Protocol) and:
- Fill the title field by DOM id
- Fill the body by textarea name, using the native value setter plus an input event so React actually notices
- Simulate a real mouse click on the Publish button
The trick that made it reliable: after setting the value, you often have to append a space and delete it to force React's onChange to fire. Without that, the publish click silently does nothing.
Two Mistakes Cost Me Real Time
Mistake 1 鈥?I ignored rate limits. dev.to returns Rate limit reached, try again in 300 seconds if you post too fast. The fix is to space publishes out by at least five minutes. My cron interval already handles this, but my early manual testing did not, and I burned time waiting on backoff timers.
Mistake 2 鈥?I duplicated a post. My first version tracked "what is published" by remembering URLs. When a URL changed slightly between runs, the checker thought the article was new and posted it again. Switching to a filename-based state file fixed this permanently.
What Still Needs a Human
Full transparency: automation handles the production and the publishing. It does not handle:
- Account creation and verification 鈥?the first-time login, email confirmation, and bot-check basically need a human at the wheel.
- Subject matter judgment 鈥?a topic list is a strategy decision. The pipeline is only as good as the queue you feed it.
- Waiting for SEO to pay off 鈥?Google indexing and ranking takes weeks. This is a compounding asset, not a lottery ticket.
The Result
Right now the system runs unattended in the background. The content files grow, the cron publishes on schedule, and published-state.json grows with each successful post. I write the strategy; the agent executes the mechanics.
If you are already running OpenClaw, this is very achievable. Start small: one folder, one state file, one scheduled task. Let the machine do the boring, repeatable work while you own the part that actually matters 鈥?deciding what to say.
This is part of an ongoing series on AI-agent-driven content automation with OpenClaw.
Top comments (0)