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.
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.
Component | Action | What it Does | Inputs | Key Outputs | Use Case |
---|---|---|---|---|---|
Create Post | Write | Creates a new post on your site (can be a draft or published). | required site , title , content | id | Automatically creating a draft from an external document. |
Edit Post | Write | Edits the content or status of an existing post. | required site , post_id , Body | id | Correcting a typo or updating an article with new info. |
Get Post by Post ID | Read | Retrieves a single post using its unique Post ID. | required site , post_id | id , title , url | Fetching a specific article's content for analysis. |
Get Post by Slug | Read | Retrieves a single post using its URL slug. | required site , post_slug | id , title , url | Finding a post when you only know its web address. |
Get Posts | Read | Retrieves a list of posts from your site. | required site optional number | posts | Getting your 10 most recent articles for a dashboard. |
Delete Post | Write | Permanently deletes a post from your site. | required site , post_id | Response | Removing outdated or incorrect content. |
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
andClient 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
- Go to the Developer Portal: Log in to your WordPress.com account and navigate to the Developer Apps page.
- Create a New Application: Click the Create New Application button.
- 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
.
- 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.
- In your SmythOS dashboard, navigate to the Vault.
- Create new secrets for your
Client ID
andClient Secret
, giving them memorable names likewordpress_client_id
andwordpress_client_secret
. - For more details, see the Vault Documentation.
Step 3: Configure a WordPress.com Component
- In your SmythOS agent graph, drag and drop any WordPress.com component.
- Click the component to open its Settings panel.
- In the
Client ID
andClient Secret
fields, select the secrets you saved in the Vault. - Click Authenticate. You will be redirected to WordPress.com to authorize the connection.
- Your connection is now ready to use across all WordPress.com components.
Which WordPress.com Component Should I Use?
If you need to… | Target | Use this Component | Why this one? |
---|---|---|---|
Create a new blog post as a draft | site , title , content | Create Post | This is the standard method for adding new content. The status can be set to draft . |
Update the title of an existing article | site , post_id | Edit Post | Modifies the fields of an existing post without creating a new one. |
Get the content of a specific post you know the ID for | site , post_id | Get Post by Post ID | The most direct way to retrieve a single post's data. |
Get a list of your 10 most recent posts | site | Get Posts | Retrieves multiple posts at once, ideal for populating feeds or dashboards. |
Permanently remove an old post | site , post_id | Delete Post | The 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.
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
Field | Type | Required | Notes |
---|---|---|---|
site | string | Yes | The identifier (typically the domain) of your WordPress.com site. |
post_id | string | Yes | The unique identifier of the post you wish to edit. |
Outputs
Field | Type | Description |
---|---|---|
id | integer | The unique identifier confirming the post that was edited. |
Response | object | The complete API response detailing changes or the updated state of the post. |
Headers | object | The HTTP headers from the response. |
Create Post
This component enables you to create a post on WordPress.com efficiently. By default, it creates a draft. (Formerly "Create Draft Post").
Inputs
Field | Type | Required | Notes |
---|---|---|---|
site | string | Yes | Specify the identifier, typically the domain, of your WordPress.com site. |
title | string | Yes | Enter the title of the post you want to create. |
content | string | Yes | Provide the body of the post in HTML or plain text. |
Outputs
Field | Type | Description |
---|---|---|
id | integer | The unique identifier assigned to the newly created post. |
Response | object | A complete API response that details the post creation. |
Headers | object | Key HTTP headers that accompany the response. |
Get Post by Post ID
Retrieve details of a single post from your WordPress.com site using its post ID.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
site | string | Yes | The full domain of your WordPress.com site. |
post_id | string | Yes | The unique identifier (ID) of the post you wish to retrieve. |
Outputs
Field | Type | Description |
---|---|---|
id | integer | The unique identifier of the post. |
authorID | integer | The ID of the author who created the post. |
url | string | The direct URL where the post can be accessed. |
categories | object | A list of categories the post is associated with. |
title | string | The title of the post. |
Response | object | A detailed API response containing the fetched post data. |
Get Post by Slug
Retrieve a single post based on its slug from a WordPress.com site.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
site | string | Yes | The complete domain of your WordPress.com site. |
post_slug | string | Yes | The slug of the post you want to retrieve. |
Outputs
Field | Type | Description |
---|---|---|
id | integer | The unique identifier associated with the post. |
authorID | integer | The WordPress.com ID of the user who authored the post. |
url | string | The complete URL link where the post can be publicly accessed. |
categories | object | A list of categories assigned to the post. |
title | string | The exact title of the post. |
Response | object | The comprehensive API response that includes full details of the requested post. |
Get Posts
Retrieves a list of posts from a WordPress.com site.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
site | string | Yes | The complete domain of your WordPress.com site. |
number | integer | Optional | The number of posts you wish to retrieve. Default: 20 . |
Outputs
Field | Type | Description |
---|---|---|
posts | array | A list of posts formatted as detailed objects. |
Response | object | Contains the comprehensive API response detailing the list of posts. |
Headers | object | Displays essential HTTP headers returned with the response. |
Delete Post
This component facilitates the deletion of a specific post from your WordPress.com site.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
site | string | Yes | The URL of your WordPress.com site where the post exists. |
post_id | string | Yes | The unique identifier of the post you wish to delete. |
Outputs
Field | Type | Description |
---|---|---|
Response | object | Displays the full server response, which includes confirmation of the deletion or details about any errors encountered. |
Headers | object | Lists HTTP headers that provide additional context about the response. |
Best Practices & Advanced Tips
- Secure Your Credentials: Always store your
Client ID
andClient Secret
in the SmythOSVault
. - Use the
Body
for Advanced Operations: TheCreate Post
andEdit Post
components are much more powerful when you use theBody
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 apost_id
. Thesite
is your site's domain. You can getpost_id
s from theCreate Post
orGet Posts
components.
Troubleshooting Common Issues
-
Error:
401 Unauthorized
/ Authentication Errors- Cause: Your
Client ID
orClient 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.
- Cause: Your
-
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 orpost_id
is incorrect. - Solution: Double-check your site domain and the ID of the post you are trying to interact with.
- Cause: The
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.