Reference · Tools

WordPress

Create, read, update, and delete posts, pages, and users on a WordPress site via the WP REST API v2.

Action Marketing v1

The WordPress node manages posts, pages and users on a WordPress site through the WP REST API v2, with full CRUD. A typical build is publishing an approved draft from another system straight to the site, with categories and tags already applied.

Node type
Action
Parameters
42
Outputs
Output, Error
Credentials
WordPress API

WordPress

Manage WordPress posts, pages, and users via the REST API.

Overview

Connects a workflow to a WordPress site through the WP REST API v2. Create, read, update and delete posts, pages and users, and filter or page through large collections. You control the details WordPress exposes — publication status and date, categories and tags, post formats, sticky posts, comment and pingback settings, page hierarchy and menu order, and theme templates (including Elementor’s). Authentication uses an application password, so the node works against any WordPress 5.6 or newer site without an extra plugin.

Category: Marketing
Tool Name: wordpress
Version: 1

Appearance: Icon: si-wordpress | Color: #21759B

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires WordPress API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Postpost
Pagepage
Useruser

Operations

The operations available depend on the resource you select.

Post

OperationValueDescription
CreatecreateCreate a post
DeletedeleteDelete a post
GetgetGet a post
Get ManygetAllGet many posts
UpdateupdateUpdate a post

Page

OperationValueDescription
CreatecreateCreate a page
DeletedeleteDelete a page
GetgetGet a page
Get ManygetAllGet many pages
UpdateupdateUpdate a page

User

OperationValueDescription
CreatecreateCreate a user
DeletedeleteDelete a user, reassigning their content
GetgetGet a user
Get ManygetAllGet many users
UpdateupdateUpdate a user

Parameters

Post: Create

ParameterTypeRequiredDefaultDescription
TitlestringYesThe title for the post. Supports expressions.
Additional FieldscollectionNo{}Optional fields to set on the new post.
— Author IDstringNoThe ID for the author of the post. Find author IDs via the User > Get Many operation.
— CategoriesstringNoComma-separated list of category IDs to assign to the post. Find category IDs in WordPress Admin > Posts > Categories.
— Comment StatusoptionsNoopenWhether or not comments are open on the post.
Options: open, closed
— ContentstringNoThe content for the post (HTML).
— DatedateTimeNoThe date the post was published, in the site’s timezone.
— FormatoptionsNostandardThe format for the post.
Options: aside, audio, chat, gallery, image, link, quote, standard, status, video
— PasswordstringNoA password to protect access to the content and excerpt.
— Ping StatusoptionsNoopenWhether pingbacks/trackbacks are accepted.
Options: open, closed
— SlugstringNoAn alphanumeric identifier for the post unique to its type.
— StatusoptionsNodraftA named status for the post.
Options: draft, future, pending, private, publish
— StickybooleanNofalseWhether or not the post should be treated as sticky (pinned).
— TagsstringNoComma-separated list of tag IDs to assign to the post. Find tag IDs in WordPress Admin > Posts > Tags.
— TemplatestringNoThe theme template file name. For Elementor sites, use: elementor_canvas, elementor_header_footer, or elementor_theme.

Post: Delete

ParameterTypeRequiredDefaultDescription
Post IDstringYesUnique identifier for the post. Supports expressions.
OptionscollectionNo{}Deletion options.
— ForcebooleanNofalseWhether to bypass trash and force permanent deletion.

Post: Get

ParameterTypeRequiredDefaultDescription
Post IDstringYesUnique identifier for the post. Supports expressions.
OptionscollectionNo{}Optional settings for the read.
— ContextoptionsNoviewScope under which the request is made; determines fields present in response.
Options: view, embed, edit
— PasswordstringNoThe password for the post if it is password protected.

Post: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo10Max number of results to return. (shown when Return All is false)
OptionscollectionNo{}Filters and sorting for the query.
— AfterdateTimeNoLimit response to posts published after a given ISO8601 compliant date.
— Author IDsstringNoComma-separated author IDs to limit results to specific authors.
— BeforedateTimeNoLimit response to posts published before a given ISO8601 compliant date.
— CategoriesstringNoComma-separated category IDs to include.
— ContextoptionsNoviewScope under which the request is made; determines fields present in response.
Options: view, embed, edit
— Exclude CategoriesstringNoComma-separated category IDs to exclude.
— Exclude TagsstringNoComma-separated tag IDs to exclude.
— OrderoptionsNodescOrder sort attribute ascending or descending.
Options: asc, desc
— Order ByoptionsNoidSort collection by object attribute.
Options: author, date, id, include, include_slugs, modified, parent, relevance, slug, title
— SearchstringNoLimit results to those matching a string.
— StatusoptionsNopublishLimit result set to posts with a specific status.
Options: draft, future, pending, private, publish
— StickybooleanNofalseWhether to limit the result set to items that are sticky.
— TagsstringNoComma-separated tag IDs to include.

Post: Update

ParameterTypeRequiredDefaultDescription
Post IDstringYesUnique identifier for the post. Supports expressions.
Update FieldscollectionNo{}Fields to change on the post. Fields you leave out are not sent.
— Author IDstringNoThe ID for the author of the post.
— CategoriesstringNoComma-separated list of category IDs.
— Comment StatusoptionsNoopenWhether or not comments are open on the post.
Options: open, closed
— ContentstringNoThe content for the post (HTML).
— DatedateTimeNoThe date the post was published, in the site’s timezone.
— FormatoptionsNostandardThe format for the post.
Options: aside, audio, chat, gallery, image, link, quote, standard, status, video
— PasswordstringNoA password to protect access to the content and excerpt.
— Ping StatusoptionsNoopenWhether pingbacks/trackbacks are accepted.
Options: open, closed
— SlugstringNoAn alphanumeric identifier for the post unique to its type.
— StatusoptionsNodraftA named status for the post.
Options: draft, future, pending, private, publish
— StickybooleanNofalseWhether or not the post should be treated as sticky (pinned).
— TagsstringNoComma-separated list of tag IDs.
— TemplatestringNoThe theme template file name. For Elementor: elementor_canvas, elementor_header_footer, or elementor_theme.
— TitlestringNoThe title for the post.

Page: Create

ParameterTypeRequiredDefaultDescription
TitlestringYesThe title for the page. Supports expressions.
Additional FieldscollectionNo{}Optional fields to set on the new page.
— Author IDstringNoThe ID for the author of the page.
— Comment StatusoptionsNoopenWhether or not comments are open on the page.
Options: open, closed
— ContentstringNoThe content for the page (HTML).
— Featured Media IDnumberNoThe ID of the featured media for the page.
— Menu OrdernumberNo0The order of the page in relation to other pages.
— Parent IDnumberNoThe ID for the parent page.
— PasswordstringNoA password to protect access to the content and excerpt.
— Ping StatusoptionsNoopenWhether pingbacks/trackbacks are accepted.
Options: open, closed
— SlugstringNoAn alphanumeric identifier for the page unique to its type.
— StatusoptionsNodraftA named status for the page.
Options: draft, future, pending, private, publish
— TemplatestringNoThe theme template file name. For Elementor: elementor_canvas, elementor_header_footer, or elementor_theme.

Page: Delete

ParameterTypeRequiredDefaultDescription
Page IDstringYesUnique identifier for the page. Supports expressions.
OptionscollectionNo{}Deletion options.
— ForcebooleanNofalseWhether to bypass trash and force permanent deletion.

Page: Get

ParameterTypeRequiredDefaultDescription
Page IDstringYesUnique identifier for the page. Supports expressions.
OptionscollectionNo{}Optional settings for the read.
— ContextoptionsNoviewScope under which the request is made; determines fields present in response.
Options: view, embed, edit
— PasswordstringNoThe password for the page if it is password protected.

Page: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo10Max number of results to return. (shown when Return All is false)
OptionscollectionNo{}Filters and sorting for the query.
— AfterdateTimeNoLimit response to pages published after a given ISO8601 compliant date.
— Author IDsstringNoComma-separated author IDs to limit results to specific authors.
— BeforedateTimeNoLimit response to pages published before a given ISO8601 compliant date.
— ContextoptionsNoviewScope under which the request is made; determines fields present in response.
Options: view, embed, edit
— Menu OrdernumberNo0Limit result set to items with a specific menu order value.
— OrderoptionsNodescOrder sort attribute ascending or descending.
Options: asc, desc
— Order ByoptionsNoidSort collection by object attribute.
Options: author, date, id, include, include_slugs, modified, parent, relevance, slug, title
— Page NumbernumberNo1Current page of the collection (used with limit, not returnAll).
— Parent Page IDnumberNoLimit result set to items with a particular parent page ID.
— SearchstringNoLimit results to those matching a string.
— StatusoptionsNopublishLimit result set to pages with a specific status.
Options: draft, future, pending, private, publish

Page: Update

ParameterTypeRequiredDefaultDescription
Page IDstringYesUnique identifier for the page. Supports expressions.
Update FieldscollectionNo{}Fields to change on the page. Fields you leave out are not sent.
— Author IDstringNoThe ID for the author of the page.
— Comment StatusoptionsNoopenWhether or not comments are open on the page.
Options: open, closed
— ContentstringNoThe content for the page (HTML).
— Featured Media IDnumberNoThe ID of the featured media for the page.
— Menu OrdernumberNo0The order of the page in relation to other pages.
— Parent IDnumberNoThe ID for the parent page.
— PasswordstringNoA password to protect access to the content and excerpt.
— Ping StatusoptionsNoopenWhether pingbacks/trackbacks are accepted.
Options: open, closed
— SlugstringNoAn alphanumeric identifier for the page unique to its type.
— StatusoptionsNodraftA named status for the page.
Options: draft, future, pending, private, publish
— TemplatestringNoThe theme template file name. For Elementor: elementor_canvas, elementor_header_footer, or elementor_theme.
— TitlestringNoThe title for the page.

User: Create

ParameterTypeRequiredDefaultDescription
UsernamestringYesLogin name for the user. Supports expressions.
NamestringYesDisplay name for the user. Supports expressions.
First NamestringYesFirst name for the user. Supports expressions.
Last NamestringYesLast name for the user. Supports expressions.
EmailstringYesThe email address for the user. Supports expressions.
PasswordstringYesPassword for the user. Supports expressions.
Additional FieldscollectionNo{}Optional profile fields to set on the new user.
— DescriptionstringNoDescription of the user.
— NicknamestringNoThe nickname for the user.
— SlugstringNoAn alphanumeric identifier for the user.
— URLstringNoURL of the user.

User: Delete

The account to delete is read from the userId field on the incoming item; the User ID parameter is not shown for this operation.

ParameterTypeRequiredDefaultDescription
ReassignstringYesUser ID to reassign the deleted user’s posts and links to. Deleting a user is permanent — WordPress does not trash user accounts.

User: Get

ParameterTypeRequiredDefaultDescription
User IDstringYesUnique identifier for the user. Supports expressions.
OptionscollectionNo{}Optional settings for the read.
— ContextoptionsNoviewScope under which the request is made; determines fields present in response.
Options: view, embed, edit

User: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo10Max number of results to return. (shown when Return All is false)
OptionscollectionNo{}Filters and sorting for the query.
— ContextoptionsNoviewScope under which the request is made; determines fields present in response.
Options: view, embed, edit
— OrderoptionsNodescOrder sort attribute ascending or descending.
Options: asc, desc
— Order ByoptionsNoidSort collection by object attribute.
Options: email, id, include, include_slugs, name, registered_date, slug, url
— SearchstringNoLimit results to those matching a string.
— WhooptionsNoauthorsLimit result set to users who are considered authors.
Options: authors

User: Update

ParameterTypeRequiredDefaultDescription
User IDstringYesUnique identifier for the user. Supports expressions.
Update FieldscollectionNo{}Fields to change on the user. Fields you leave out are not sent.
— DescriptionstringNoDescription of the user.
— EmailstringNoThe email address for the user.
— First NamestringNoFirst name for the user.
— Last NamestringNoLast name for the user.
— NamestringNoDisplay name for the user.
— NicknamestringNoThe nickname for the user.
— PasswordstringNoPassword for the user.
— SlugstringNoAn alphanumeric identifier for the user.
— URLstringNoURL of the user.
— UsernamestringNoLogin name for the user.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

The node merges the WordPress response onto the input item JSON — the incoming fields pass through, and anything WordPress returns under the same key replaces them (id, title, status and date are the usual collisions). Binary data on the input item is forwarded unchanged.

Create, Get, Update and Delete produce one output item per input item. Get Many fans out: every post, page or user in the response becomes its own output item, so a single input item can produce hundreds. When a list comes back empty, that input item produces no output items at all.

Resource / OperationOutput itemsItem JSON
Post / Page / User: Createone per input itemInput JSON merged with the record WordPress created
Post / Page / User: Getone per input itemInput JSON merged with the requested record
Post / Page / User: Updateone per input itemInput JSON merged with the updated record
Post / Page / User: Get Manyone per record returnedInput JSON merged with that record
Post / Page: Deleteone per input itemInput JSON merged with the delete response; nothing is merged when WordPress replies with no content
User: Deleteone per input itemInput JSON merged with the delete response

The fields inside each record are whatever the WP REST API returns for that resource, which depends on the Context option — edit exposes the most fields, embed the fewest. Reference them downstream by expression, for example {{ $json.id }}.

Usage Examples

  • Create a new draft blog post on WordPress
  • List all published pages from a WordPress site
  • Update the title and content of an existing post
  • Delete a WordPress page
  • Create a new WordPress user account
  • Get all WordPress users who are authors

Example Configuration

Create a draft post from an upstream item, with categories and tags given as numeric IDs:

{
  "type": "wordpress",
  "parameters": {
    "resource": "post",
    "operation": "create",
    "title": "{{ $json.title }}",
    "additionalFields": {
      "content": "{{ $json.html }}",
      "status": "draft",
      "categories": "5,12",
      "tags": "31",
      "commentStatus": "open",
      "format": "standard"
    }
  }
}

Publish a post that already exists on the site:

{
  "type": "wordpress",
  "parameters": {
    "resource": "post",
    "operation": "update",
    "postId": "{{ $json.id }}",
    "updateFields": {
      "status": "publish",
      "date": "{{ $datetime.now }}"
    }
  }
}

Fetch the twenty most recent published posts that match a search term:

{
  "type": "wordpress",
  "parameters": {
    "resource": "post",
    "operation": "getAll",
    "returnAll": false,
    "limit": 20,
    "options": {
      "status": "publish",
      "orderBy": "date",
      "order": "desc",
      "search": "{{ $json.keyword }}"
    }
  }
}

Create a child page that renders with an Elementor template:

{
  "type": "wordpress",
  "parameters": {
    "resource": "page",
    "operation": "create",
    "title": "{{ $json.name }}",
    "additionalFields": {
      "content": "{{ $json.body }}",
      "status": "publish",
      "parent": 10,
      "menuOrder": 1,
      "commentStatus": "closed",
      "template": "elementor_canvas"
    }
  }
}

Create a user account from a signup record:

{
  "type": "wordpress",
  "parameters": {
    "resource": "user",
    "operation": "create",
    "username": "{{ $json.username }}",
    "name": "{{ $json.fullName }}",
    "firstName": "{{ $json.firstName }}",
    "lastName": "{{ $json.lastName }}",
    "email": "{{ $json.email }}",
    "password": "{{ $json.tempPassword }}",
    "additionalFields": {
      "nickname": "{{ $json.firstName }}",
      "url": "{{ $json.website }}"
    }
  }
}

Delete a page permanently instead of moving it to the trash:

{
  "type": "wordpress",
  "parameters": {
    "resource": "page",
    "operation": "delete",
    "pageId": "{{ $json.pageId }}",
    "options": {
      "force": true
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Manage WordPress posts, pages, and users via the WP REST API v2 with full CRUD support.

Behavior notes

  • Categories and Tags take numeric IDs. Pass a comma-separated list of IDs such as 5,12; category or tag names are rejected. Look the IDs up in WordPress Admin > Posts > Categories or > Tags.
  • Get Many fans out. Each record returned becomes its own output item, so a node that follows a getAll runs once per post, page or user.
  • Return All pages through the whole collection. Turn it off and set Limit when you only want the newest few — that is much cheaper on a large site.
  • Deleting a post or page moves it to the trash unless you turn on Force in Options. Deleting a user is always permanent and always requires a Reassign user ID to inherit their content.
  • Post ID, Page ID and User ID accept expressions, and fall back to the matching field on the incoming item (postId, pageId, userId) when you leave them empty.
  • The site URL must use HTTPS. The application password travels with every request, so plain HTTP is refused.

Frequently asked questions

Why are my category or tag names rejected?

Categories and Tags take numeric IDs, passed as a comma-separated list such as `5,12`. Names are rejected — look the IDs up in WordPress Admin under Posts › Categories or Tags.

What happens after a Get Many?

It fans out: each record returned becomes its own output item, so the node after it runs once per post, page or user.

Can it manage users as well as content?

Yes — posts, pages and users are all supported through the same node.

Which credential does it need?

A WordPress API credential for the site.

Build with the WordPress node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need WordPress API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.