Ghost Plus icon

Ghost Plus

Consume Ghost API V2 with enhanced features

Actions7

Post → Create

AI-generated

Overview

This node integrates with the Ghost CMS API (version 2) to create blog posts using either the Admin API or Content API as the data source. It is designed to facilitate automated content creation workflows, such as publishing new articles programmatically or importing posts from other systems.

Typical use cases include:

  • Automatically creating new blog posts in Ghost from external content sources.
  • Managing post metadata and publication status via automation.
  • Supporting different content formats (HTML or Mobile Doc JSON).
  • Enriching posts with additional fields like authors, tags, featured images, SEO metadata, and scheduling options.

For example, a marketing team could use this node to publish scheduled blog posts with rich metadata and images directly from their content management system or editorial calendar.

Properties

Name Meaning
Source Choose the API source for the data: Admin API or Content API. For creating posts, only the Admin API is applicable.
Title The title of the post (required when using Admin API).
Content Format Format of the post content: HTML or Mobile Doc (a JSON-based format used by Ghost).
Content The actual content of the post. If Content Format is HTML, this is a string containing HTML markup. If Content Format is Mobile Doc, this is a JSON object representing the post content.
Additional Fields A collection of optional fields to enrich the post:
- Authors List of author IDs or names associated with the post.
- Cannonical URL Custom canonical URL for SEO purposes.
- Code Injection Foot Custom code to inject into the footer of the post.
- Code Injection Head Custom code to inject into the head section of the post.
- Excerpt Custom excerpt text; if omitted, Ghost auto-generates one.
- Feature Image URL of the feature image for the post.
- Feature Image Alt Text Alternative text for the feature image.
- Feature Image Caption Caption text for the feature image.
- Featured Boolean flag to mark the post as featured.
- Meta Description SEO meta description for the post.
- Meta Title SEO meta title for the post.
- Open Graph Description Description used for social media sharing previews.
- Open Graph Image URL of the image used for social media sharing previews.
- Open Graph Title Title used for social media sharing previews.
- Published At Date and time when the post should be published. Required if status is "Scheduled".
- Slug URL slug for the post.
- Status Publication status of the post: Draft, Published, or Scheduled.
- Tag Names or IDs List of tag names or IDs associated with the post.
- Twitter Description Description used for Twitter card previews.
- Twitter Image URL of the image used for Twitter card previews.
- Twitter Title Title used for Twitter card previews.

Output

The node outputs an array of JSON objects representing the created posts. Each object corresponds to a post returned by the Ghost Admin API after creation and includes all standard post properties as provided by the API response, such as:

  • id: Unique identifier of the post.
  • title: Post title.
  • html or mobiledoc: Content of the post in the specified format.
  • Metadata fields like authors, tags, feature image URLs, SEO metadata, publication status, timestamps, etc.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Ghost CMS instance with Admin API credentials configured in n8n.
  • The node uses an API key credential for authentication depending on the selected source (Admin API or Content API).
  • Timezone handling depends on the node's timezone setting to correctly convert scheduled publish dates to UTC.

Troubleshooting

  • Error: "Content must be a valid JSON"
    Occurs if the content format is set to Mobile Doc but the provided content is not valid JSON. To fix, ensure the content field contains properly formatted JSON.

  • Error: "Published at must be define when status is scheduled"
    When scheduling a post, the Published At date/time must be specified. Make sure to provide a valid future datetime for scheduled posts.

  • API Authentication Errors
    Ensure that the correct API credentials are configured and selected according to the chosen source (Admin API or Content API). Missing or invalid credentials will cause authentication failures.

  • Invalid Author or Tag IDs
    When specifying authors or tags, ensure the IDs or names exist in the Ghost CMS instance. Use the node's load options to select valid values.

Links and References

Discussion