すべてのテンプレート

コンテンツ

Publish a Ghost Post from HTML

Create a Ghost draft from your HTML, publish that same post and read back its rendered body.

Open Flow で使用
Open Flow の Publish a Ghost Post from HTML ワークフローOpen Flow の Publish a Ghost Post from HTML ワークフロー

Create a Ghost draft from your HTML, publish that same post and read back its rendered body.

Setup

  1. In Ghost Admin, create a custom integration and copy its Admin API URL and Admin API key. Add the key as an Open Flow Secret Variable named GHOST_ADMIN_KEY and select it in Create and publish the Ghost post. Ghost Admin API
  2. In the same step, replace the sample Admin site URL, title and HTML. Use the integration’s HTTPS site URL, including its installation subdirectory if present. For a custom hostname, set this step’s HTTP capability host to that exact hostname. The template allows Ghost(Pro) Admin hosts under ghost.io by default.
  3. Run manually when the HTML is ready for public publication. The output contains the ID, title, rendered HTML and status.

Behavior

The workflow creates a draft, reads back its version and rendered HTML, and publishes the same post ID. The publishing request changes only status and includes the current updated_at to detect concurrent edits. Ghost can normalize HTML when creating the draft. The final read verifies that the same published post retains the draft’s title and rendered body. The workflow does not request a newsletter send. Create a post · Publish a post

Each manual run starts a new draft. If a creation or publication response fails, review Ghost Admin before running again. A request with an unreadable response may already have taken effect. Errors include the post ID when Ghost has confirmed it. The HTTP response limit is 1 MiB.

In n8n

Run this format on a self-hosted instance where trusted workflow editors can use Code. Configure GHOST_ADMIN_KEY as an environment secret accessible to the Code node through $env. Allow the built-in modules with NODE_FUNCTION_ALLOW_BUILTIN=crypto,https,url and enable environment access with N8N_BLOCK_ENV_ACCESS_IN_NODE=false. If you run external task runners, apply the built-in allowlist in their JavaScript runner environment and make the secret available to the n8n deployment. These instance settings grant access to trusted workflows. Code node module configuration

Set the HTTPS Admin site URL, title and HTML in Create and publish the Ghost post. Run manually and inspect that step’s output for the result. The short-lived Admin JWT stays inside the step in both formats.

Inspiration & credits

Adapted from Manual Ghost create workflow in Zie619/n8n-workflows. Attribution: Zie619 / n8n-workflows.

The collection’s MIT notice is pinned at a later revision. This is the collection notice at that revision; it does not establish a separate original template author’s license. Our changes are listed above; see repository licensing.

MIT License

Copyright (c) 2025 Zie619

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.