Skip to content

WordPress

WordPress connects your flow to your WordPress site, whether it is hosted on WordPress.com or on your own server. With a single component you can look up, publish, change and delete posts and pages, and look up, create and update users.

You choose what to do with two fields: Operation (the action) and Entity (what it acts on). The component only shows the fields that combination needs.

When to use it

  • Publish on the company blog the articles an agent writes.
  • Save a post as a draft so the team can review it before publishing.
  • Review the latest published posts to prepare a newsletter.
  • Add new collaborators as users of the site.
  • Update the content of a page, such as opening hours or prices.

Configuration

The component needs a WordPress API credential. In it you choose the hosting type and enter the site’s address and the access details. See Credentials.

FieldWhat it does
Credential (required)Your WordPress site’s credential.
OperationThe action: Get, Create, Update or Delete. Default: Get.
EntityWhat it acts on: Post, Page or User. On WordPress.com sites, Site also appears when looking up. Default: Post.
Site IDWordPress.com sites only: the identifier of the site you work with. You can get it by looking up the Site entity.
Entity IDThe identifier of the post, page or user. It doesn’t appear when creating. Required to update and delete.

What you can do with each entity

EntityGetCreateUpdateDelete
PostYesYesYesYes
PageYesYesYesYes
UserYesYesYesYes (sites on your own server)
Site (WordPress.com only)YesNoNoNo

Looking up (Get)

FieldWhat it does
Entity IDWhen filled in, only that item is returned. When empty, a list is returned.
SearchOptional. A text to filter the list: only items containing it are shown.
LimitAdvanced option. The maximum number of items in the list. Default: 10.
Order ByAdvanced option. The field the list is sorted by. A hyphen in front sorts from highest to lowest, for example -date (newest first), which is the default. Without the hyphen, a site on your own server keeps its usual order and WordPress.com sorts from lowest to highest.
Get StatusAdvanced option, for posts and pages. Which status they must have: publish, draft, pending (awaiting review), future (scheduled) or private. Default: publish.

Creating or updating a post or a page

FieldWhat it does
TitleThe title. Required when creating.
Add Others CaracteristicsAdvanced option. Turn it on to fill in more details.
Other CaracteristicsWhich extra details you want to fill in. Each one shows its own field: Author (chosen from the site’s authors), Parent (parent page or post), Content, Slug (the last part of the address), Password (to protect it), Status (published, draft, pending, scheduled or private), Comment Status and Ping Status (whether it accepts comments and notifications from other sites), Menu Order (position in menus) and Featured Media (featured image, with the Featured Image ID field).

The title and the content accept text with web formatting.

When updating, only what you fill in changes: an empty Title, or a detail you don’t select, keeps its current value.

Creating or updating a user

Email (required when creating), Username, Name of user, First name, Last name, Role (administrator, editor, author, contributor or subscriber) and Password.

On WordPress.com sites, creating a user sends an invitation to that email with the author role.

When updating a user, only the fields you fill in change; the email is not needed to change the role or the names.

To delete a user, WordPress requires another user to hand their posts and pages to; otherwise it would delete them along with the user. The component never deletes a user without that: it returns an error that says so.

Output

The Result output returns what WordPress sends back: the items looked up, or the item created or updated with its details. When deleting, it returns a confirmation message. If the requested item doesn’t exist, it returns nothing.

Connect it to an agent, to Parse Data or to another component. The component can also be used as a tool by an agent.

Example

A real estate agency publishes a weekly article about its local market:

  1. An agent writes the article from the week’s news.
  2. Add WordPress and choose Create in Operation and Post in Entity.
  3. Connect the article title to Title, turn on Add Others Caracteristics and choose Content and Status.
  4. Connect the text to Content and choose draft in Status so the team reviews it before publishing.

Good practices

  • Create posts as drafts while you test the flow, and switch to published once you trust the result.
  • Use a WordPress account with just the permissions the flow needs.
  • WooCommerce: manages the WooCommerce store of a WordPress site.