Medium automation
Update old Medium stories in bulk
You moved your blog, renamed your newsletter or changed the call to action at the end of every post. On Medium that means opening each published story one by one, and with a back catalog of 80 stories some get missed.
Cotlet does it in your own Medium account with list_stories, get_story and update_story, called by your AI agent, an n8n workflow or a script.
Hosted · nothing to install or maintain
Official options
Can Medium do this on its own?
Medium's API never had an edit endpoint, and it accepts no new integrations (checked 12 Oct 2026). The Medium editor edits one story at a time; Medium's help center says that even deleting all posts has to be done story by story.
By hand
How you do it in Medium today
- On the Medium homepage sidebar, click Stories and switch to the Published tab.
- Click the down arrow next to a story and choose Edit story, then change the link or paragraph in the editor.
- For topics, open the three-dot menu in edit mode and click Change topics; for the paywall, open the same menu and choose Manage paywall setting.
- Save, and Medium shows the change to readers at once. Then go back to the Published tab for the next story.
- The Medium help center describes no batch edit for stories, so finding which ones still hold the old text means opening them all.
With an agent
How to update old Medium stories in bulk
Prompt
Find every published story that still links to oldblog.example.com, swap the links for yourname.dev, and show me the list before you save anything. - 01
Agree on the change first
The agent restates the rule in one line ("replace oldblog.example.com with yourname.dev in links only") and asks if anything is off limits, such as stories in a publication you do not run.
- 02
Search the full back catalog
list_stories pages through all published stories, then get_story reads each body. Only stories that actually contain the old text go on the change list; the rest are counted and left alone.
- 03
Show every change before saving
The agent shows each story with the old and new line side by side. You can approve all, approve some, or edit the wording. Nothing is saved until then, because a saved change is visible to readers immediately.
- 04
Send only the changed field
update_story gets the new body or the new topics and nothing else, so titles, canonical links and the paywall stay as they were. A story that fails to save is retried once, then listed for you.
- 05
Treat scheduled stories differently
Scheduled stories are included only if you ask, since any edit there is published with the story at its time. The agent never changes the paywall setting as a side effect of a text sweep.
What you get back
Example data
82 published stories searched.
14 still link to oldblog.example.com (23 links in total).
12 updated after your OK; 2 skipped: they belong to Better Programming, which you do not edit.
Unchanged: titles, topics, canonical links, paywall.
No scheduled stories touched. Other ways to ask
- Replace the newsletter sign-up paragraph at the end of all my 2025 stories with the new one in cta.md.
- Add the topic "Software Engineering" to every published story tagged Python that has fewer than five topics.
- Find stories with code blocks published before Medium added syntax highlighting and rebuild those blocks so they get highlighted.
Before you automate it
What Medium allows, and what to know first
- Medium makes a saved change to a published story visible to readers immediately, while changes to a draft save automatically and stay private.
- Medium does not support editing topics of a published story in its Android app, so topic sweeps happen on the web.
- Code blocks published on Medium before syntax highlighting arrived are not updated automatically; Medium says to create a new code block and paste the old contents into it.
- Medium lets only active Partner Program members open Manage paywall setting, and a story taken off the paywall there becomes free to every reader as soon as it is saved.
- Medium cannot turn a published story back into a draft; the only ways to hide it are unlisting or deleting it.
update_story asks for your OK by default. To run it on a schedule without you, switch confirmation off for that tool in your dashboard.
Sources: Medium Help: Create, edit, or delete a story · Medium Help: Using topics · Medium Help: Using code blocks and inline code · Medium Help: Remove a story from the paywall
REST
Call update_story from a script
curl
curl https://cotlet.dev/api/v1/medium/update_story \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"story_id":"3f9a1c27b84e","fields":{"body_markdown":"Small releases beat big ones.\n\nMore on [yourname.dev](https://yourname.dev)."}}' Example response
{
"story_id": "3f9a1c27b84e",
"status": "published",
"updated_fields": [
"tags"
]
} MCP: add https://cotlet.dev/mcp/v1 with the same key; the tool is medium_update_story. Example data.
Schedule it in n8n, Make, Zapier or cronTools
Medium tools this automation uses
| Tool | Parameters |
|---|---|
| list_stories | status, limit, cursor |
| get_story | story_id |
| update_story | story_id, fields |
Give your agent access to Medium.
Free 7-day trial with 5,000 credits, no card needed. Cotlet is independent and not affiliated with Medium.