Ghost Blocks icon

Ghost Blocks

Publish to Ghost CMS using simple content blocks

Actions8

Post → Update

AI-generated

Summary

Updates an existing Ghost post by ID, replacing its title, content (built from typed blocks into Ghost Lexical), metadata, SEO fields, and optionally sending it as a newsletter. Returns a summary of the updated post.

Inputs

  • postId (required) — ID of the Ghost post to update. The node first fetches the post to get its current updated_at, which Ghost needs for collision detection.
  • title — New title. Only sent if non-empty.
  • content — JSON array of typed content blocks (or a JSON string of one). Defaults to {{ $json.blocks }}. Block types: paragraph, heading, quote, image, gallery, divider, button, bookmark, callout, toggle, header, email_cta, email_content, signup, paywall, call_to_action, html, markdown, codeblock, embed, video, audio, file, product. Paragraph, heading and quote text supports inline markdown (bold, italic, code, links). Non-empty content replaces the post body with the generated Lexical document. Invalid JSON or an unknown block type throws an error. Empty content leaves the body untouched.
  • additionalFields — Optional post fields: authors (comma-separated emails), canonical_url, email_only, excerpt (sent as custom_excerpt), feature image URL/alt/caption, featured, published_at, slug, status (draft/published/scheduled), tags (comma-separated names, # prefix for internal tags), visibility (members/paid/public). Empty values are skipped.
  • seo — Optional meta title/description, OG title/description/image, and Twitter title/description/image. Only non-empty values are sent.
  • newsletter — Send as Newsletter: Send (boolean), Newsletter Slug, and Segment. The newsletter is triggered only when Send is true and a slug is set. Segment is passed as email_segment if provided.

Output shape

One item per input item, containing a summary of the updated post: id, uuid, url, status, title, slug, created_at, updated_at, published_at.

The full body, lexical, tags and authors are not returned. Use the Get operation if you need them. With Continue On Fail enabled, a failed item returns {error: message}. Only fields you supply are sent, so omitted fields are not modified. Tags and authors, if provided, are sent as lists and replace the existing ones.

Examples

Example 1: Replace the body of an existing post with AI-generated blocks

Post ID = {{ $json.id }}, Content = {{ $json.blocks }}, leave other fields empty.

Example 2: Publish a draft and email it to a segment

Post ID set; Additional Fields > Status = Published; Send as Newsletter > Send = true, Newsletter Slug = 'default-newsletter', Segment = 'status:free'.

Example 3: Schedule a post and update its SEO

Additional Fields > Status = Scheduled, Published At = ISO datetime; SEO Fields > Meta Title and Meta Description.

Links

Discussion