Get Post

wordpress.get_post
ActionBusiness appsconnection required

Calls the WordPress API with the connection's credentials.

Fetch one post by id. Choose context=edit when the workflow needs the raw block markup rather than the rendered HTML.

Connection

Required
Yes — the node will not save without one
Auth type
Username & password
Providers
WordPress
Secret shape
{"username": "…", "password": "… the application password …"}
Config it needs
site_url
Resolved by
config.connection_id, else node.connection_id

Configuration

2 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
Id of the post to fetch.
stringYes———
context
Response scope. 'view' returns rendered HTML only; 'edit' also returns the raw block markup (title.raw, content.raw) and needs edit rights on the item.
stringNoviewone of "view", "edit", "embed"—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "context": "view"
}

Output

One shape.

result

FieldTypeExample
id
WordPress id of the post.
number—
status
Publication status the post now has.
string—
link
Public permalink of the post.
string—
slug
URL slug WordPress stored.
string—
date
Publication date in the site's timezone.
string—
modified
Last modification date in the site's timezone.
string—
author
User id the post is attributed to.
number—
title.rendered
Title as HTML; title.raw is added by context=edit.
string—
content.rendered
Body as HTML; content.raw is added by context=edit.
string—
excerpt.rendered
Excerpt as HTML; excerpt.raw is added by context=edit.
string—
{
  "author": 0,
  "content": {
    "rendered": ""
  },
  "date": "",
  "excerpt": {
    "rendered": ""
  },
  "id": 0,
  "link": "",
  "modified": "",
  "slug": "",
  "status": "",
  "title": {
    "rendered": ""
  }
}

Notes

  • GET /wp/v2/posts/<id>. context=view returns content.rendered (expanded HTML) only; context=edit adds content.raw, the block markup you must send back on an update.

See Get Post run in a workflow.

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