Create Category

wordpress.create_category
ActionBusiness appsconnection required

Calls the WordPress API with the connection's credentials.

Create a category term and return its id, which is what a post's categories field expects.

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

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

FieldTypeRequiredDefaultConstraintsExample
name
Display name of the category.
stringYes———
description
Description shown on the category archive.
stringNo———
slug
URL slug; WordPress derives one from the name when empty.
stringNo———
parent
Id of the parent category; 0 makes it top level.
numberNo—≥ 0—

Output

One shape.

result

FieldTypeExample
id
Term id — pass this in a post's categories or tags.
number—
name
Display name of the term.
string—
slug
URL slug of the term.
string—
taxonomy
Taxonomy the term belongs to (category or post_tag).
string—
count
How many published posts use the term.
number—
link
Public archive URL for the term.
string—
{
  "count": 0,
  "id": 0,
  "link": "",
  "name": "",
  "slug": "",
  "taxonomy": ""
}

Notes

  • POST /wp/v2/categories. WordPress returns 400 term_exists with the existing id when the name is already taken.

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