Search all guides

Reference · Tools

WordPress integration

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.

Works as
Action
Tool name
wordpress
Operations
5 — Create , Delete , Get , Get Many , Update
Parameters
42
Outputs
Output, Error
Credentials
WordPress API
Official docs
WordPress docs developer.wordpress.org

What you can build with WordPress

  • 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.

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.

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
TitlestringYes—The title for the post. Supports expressions.
Additional FieldscollectionNo{}Optional fields to set on the new post.
— Author IDstringNo—The ID for the author of the post. Find author IDs via the User > Get Many operation.
— CategoriesstringNo—Comma-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
— ContentstringNo—The content for the post (HTML).
— DatedateTimeNo—The 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
— PasswordstringNo—A password to protect access to the content and excerpt.
— Ping StatusoptionsNoopenWhether pingbacks/trackbacks are accepted.
Options: open, closed
— SlugstringNo—An 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).
— TagsstringNo—Comma-separated list of tag IDs to assign to the post. Find tag IDs in WordPress Admin > Posts > Tags.
— TemplatestringNo—The theme template file name. For Elementor sites, use: elementor_canvas, elementor_header_footer, or elementor_theme.

Post: Delete

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

Post: Get

ParameterTypeRequiredDefaultDescription
Post IDstringYes—Unique 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
— PasswordstringNo—The 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.
— AfterdateTimeNo—Limit response to posts published after a given ISO8601 compliant date.
— Author IDsstringNo—Comma-separated author IDs to limit results to specific authors.
— BeforedateTimeNo—Limit response to posts published before a given ISO8601 compliant date.
— CategoriesstringNo—Comma-separated category IDs to include.
— ContextoptionsNoviewScope under which the request is made; determines fields present in response.
Options: view, embed, edit
— Exclude CategoriesstringNo—Comma-separated category IDs to exclude.
— Exclude TagsstringNo—Comma-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
— SearchstringNo—Limit 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.
— TagsstringNo—Comma-separated tag IDs to include.

Post: Update

ParameterTypeRequiredDefaultDescription
Post IDstringYes—Unique identifier for the post. Supports expressions.
Update FieldscollectionNo{}Fields to change on the post. Fields you leave out are not sent.
— Author IDstringNo—The ID for the author of the post.
— CategoriesstringNo—Comma-separated list of category IDs.
— Comment StatusoptionsNoopenWhether or not comments are open on the post.
Options: open, closed
— ContentstringNo—The content for the post (HTML).
— DatedateTimeNo—The 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
— PasswordstringNo—A password to protect access to the content and excerpt.
— Ping StatusoptionsNoopenWhether pingbacks/trackbacks are accepted.
Options: open, closed
— SlugstringNo—An 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).
— TagsstringNo—Comma-separated list of tag IDs.
— TemplatestringNo—The theme template file name. For Elementor: elementor_canvas, elementor_header_footer, or elementor_theme.
— TitlestringNo—The title for the post.

Page: Create

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

Page: Delete

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

Page: Get

ParameterTypeRequiredDefaultDescription
Page IDstringYes—Unique 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
— PasswordstringNo—The 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.
— AfterdateTimeNo—Limit response to pages published after a given ISO8601 compliant date.
— Author IDsstringNo—Comma-separated author IDs to limit results to specific authors.
— BeforedateTimeNo—Limit 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 IDnumberNo—Limit result set to items with a particular parent page ID.
— SearchstringNo—Limit 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 IDstringYes—Unique identifier for the page. Supports expressions.
Update FieldscollectionNo{}Fields to change on the page. Fields you leave out are not sent.
— Author IDstringNo—The ID for the author of the page.
— Comment StatusoptionsNoopenWhether or not comments are open on the page.
Options: open, closed
— ContentstringNo—The content for the page (HTML).
— Featured Media IDnumberNo—The ID of the featured media for the page.
— Menu OrdernumberNo0The order of the page in relation to other pages.
— Parent IDnumberNo—The ID for the parent page.
— PasswordstringNo—A password to protect access to the content and excerpt.
— Ping StatusoptionsNoopenWhether pingbacks/trackbacks are accepted.
Options: open, closed
— SlugstringNo—An alphanumeric identifier for the page unique to its type.
— StatusoptionsNodraftA named status for the page.
Options: draft, future, pending, private, publish
— TemplatestringNo—The theme template file name. For Elementor: elementor_canvas, elementor_header_footer, or elementor_theme.
— TitlestringNo—The title for the page.

User: Create

ParameterTypeRequiredDefaultDescription
UsernamestringYes—Login name for the user. Supports expressions.
NamestringYes—Display name for the user. Supports expressions.
First NamestringYes—First name for the user. Supports expressions.
Last NamestringYes—Last name for the user. Supports expressions.
EmailstringYes—The email address for the user. Supports expressions.
PasswordstringYes—Password for the user. Supports expressions.
Additional FieldscollectionNo{}Optional profile fields to set on the new user.
— DescriptionstringNo—Description of the user.
— NicknamestringNo—The nickname for the user.
— SlugstringNo—An alphanumeric identifier for the user.
— URLstringNo—URL 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
ReassignstringYes—User 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 IDstringYes—Unique 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
— SearchstringNo—Limit results to those matching a string.
— WhooptionsNoauthorsLimit result set to users who are considered authors.
Options: authors

User: Update

ParameterTypeRequiredDefaultDescription
User IDstringYes—Unique identifier for the user. Supports expressions.
Update FieldscollectionNo{}Fields to change on the user. Fields you leave out are not sent.
— DescriptionstringNo—Description of the user.
— EmailstringNo—The email address for the user.
— First NamestringNo—First name for the user.
— Last NamestringNo—Last name for the user.
— NamestringNo—Display name for the user.
— NicknamestringNo—The nickname for the user.
— PasswordstringNo—Password for the user.
— SlugstringNo—An alphanumeric identifier for the user.
— URLstringNo—URL of the user.
— UsernamestringNo—Login 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 }}.

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

This tool manages WordPress posts, pages, and users. It is the right tool when you need to create, retrieve, update, or delete content and user accounts on a WordPress site, offering comprehensive control over these resources. It produces changes to the WordPress site, such as new or modified posts, pages, and users, or provides information about existing content and user details.

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 WordPress

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 reviewed . Spotted something wrong? Tell us.