Tools for publishing to Ghost CMS — plus an unrelated n8n trigger node for the Nodey mobile app that lives in the same monorepo.
This monorepo contains four packages:
| Package | Description | Audience |
|---|---|---|
ghost-blocks |
Node.js library for publishing to Ghost. Use directly in any Node.js app. | Any Node.js consumer |
n8n-nodes-ghost-blocks |
n8n community node, full features (image upload, bookmark/embed auto-enrichment). | Self-hosted n8n |
n8n-nodes-ghost-blocks-cloud |
n8n community node, slim verified-compatible edition. | n8n Cloud |
n8n-nodes-nodey |
n8n community trigger node — fires a workflow when an NFC tag is scanned via the Nodey mobile app. Verified-compatible. | n8n Cloud + self-hosted |
Ghost stores content in Lexical — a deeply nested JSON format with format flags, decorator nodes, and 24+ card types. Writing a complete article block by block is painful. Ghost's Admin API also requires short-lived JWT tokens (5-min expiry) generated from a hex-decoded HMAC secret, which most automation tools can't do natively.
Ghost Blocks lets you describe a post like this:
{
title: "My Article",
content: [
{ type: "paragraph", text: "First paragraph with **bold** and *italic*." },
{ type: "heading", level: 2, text: "Section" },
{ type: "image", src: "https://...", alt: "Photo" },
{ type: "callout", text: "Important note", emoji: "💡", color: "blue" },
{ type: "paywall" },
{ type: "paragraph", text: "Behind the paywall." }
],
status: "published"
}…and it builds the full Lexical document, handles auth, and publishes to Ghost.
Library:
npm install ghost-blocksimport { GhostPublisher } from 'ghost-blocks';
const publisher = new GhostPublisher({
url: 'https://my-site.ghost.io',
adminKey: 'YOUR_ID:YOUR_HEX_SECRET',
});
await publisher.createPost({
title: 'Hello world',
content: [{ type: 'paragraph', text: 'My first post **with formatting**.' }],
status: 'published',
});See packages/core/README.md for full documentation.
n8n community node:
In your n8n instance, go to Settings → Community Nodes → Install and enter n8n-nodes-ghost-blocks. Then add a Ghost Blocks node to any workflow.
See packages/n8n-node/README.md for setup details.
git clone https://github.com/TheFamousHesham/ghost-blocks
cd ghost-blocks
npm install # installs all workspaces
npm run build # builds both packages
npm run test # runs unit tests across all packagesTo run integration tests against a live Ghost instance:
GHOST_URL=https://my-site.ghost.io \
GHOST_ADMIN_KEY=id:hex_secret \
npm run -w ghost-blocks test:integrationReleases are published to npm with provenance attestations via GitHub Actions — required for n8n community-node verification from May 2026 onwards.
To release a new version of either package:
- Bump the
versionfield in the relevantpackages/*/package.json. - Update
CHANGELOG.md. - Commit and push to
main. - Create and push a tag matching the pattern
<package-name>@<version>:git tag -a ghost-blocks@0.3.2 -m "Release ghost-blocks 0.3.2" git push origin ghost-blocks@0.3.2 - The matching GitHub Action will build, test, verify the tag matches the package version, then publish with
--provenance.
GitHub Actions secrets required:
NPM_TOKEN— granular npm access token with publish rights onghost-blocksandn8n-nodes-ghost-blocks.
- Nodey (launching soon) — A mobile command centre for n8n. Run and debug workflows from your phone, with an AI workflow builder, geo-fenced location-based triggers, and NFC triggers.
- n8n workflow templates — A growing collection of production-ready n8n workflow templates for common automation patterns. Free to use and adapt.
MIT — see LICENSE.