Skip to main content

WordPress.com Integration with SmythOS

Want to put your website's content on autopilot? Connect your WordPress.com site to SmythOS and empower your agents to create, edit, and manage your posts programmatically.

TL;DR

Securely link your WordPress.com account to SmythOS by creating an application in the WordPress.com Developer portal to get a Client ID and Secret. Then, use our components to automate your entire content lifecycle.

List of WordPress.com Components

Quickly compare WordPress.com components by what they do and their key I/O. Click any component name to jump directly to its detailed guide.

ComponentActionWhat it DoesInputsKey OutputsUse Case
Create PostWriteCreates a new post on your site (can be a draft or published).required site, title, contentidAutomatically creating a draft from an external document.
Edit PostWriteEdits the content or status of an existing post.required site, post_id, BodyidCorrecting a typo or updating an article with new info.
Get Post by Post IDReadRetrieves a single post using its unique Post ID.required site, post_idid, title, urlFetching a specific article's content for analysis.
Get Post by SlugReadRetrieves a single post using its URL slug.required site, post_slugid, title, urlFinding a post when you only know its web address.
Get PostsReadRetrieves a list of posts from your site.required site
optional number
postsGetting your 10 most recent articles for a dashboard.
Delete PostWritePermanently deletes a post from your site.required site, post_idResponseRemoving outdated or incorrect content.
INFO
Why Integrate WordPress.com with Your Agent?

WordPress.com is a powerful platform for publishing. Integrating it with SmythOS allows you to build sophisticated, automated content pipelines.

  • Automated Content Creation & Syndication: Create agents that take content from a Notion page, a Google Doc, or even an AI model's output and automatically create drafts or publish new posts on your WordPress.com site.
  • Content Synchronization: Keep your content consistent across platforms. An agent can monitor an external source of truth (like a product database) and use the Edit Post component to ensure your WordPress.com pages are always up-to-date.
  • Streamlined Editorial Workflows: Build an agent that takes a newly created draft, sends a notification to an editor for approval, and once approved (based on a signal from another tool), automatically publishes the post by updating its status.
  • Programmatic Content Management: Go beyond the WordPress dashboard. Use agents to perform bulk updates, delete old posts based on specific criteria, or manage content across multiple sites from a single interface.

Prerequisites

Before you begin, please ensure you have the following:

  • An active SmythOS account. (Sign up here).
  • A WordPress.com account and site.
  • OAuth 2.0 credentials (Client ID and Client Secret) from the WordPress.com Developer portal.

Getting Started With WordPress.com

The connection is handled via OAuth 2.0, which requires you to register an application in the WordPress.com Developer portal.

Step 1: Get Your OAuth 2.0 Credentials

  1. Go to the Developer Portal: Log in to your WordPress.com account and navigate to the Developer Apps page.
  2. Create a New Application: Click the Create New Application button.
  3. Fill in Application Details:
    • Give your application a Name (e.g., "SmythOS Content Agent").
    • Provide a Description and your Website URL.
    • Redirect URL: Enter the SmythOS callback URL: https://app.smythos.com/oauth/oauth2/callback.
  4. Copy Your Credentials: Once created, your application's Client ID and Client Secret will be displayed. Copy both values immediately.

Step 2: Store Your Credentials in SmythOS Vault

Your Client ID and Secret are sensitive credentials. Use the SmythOS Vault to store them securely.

  1. In your SmythOS dashboard, navigate to the Vault.
  2. Create new secrets for your Client ID and Client Secret, giving them memorable names like wordpress_client_id and wordpress_client_secret.
  3. For more details, see the Vault Documentation.

Step 3: Configure a WordPress.com Component

  1. In your SmythOS agent graph, drag and drop any WordPress.com component.
  2. Click the component to open its Settings panel.
  3. In the Client ID and Client Secret fields, select the secrets you saved in the Vault.
  4. Click Authenticate. You will be redirected to WordPress.com to authorize the connection.
  5. Your connection is now ready to use across all WordPress.com components.
Heads-up
The OAuth authentication flow connects your WordPress.com account to SmythOS. You only need to complete this process once.

Which WordPress.com Component Should I Use?

If you need to…TargetUse this ComponentWhy this one?
Create a new blog post as a draftsite, title, contentCreate PostThis is the standard method for adding new content. The status can be set to draft.
Update the title of an existing articlesite, post_idEdit PostModifies the fields of an existing post without creating a new one.
Get the content of a specific post you know the ID forsite, post_idGet Post by Post IDThe most direct way to retrieve a single post's data.
Get a list of your 10 most recent postssiteGet PostsRetrieves multiple posts at once, ideal for populating feeds or dashboards.
Permanently remove an old postsite, post_idDelete PostThe standard way to delete content from your site.

Component Details

This section provides detailed information for each WordPress.com component.

Edit Post

This feature allows for editing a post directly on WordPress.com, providing a streamlined method to update content.

INFO
This component uses the OAuth 2.0 flow detailed in the Getting Started section.

Component-Specific Settings

  • Body: A JSON editor where you construct the payload to edit a post. It supports a predefined schema which can be tailored as required (e.g., {"title": "New Title", "content": "<p>New content.</p>"}).

Inputs

FieldTypeRequiredNotes
sitestringYesThe identifier (typically the domain) of your WordPress.com site.
post_idstringYesThe unique identifier of the post you wish to edit.

Outputs

FieldTypeDescription
idintegerThe unique identifier confirming the post that was edited.
ResponseobjectThe complete API response detailing changes or the updated state of the post.
HeadersobjectThe HTTP headers from the response.
Use Case

An agent detects a typo in a published article, corrects it, and uses this component to update the live post with the corrected content.

Create Post

This component enables you to create a post on WordPress.com efficiently. By default, it creates a draft. (Formerly "Create Draft Post").

INFO
This component uses the OAuth 2.0 flow detailed in the Getting Started section.

Inputs

FieldTypeRequiredNotes
sitestringYesSpecify the identifier, typically the domain, of your WordPress.com site.
titlestringYesEnter the title of the post you want to create.
contentstringYesProvide the body of the post in HTML or plain text.

Outputs

FieldTypeDescription
idintegerThe unique identifier assigned to the newly created post.
ResponseobjectA complete API response that details the post creation.
HeadersobjectKey HTTP headers that accompany the response.
Use Case

An agent generates a first draft of a technical article using an AI model, then calls this component to save it to WordPress for an editor to review.

Draft vs. Publish

To publish a post immediately, you must add a status field with the value publish to the component's request body via advanced inputs.

Get Post by Post ID

Retrieve details of a single post from your WordPress.com site using its post ID.

INFO
This component does not require authentication as it accesses public data.

Inputs

FieldTypeRequiredNotes
sitestringYesThe full domain of your WordPress.com site.
post_idstringYesThe unique identifier (ID) of the post you wish to retrieve.

Outputs

FieldTypeDescription
idintegerThe unique identifier of the post.
authorIDintegerThe ID of the author who created the post.
urlstringThe direct URL where the post can be accessed.
categoriesobjectA list of categories the post is associated with.
titlestringThe title of the post.
ResponseobjectA detailed API response containing the fetched post data.
Use Case

An agent, tasked with summarizing an article, uses this component to fetch its full content before passing it to an LLM.

Get Post by Slug

Retrieve a single post based on its slug from a WordPress.com site.

INFO
This component does not require authentication as it accesses public data.

Inputs

FieldTypeRequiredNotes
sitestringYesThe complete domain of your WordPress.com site.
post_slugstringYesThe slug of the post you want to retrieve.

Outputs

FieldTypeDescription
idintegerThe unique identifier associated with the post.
authorIDintegerThe WordPress.com ID of the user who authored the post.
urlstringThe complete URL link where the post can be publicly accessed.
categoriesobjectA list of categories assigned to the post.
titlestringThe exact title of the post.
ResponseobjectThe comprehensive API response that includes full details of the requested post.
Use Case

An agent finds a link to a blog post and uses the URL slug to retrieve the full post details for analysis.

Get Posts

Retrieves a list of posts from a WordPress.com site.

INFO
This component does not require authentication as it accesses public data.

Inputs

FieldTypeRequiredNotes
sitestringYesThe complete domain of your WordPress.com site.
numberintegerOptionalThe number of posts you wish to retrieve. Default: 20.

Outputs

FieldTypeDescription
postsarrayA list of posts formatted as detailed objects.
ResponseobjectContains the comprehensive API response detailing the list of posts.
HeadersobjectDisplays essential HTTP headers returned with the response.
Use Case

A "content syndication" agent uses this component to get the latest posts from a source blog to be re-published elsewhere.

Delete Post

This component facilitates the deletion of a specific post from your WordPress.com site.

INFO
This component uses the OAuth 2.0 flow detailed in the Getting Started section.

Inputs

FieldTypeRequiredNotes
sitestringYesThe URL of your WordPress.com site where the post exists.
post_idstringYesThe unique identifier of the post you wish to delete.

Outputs

FieldTypeDescription
ResponseobjectDisplays the full server response, which includes confirmation of the deletion or details about any errors encountered.
HeadersobjectLists HTTP headers that provide additional context about the response.
Use Case

An agent identifies promotional posts for events that have already passed and automatically deletes them to keep the blog content current.

Irreversible Action

This action permanently deletes the post. Use with caution.

Best Practices & Advanced Tips

  • Secure Your Credentials: Always store your Client ID and Client Secret in the SmythOS Vault.
  • Use the Body for Advanced Operations: The Create Post and Edit Post components are much more powerful when you use the Body setting. You can specify tags, categories, status (draft, pending, publish), and more by constructing the appropriate JSON object according to the WordPress.com REST API documentation.
  • Manage Site and Post IDs: Your agent workflows will often require a site identifier and a post_id. The site is your site's domain. You can get post_ids from the Create Post or Get Posts components.

Troubleshooting Common Issues

  • Error: 401 Unauthorized / Authentication Errors

    • Cause: Your Client ID or Client Secret are incorrect, or the user did not properly grant consent during the OAuth flow.
    • Solution: Verify your credentials in the SmythOS Vault. Try re-authenticating the integration in the component settings.
  • Error: 403 Forbidden

    • Cause: The authenticated user does not have the necessary permissions (e.g., Editor or Administrator role) on the target WordPress.com site to perform the action.
    • Solution: Check the user's role on the WordPress.com site. Ensure they have the authority to publish or edit posts.
  • Error: 404 Not Found

    • Cause: The site identifier or post_id is incorrect.
    • Solution: Double-check your site domain and the ID of the post you are trying to interact with.

What's Next?

You are now ready to build powerful content publishing workflows with the SmythOS WordPress.com Integration!

Consider these ideas:

  • Build an Agent That...

    • Acts as a content syndication engine, monitoring an RSS feed and automatically creating draft posts on your WordPress.com site whenever a new item appears.
    • Connects to your social media. When you post a long-form update on another platform, an agent takes that content and creates a more detailed blog post on WordPress.com.
    • Generates articles with an LLM component, then uses Create Post to save them as drafts for human review and publication.
  • Explore Other Integrations:

    • After an agent publishes a new post, it can take the post URL from the output and share it across your social channels using the Ayrshare Integration.
    • Keep a content inventory by having your agent log the ID and URL of every new post to a Google Sheet or Notion database.