Medium
CMS & ContentConnect AI agents to Medium. Agents read the current user, create posts on a profile or under a publication, list publications and contributors, and upload images. The Medium public API is deprecated, so this serves accounts that already hold an integration token.
What This Integration Enables
An agent can read the authenticated user with Get Current User, whose id is the Author ID that Create Post requires and the User ID that List User's Publications needs. It creates a post on the user's profile with content in HTML or Markdown, up to three tags, a canonical URL, and a publish status of draft, public, or unlisted. It can also create a post under a publication, where editors may publish with any status and writers may only create drafts pending approval. The agent lists the publications a user contributes to and the contributors of a publication with their roles, so a flow can route content to the right destination. It can upload an image from a public URL, though this is rarely needed because Medium auto-imports images referenced by src in post HTML. Because a post set to public cannot be reverted to draft through the API, the agent treats going public as the step that needs a person.
Without FlowRunner
With FlowRunner
Use Case Scenarios
Cross-Post From WordPress
When [WordPress](/integrations/wordpress) fires On New Published Post, the agent calls Get Current User for the Author ID, then Create Post to mirror the same article onto the author's Medium profile with the source URL set as the canonical reference. The article reaches a second audience without anyone reformatting it.
Publish Under a Publication
The agent pulls a drafted article, runs List User's Publications to find the team's publication id, and calls Create Post Under Publication to place it there. As a writer, it lands as a draft pending an editor's approval, so the publication's review process stays intact.
Mirror a Ghost Post
After [Ghost](/integrations/ghost) publishes a post, the agent calls Get Current User for the Author ID and Create Post to mirror the content onto Medium as a draft. The same piece reaches Medium readers, staged for a final look before it goes public.
Human-in-Loop Highlight
Reading the user, listing publications, and creating drafts are safe to automate, so the agent handles them on its own. Going public is the consequential step, because a post created with public status is live on Medium and cannot be reverted to draft through the API. So when a flow would create a public post, the agent stops. It routes the drafted post to an author as a [human-in-the-loop](/concepts/human-in-the-loop/) step, showing the title, the destination profile or publication, the tags, and the canonical URL, and asks: "Publish this post to Medium as public, or keep it a draft?" On approval the agent creates the post with public status. On hold, it stays a draft. The AI formats and stages the article; the decision to make it public gets a person.
Agent Capabilities
6 actionsUser
1- Get Current User Returns the user tied to the integration token, including id, username, name, and profile URL. Use the id as the Author ID for Create Post and the User ID for List User's Publications, and as a check that the token is valid.
Posts
2- Create Post Creates a post on the authenticated user's profile with HTML or Markdown content, up to three tags, an optional canonical URL, and a publish status of draft, public, or unlisted. A public post cannot be reverted to draft through the API.
- Create Post Under Publication Creates a post under a publication instead of a profile. Editors may publish with any status, while writers may only create drafts pending editor approval. Use List User's Publications to find a Publication ID.
Publications
2- List User's Publications Lists the publications a given user contributes to as an editor or writer, each with its id, name, description, and URL.
- List Publication Contributors Lists the contributors of a publication with their role of editor or writer, for publications the authenticated user can access.
Images
1- Upload Image Uploads an image from a public URL and returns a Medium-hosted URL for use in post HTML. Rarely needed, since Medium auto-imports images referenced by src in post content.
Start building with Medium
$100 in credits. No card required. Connect in minutes.