Substack Publishing & Management for Openclaw

A high-performance interface for managing Substack publications directly via REST API and Python, bypassing the need for browser automation.

breynol01
v1.0.0
Mar 22, 2026
0
903
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install substack

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install substack using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Substack Publishing & Management?

The Substack skill provides a robust programmatic interface for the Alternative Partners publication on Substack. Instead of relying on fragile web-scraping or browser-based automation like Playwright, this skill utilizes the internal Substack REST API with session-based authentication. It is designed to handle the entire lifecycle of a post, from initial draft creation to live updates of published content.

By leveraging Openclaw Skills, developers and content creators can integrate their newsletter workflows into larger automated pipelines. The skill handles the complexities of ProseMirror JSON conversion, ensuring that plain text content is correctly formatted into the structured document format required by the Substack editor.

Substack Publishing & Management Use Cases

  • Automating the delivery of AI-generated content from a research pipeline to Substack drafts.
  • Updating existing published posts with new data or corrections without manual intervention.
  • Managing multiple draft versions and performing bulk post listings for content audits.
  • Integrating a research gate that performs competitive sweeps before drafting content.

How Substack Publishing & Management Works

  1. The system authenticates using a SUBSTACK_SID session cookie provided via environment variables.
  2. When a user provides plain text content, the skill converts the text into a ProseMirror JSON 'doc' structure with defined paragraph nodes.
  3. For new content, the skill sends a POST request to the drafts endpoint; for updates, it targets the specific draft ID associated with the post.
  4. If publishing is requested, the skill triggers the publish endpoint, making the content live on the web.
  5. The workflow defaults to web-only publishing (send_email: False) to allow for manual review before triggering subscriber notifications.

Substack Publishing & Management Setup

First, ensure your SUBSTACK_SID is configured in your environment. You can find this value in your browser's DevTools as the connect.sid cookie.

# Navigate to your content pipeline directory
cd ~/Documents/Codex/Content/ap-content-pipeline

# Set your environment variable
export SUBSTACK_SID="your_session_cookie_here"

# Execute a direct publish via the CLI
python3 publishers/substack.py "My SEO Title" "First paragraph.\n\nSecond paragraph."

Substack Publishing & Management Data Schema & Taxonomy

The skill organizes data around the Substack API taxonomy and internal pipeline structures:

Data Type Format Description
Authentication String SUBSTACK_SID session cookie
Post Body JSON ProseMirror doc format converted from plain text
Post ID Integer Unique numeric identifier used for both drafts and published posts
Pipeline Inbox JSON idea_inbox.json tracking research and draft status

Substack Publishing & Management Advanced Features

  • Direct REST API interaction bypassing the need for a GUI or browser overhead.
  • In-place editing of already-published posts using the drafts endpoint override.
  • Automated research integration via research_gate.py for competitive differentiation analysis.
  • Soft-veto Slack notifications and scheduled release windows via the AP Content Pipeline.
  • Error-resilient workflow that automatically maps slugs to numeric post IDs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*