doodle top mobile

Post to Hashnode from Codex

Codex can publish blog posts to Hashnode through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your Hashnode account in Postiz, then hand Codex a markdown file. It picks your publication, adds the required tag, uploads the cover image, sets subtitle and canonical URL, and schedules the post.

Setup GuideGitHub

Please make sure there is always a human in the loop.

Last updated: September 2026

doodle left mobiledoodle right mobile

How do I post to Hashnode from Codex?

Set up Codex once with the Postiz skill or the Postiz MCP server, connect Hashnode in Postiz, then ask. The whole setup takes a few minutes.

Setup, then just ask

# One-time setup, option A: Postiz skill + CLI
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key   # or: postiz auth:login

# One-time setup, option B: Postiz MCP server (OAuth, no key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz

# Then just ask Codex:
> Publish my post on Hashnode with
  a cover image and tags, tomorrow at 9am

Codex: Done! Your Hashnode post is scheduled.

Hashnode-Specific Features

📖

Blog Publishing

Publish long-form blog posts with full Markdown support. Code blocks, embeds, and rich formatting work out of the box.

📚

Publication Support

Publish posts under your Hashnode publication. Every post requires a publication ID to target the right blog.

🖼

Cover Images

Upload and attach cover images to make your posts stand out. Eye-catching visuals drive more clicks from the Hashnode feed.

🔗

Canonical URLs

Set canonical URLs for SEO when cross-posting from your original blog. Avoid duplicate content penalties across platforms.

🏷

Required Tagging

Hashnode requires at least one tag per post. Tags use tag IDs for precise categorization and improved discoverability.

📅

Scheduled Publishing

Schedule blog posts for future publication with precise timestamps. Build a consistent publishing cadence effortlessly.

How does Codex post to Hashnode?

You describe what you want in plain language and Codex handles the Postiz calls for you. Here is how a typical conversation goes.

1

Find Your Hashnode Integration

Ask Codex whether your Hashnode account is connected. It also checks which options the platform supports.

Example conversation

> Is my Hashnode account connected to Postiz?

Codex: Yes — your Hashnode account is connected
  and ready. Want me to post something?
2

Prepare Your Content

Write your blog post in Markdown. Hashnode supports rich formatting including headers, code blocks with syntax highlighting, images, and embedded content. Optionally upload a cover image.

Example conversation

> Draft a Hashnode post about our new
  feature launch

Codex: Here's a draft for Hashnode:
  "We just shipped something big..."
  Want me to add media and schedule it?
3

Publish Your Post

Create a post with your content, title, publication, tags, and optional cover image and canonical URL. Remember: publication and at least one tag are required.

Example conversation

> Yes — add screenshot.png and schedule
  it for tomorrow at 9am

Codex: Done! Scheduled on Hashnode for
  tomorrow at 9:00 AM.

Hashnode Settings Reference

Mention any of these in plain language and Codex sets them for you. These are the Hashnode options it can apply to any post.

FieldTypeDescription
__typestringMust be "hashnode"
titlestringArticle title (min 6 characters)
subtitlestringArticle subtitle (min 2 characters)
main_imageobjectCover image: {id: string, path: string}
canonicalstringOriginal URL for SEO canonical link
publicationstringPublication ID (required)
tagsarrayAt least 1 tag: [{value: string (tag ID), label: string}]

Common Configurations

Ask Codex for any of these common Hashnode publishing scenarios and it applies the matching settings.

Basic Blog Post

Just ask

> Post it with: Basic Blog Post

Codex: Got it. Applying:
  title: Understanding React Server Components
  publication: my-publication-id
  tags: React, Next.js

Full-Featured Post with Cover Image

Just ask

> Post it with: Full-Featured Post with Cover Image

Codex: Got it. Applying:
  title: Complete Guide to Node.js Streams
  subtitle: Master streams for high-performance I/O
  main_image: id=img-abc123, path=https://uploads.postiz.com/streams-cover.png
  publication: my-publication-id
  tags: Node.js, Backend, Tutorial

Cross-Posted Article with Canonical URL

Just ask

> Post it with: Cross-Posted Article with Canonical URL

Codex: Got it. Applying:
  title: Why We Migrated to Bun
  subtitle: Our experience switching JavaScript runtimes
  canonical: https://engineering.mycompany.com/migrating-to-bun
  publication: company-blog-id
  tags: Bun, JavaScript, DevOps

What is Codex?

Codex is OpenAI's coding agent. It runs as the Codex CLI in your terminal (npm install -g @openai/codex), as an IDE extension, and in the cloud, and it can run shell commands and call MCP servers, which is how it drives Postiz. Codex is not ChatGPT: ChatGPT is the chat assistant on chatgpt.com and connects to Postiz differently (see the ChatGPT guide). For the full setup, start at the Codex + Postiz hub.

💻

Terminal & IDE Native

Codex runs in your terminal or IDE. You type what you want in plain English and it handles Postiz for you — no extra configuration needed.

🔧

Autonomous Execution

Codex runs commands inside a sandbox with approval rules you control, and works through multi-step tasks like discovering channels, uploading media, and scheduling Hashnode posts.

⚡

Parallel Tasks

Run multiple Codex tasks simultaneously. Schedule posts to different platforms in parallel while Codex handles other coding work.

How Postiz Works with Codex

Codex discovers Postiz two ways: the postiz skill, which it loads from .agents/skills or ~/.agents/skills and which you can invoke with $postiz, or the Postiz MCP server added with codex mcp add. Either way it learns the available tools and chains them for Hashnode workflows.

  • ✓Install the Postiz skill with npx skills add, or add the Postiz MCP server with codex mcp add
  • ✓Codex loads skills from .agents/skills and reads SKILL.md to learn the Postiz CLI
  • ✓Authenticate with POSTIZ_API_KEY or postiz auth:login; the MCP route uses OAuth instead
  • ✓Codex runs commands in its sandbox and asks for approval based on your permission settings
  • ✓Works alongside your coding tasks in parallel

Install Postiz

# Install the Postiz skill
npx skills add gitroomhq/postiz-agent

# Set your API key
export POSTIZ_API_KEY=your_api_key

# Or add the Postiz MCP server instead (OAuth, no API key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz

# Then ask, interactively or headless
codex "list my social media integrations"
codex exec "post today's changelog to Hashnode"

Hashnode Publishing with Codex

Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.

💻

Just Ask Codex

Terminal and IDE integration

Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.

Codex CLI

$ codex "Post to Hashnode about our
  new feature launch, schedule for
  tomorrow at 9am"

Codex: I'll handle that.
  Found your Hashnode integration.
  Composing and scheduling the post.

  Done! Your post is scheduled.
  Post ID: abc-123
💻

Parallel Tasks

Multiple tasks at once

Codex can handle multiple tasks in parallel. Schedule posts to different platforms while it works on other coding tasks simultaneously.

Codex Parallel Tasks

# Run multiple posting tasks in parallel
$ codex "Schedule a post about our
  launch to X for tomorrow 9am" &

$ codex "Write a LinkedIn article
  about our new feature and schedule
  for tomorrow noon" &

$ codex "Fix the bug in auth.ts"

# All three tasks run simultaneously

Why Codex + Postiz for Hashnode

Codex's autonomous execution makes Postiz a natural fit. The agent reads the SKILL.md to understand every available command, then autonomously chains them together for Hashnode workflows.

  • ✓Runs in your terminal or IDE — just type what you want
  • ✓Autonomous execution in sandboxed environments
  • ✓Parallel task support — post while coding
  • ✓Publication ID and tags resolved automatically from your settings
  • ✓Cross-post to Hashnode + other platforms in a single session
  • ✓Powered by OpenAI's most capable models

SKILL.md (loaded by Codex from .agents/skills)

---
name: postiz
description: Social media automation
  CLI for scheduling posts across
  30+ platforms including Hashnode
homepage: https://docs.postiz.com/public-api/introduction
---

# Loaded by Codex from .agents/skills
# Invoke explicitly with $postiz

# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>

# Hashnode Settings
title, subtitle, main_image,
canonical, publication, tags

Also Works with Claude Code

Postiz works with any AI agent that can run commands or call MCP tools — you ask, the agent does the work. That includes Anthropic's Claude Code: see the Claude Code Hashnode guide, or the Postiz Agent page for any other agent.

C

Claude Code

by Anthropic

Claude reads the Postiz skill so it knows what it can do, then autonomously discovers your Hashnode integration, uploads your cover image, resolves publication and tag IDs, and publishes the post.

Claude Code

> Publish my Node.js streams guide to
  Hashnode with a cover image and tags

Claude: Done! Scheduled on Hashnode for
  tomorrow at 9:00 AM.

Can Codex post to Hashnode and other platforms at once?

Publish the same article to Hashnode and other platforms in a single request. Each platform gets its own settings.

Example

> Post "Excited to announce our new feature!" to
  Hashnode and LinkedIn tomorrow at 9am, then schedule
  a daily tip on Hashnode every weekday at 10am

Codex: Done! Scheduled:
  - Hashnode + LinkedIn: tomorrow 9:00 AM
  - Daily tips on Hashnode: Mon-Fri 10:00 AM

What can I ask Codex to post on Hashnode?

Codex takes plain-English prompts in an interactive session, as a one-off codex exec command, or through the $postiz skill. These are the kinds of prompts people type for Hashnode.

Prompts for Hashnode

> Publish ./posts/agents.md to my Hashnode publication with the tag
  "AI" and cover ./assets/cover.png, tomorrow 9am

$ codex exec "Cross-post https://postiz.com/blog/mcp to Hashnode with that
  canonical URL and subtitle 'What MCP means for scheduling'"

> $postiz Which Hashnode publications and tags are available?
  Publish the release notes to the main one

What Hashnode rules should Codex follow?

These are the Hashnode limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.

  • ✓title is required and must be at least 6 characters.
  • ✓publication is required; Codex resolves it with postiz integrations:settings.
  • ✓At least 1 tag is required, chosen from Hashnode's tag ids.
  • ✓subtitle (min 2 characters), cover image via postiz upload, and canonical URL are optional.

Codex and Hashnode FAQ

How do I post to Hashnode from Codex?

Install the Postiz skill with npx skills add gitroomhq/postiz-agent, or add the Postiz MCP server with codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic. Connect Hashnode in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the Hashnode settings, uploads any media, and schedules the post.

Why does Codex ask for a tag and publication on Hashnode?

Because Hashnode requires both. Postiz marks publication and tags as required, so Codex fetches your publications and tag ids with postiz integrations:settings and fills them from your prompt. If you do not name a tag, it suggests one from the article text rather than publishing without it.

Can Codex set a canonical URL when cross-posting to Hashnode?

Yes. Give Codex the original article URL and it fills the canonical setting, so Hashnode points search engines back to your site. Combine that with a subtitle and an uploaded cover image and the post looks native on Hashnode while your own blog keeps the ranking credit.

Can Codex post to Hashnode on a schedule without me watching?

Yes. Postiz stores scheduled Hashnode posts and publishes them at the chosen time, so Codex does not need to stay open. For unattended runs, call codex exec with your prompt from a script or cron job. Keep a human reviewing the output, since Codex will publish exactly what it is told to publish.

Do I need a Postiz API key to post to Hashnode from Codex?

Not with the MCP route. Run codex mcp login postiz and Codex signs in to your Postiz account over OAuth, so it only reaches channels you already connected, including Hashnode. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your Hashnode login itself never leaves Postiz.

Is posting to Hashnode from Codex the same as posting from ChatGPT?

No. Codex is OpenAI's coding agent for your terminal and IDE, and it reaches Postiz through the Postiz skill or MCP server. ChatGPT is the chat assistant on chatgpt.com, which connects to Postiz as an app or custom MCP connector. Both can publish to Hashnode; see the ChatGPT guide for that setup.

Start publishing to Hashnode

Install Postiz Agent and automate your Hashnode content strategy with AI-powered scheduling and publishing.