Create Comment

wordpress.create_comment
ActionBusiness appsconnection required

Calls the WordPress API with the connection's credentials.

Post a comment on one post, as the connection's user unless another author is named.

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

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

FieldTypeRequiredDefaultConstraintsExample
post
Id of the post to comment on.
numberYes—≥ 1—
content
Body of the comment.
stringYes———
parent
Id of the comment this one replies to; 0 for a top-level comment.
numberNo—≥ 0—
author
User id to post as. Requires moderate_comments rights.
numberNo—≥ 1—
author_name
Display name for a comment not tied to a user account.
stringNo———
author_email
Email address for a comment not tied to a user account.
stringNo—email format—
status
Moderation status to create the comment in.
stringNo—one of "approved", "hold", "spam", "trash"—

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.

See Create 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.