Moderate Comment

wordpress.approve_comment
ActionBusiness appsconnection required

Calls the WordPress API with the connection's credentials.

Approve a pending comment, or move it to hold, spam or trash. The connection user needs moderate_comments rights.

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
comment_id
Id of the comment to moderate.
stringYes———
status
Status to move the comment to; defaults to approved.
stringNoapprovedone of "approved", "hold", "spam", "trash"—

Example configuration

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

{
  "status": "approved"
}

Output

One shape.

result

FieldTypeExample
id
Comment id.
number—
post
Id of the post the comment belongs to.
number—
parent
Id of the comment this one replies to, 0 when top level.
number—
status
Moderation status: approved, hold, spam or trash.
string—
author_name
Display name of the comment author.
string—
date
When the comment was posted, in the site's timezone.
string—
link
Permalink that anchors to the comment.
string—
content.rendered
Comment body as HTML.
string—
{
  "author_name": "",
  "content": {
    "rendered": ""
  },
  "date": "",
  "id": 0,
  "link": "",
  "parent": 0,
  "post": 0,
  "status": ""
}

Notes

  • POST /wp/v2/comments/<id> with a status of approved, hold, spam or trash.

See Moderate Comment 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.