Publish or Schedule Post

ghost.publish_post
ActionBusiness appsconnection required

Calls the Ghost API with the connection's credentials.

Publish a draft, schedule it for later, and optionally send it to a newsletter — the one edit that changes a post's status.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Ghost
Secret shape
{"admin_api_key": "<id>:<secret>", "content_api_key": "…"}
Config it needs
admin_url, api_version
Resolved by
config.connection_id, else node.connection_id

Configuration

6 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
post_id
Ghost id of the post — the 24-character ObjectID from a previous step.
stringYes———
updated_at
The updated_at you read from the post, sent back so Ghost can refuse an edit that would overwrite a newer change. Leave it empty and the node re-reads the post first, which drops that protection.
stringNo—iso8601 format—
publish_at
When to publish, in ISO 8601 UTC. A future timestamp schedules the post; leave it empty to publish right now.
stringNo—iso8601 format—
newsletter
Slug of the newsletter to send this post to. Ghost emails a post only when an active newsletter slug is given; leave it empty to publish silently.
stringNo———
email_segment
An NQL member filter limiting who receives the email, such as 'status:free' or 'status:-free'. Defaults to every subscriber of the newsletter.
stringNo———
email_only
Whether to send the post as an email without publishing it on the site. Needs a newsletter slug, and leaves the post with status 'sent'.
booleanNo———

Output

One shape.

result

FieldTypeExample
id
Ghost id of the record, a 24-character ObjectID.
string—
uuid
Stable public uuid of the record.
string—
title
Title Ghost stored.
string—
slug
URL slug Ghost stored.
string—
status
Publication status: draft, published, scheduled or sent.
string—
visibility
Who may read it: public, members, paid or tiers.
string—
featured
Whether the record is flagged as featured.
boolean—
url
Public URL on the site; a draft gets its preview URL.
string—
excerpt
Custom excerpt when one is set, else one Ghost derived.
string—
feature_image
URL of the feature image, null when there is none.
string—
published_at
When it was, or will be, published (ISO 8601 UTC).
string—
created_at
When the record was created (ISO 8601 UTC).
string—
updated_at
When it last changed — pass this back on the next edit.
string—
html
Rendered HTML; present only when formats asked for it.
string—
lexical
Lexical source of the body, as a JSON string.
string—
tags
Tags on the record; present only with include=tags.
array—
authors
Authors of the record; present only with include=authors.
array—
email_only
True when the post was emailed and not put on the site.
boolean—
newsletter.slug
Slug of the newsletter the post was sent to.
string—
email.status
Delivery state of the send: submitted, or failed.
string—
email.error
Why Ghost could not send it, when the status is failed.
string—
email.email_count
How many members the email was addressed to.
number—
email.delivered_count
How many deliveries Ghost has confirmed so far.
number—
email.failed_count
How many deliveries have failed so far.
number—
{
  "authors": [],
  "created_at": "",
  "email": {
    "delivered_count": 0,
    "email_count": 0,
    "error": "",
    "failed_count": 0,
    "status": ""
  },
  "email_only": false,
  "excerpt": "",
  "feature_image": "",
  "featured": false,
  "html": "",
  "id": "",
  "lexical": "",
  "newsletter": {
    "slug": ""
  },
  "published_at": "",
  "slug": "",
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "url": "",
  "uuid": "",
  "visibility": ""
}

Notes

  • PUT /ghost/api/admin/posts/{id}/ with status published, or scheduled when publish_at is set.
  • Read email.status before calling the send a success: 'failed' means Ghost accepted the publish but the newsletter did not go out.
  • Ghost requires updated_at on an edit: send the value you read from the post, or the node re-reads it first and the collision guard no longer applies.

See Publish or Schedule Post run in a workflow.

In a technical demo we add the Ghost connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.