AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(wordpress): step form (#15680)
Talal Jaberca62fc940870
diff --git a/packages/pieces/community/wordpress/package.json b/packages/pieces/community/wordpress/package.jsonindex 682ade7343c..d5eeb06c8a6 100644--- a/packages/pieces/community/wordpress/package.json+++ b/packages/pieces/community/wordpress/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-wordpress",- "version": "0.5.0",+ "version": "0.6.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/wordpress/src/index.ts b/packages/pieces/community/wordpress/src/index.tsindex f3efd1bfba4..512bd6881c3 100644--- a/packages/pieces/community/wordpress/src/index.ts+++ b/packages/pieces/community/wordpress/src/index.ts@@ -19,14 +19,13 @@ import { wordpressNewPost } from './lib/trigger/new-post.trigger';import { updateWordPressPost } from './lib/actions/update-post.action';const markdownPropertyDescription = `-**Enable Basic Authentication:**+Connect with a WordPress **application password**:-1. Download the plugin from: https://github.com/WP-API/Basic-Auth (Click on Code -> Download Zip)-2. Log in to your WordPress dashboard.-3. Go to "Plugins" and click "Add New."-4. Choose "Upload Plugin" and select the downloaded file.-5. Install and activate the plugin.+1. In your WordPress admin, open **Users → Profile**.+2. Under **Application Passwords**, type a name and click **Add New Application Password**.+3. Copy the generated password and paste it below together with your username.+Your site must use HTTPS: the password travels with every request. On WordPress older than 5.6, install the [Basic Auth plugin](https://github.com/WP-API/Basic-Auth) and use your login password instead, still over HTTPS.`;export const wordpressAuth = PieceAuth.CustomAuth({@@ -36,16 +35,19 @@ export const wordpressAuth = PieceAuth.CustomAuth({username: Property.ShortText({displayName: 'Username',required: true,+ description: 'The WordPress user the flow acts as.',}),password: PieceAuth.SecretText({displayName: 'Password',required: true,+ description:+ 'Application password, or the login password with the Basic Auth plugin.',}),website_url: Property.ShortText({displayName: 'Website URL',required: true,- description:- 'URL of the wordpress url i.e https://www.example-website.com',+ description: 'Address of your WordPress site.',+ placeholder: 'https://example.com',}),},validate: async ({ auth }) => {@@ -53,7 +55,7 @@ export const wordpressAuth = PieceAuth.CustomAuth({if (!username || !password || !website_url) {return {valid: false,- error: 'please fill all the fields [username, password, website_url] ',+ error: 'Please fill in the username, password and website URL.',};}if (!wordpressCommon.isBaseUrl(website_url.trim())) {@@ -69,13 +71,13 @@ export const wordpressAuth = PieceAuth.CustomAuth({if (!apiEnabled) {return {valid: false,- error: `REST API is not reachable, visit ${website_url.trim()}/wp-json" \n make sure your settings (Settings -> Permalinks) are set to "Post name" (or any option other than "Plain") and disable any security plugins that might block the REST API `,+ error: `REST API is not reachable at ${website_url.trim()}/wp-json. In Settings → Permalinks pick any option other than "Plain", and disable security plugins that block the REST API.`,};}try {const request: HttpRequest = {method: HttpMethod.GET,- url: `${website_url}/wp-json/wp/v2/categories`,+ url: `${website_url.trim()}/wp-json/wp/v2/categories`,authentication: {type: AuthenticationType.BASIC,username: username,@@ -86,10 +88,11 @@ export const wordpressAuth = PieceAuth.CustomAuth({return {valid: true,};- } catch (e: any) {+ } catch (e) {+ const message = e instanceof Error ? e.message : String(e);return {valid: false,- error: 'Credentials are invalid. ' + e?.message,+ error: 'Credentials are invalid. ' + message,};}},@@ -99,7 +102,7 @@ export const wordpress = createPiece({displayName: 'WordPress',description: 'Open-source website creation software',- minimumSupportedRelease: '0.30.0',+ minimumSupportedRelease: '0.88.2',logoUrl: 'https://cdn.activepieces.com/pieces/wordpress.png',categories: [PieceCategory.MARKETING],auth: wordpressAuth,diff --git a/packages/pieces/community/wordpress/src/lib/actions/create-page.action.ts b/packages/pieces/community/wordpress/src/lib/actions/create-page.action.tsindex df969abc4b3..c8a69adb6be 100644--- a/packages/pieces/community/wordpress/src/lib/actions/create-page.action.ts+++ b/packages/pieces/community/wordpress/src/lib/actions/create-page.action.ts@@ -13,33 +13,23 @@ export const createWordPressPage = createAction({auth: wordpressAuth,name: 'create_page',classification: 'WRITE',- description: 'Create new page on WordPress',+ description: 'Add a new page to your WordPress site',audience: 'both',aiMetadata: { description: 'Publishes a new static page (not a blog post) on a WordPress site via the REST API, with optional status, slug, excerpt, and comment settings. Choose this for standalone pages like About or Contact rather than dated posts. Requires a title and HTML content; not idempotent — each call creates a separate page.', idempotent: false },displayName: 'Create Page',outputSchema: createPageActionOutputSchema,props: {title: Property.ShortText({- description: 'Title of the page about to be added',displayName: 'Title',required: true,}),content: Property.LongText({- description: 'Uses the WordPress Text Editor which supports HTML',+ description: 'Body of the page. HTML is allowed.',displayName: 'Content',required: true,}),- slug: Property.ShortText({- displayName: 'Slug',- required: false,- }),- date: Property.ShortText({- description: 'Page publish date (ISO-8601)',- displayName: 'Date',- required: false,- }),status: Property.StaticDropdown({- description: 'Choose status',+ description: 'Publish now, schedule it, or save as a draft.',displayName: 'Status',required: false,options: {@@ -53,17 +43,35 @@ export const createWordPressPage = createAction({],},}),+ date: Property.ShortText({+ description: "Publish date and time in the site's timezone.",+ displayName: 'Publish Date',+ placeholder: '2026-09-21T09:00:00',+ required: false,+ }),+ slug: Property.ShortText({+ advanced: true,+ description: 'Last part of the URL.',+ displayName: 'Slug',+ placeholder: 'my-first-post',+ required: false,+ }),excerpt: Property.LongText({- description: 'Uses the WordPress Text Editor which supports HTML',+ advanced: true,+ description: 'Short summary shown in listings. HTML is allowed.',displayName: 'Excerpt',required: false,}),comment_status: Property.Checkbox({- displayName: 'Enable Comments',+ advanced: true,+ description: 'On lets readers comment. Off leaves the setting as is.',+ displayName: 'Allow Comments',required: false,}),ping_status: Property.Checkbox({- displayName: 'Open to Pinging',+ advanced: true,+ description: 'On accepts pingbacks and trackbacks. Off leaves it as is.',+ displayName: 'Allow Pingbacks',required: false,}),},@@ -80,6 +88,11 @@ export const createWordPressPage = createAction({? 'open': 'closed';}+ if (context.propsValue.ping_status) {+ requestBody['ping_status'] = context.propsValue.ping_status+ ? 'open'+ : 'closed';+ }if (context.propsValue.slug) {requestBody['slug'] = context.propsValue.slug;}diff --git a/packages/pieces/community/wordpress/src/lib/actions/create-post.action.ts b/packages/pieces/community/wordpress/src/lib/actions/create-post.action.tsindex 75332f0c8bb..862fab239f1 100644--- a/packages/pieces/community/wordpress/src/lib/actions/create-post.action.ts+++ b/packages/pieces/community/wordpress/src/lib/actions/create-post.action.ts@@ -17,53 +17,61 @@ export const createWordPressPost = createAction({auth: wordpressAuth,name: 'create_post',classification: 'WRITE',- description: 'Create new post on WordPress',+ description: 'Add a new post to your WordPress site',audience: 'both',aiMetadata: { description: 'Publishes a new blog post on a WordPress site via the REST API, with optional status (draft/publish/etc.), categories, tags, excerpt, featured image, and custom ACF fields. Choose this to add fresh content; for editing an existing post use Update Post. Requires a title and HTML content; not idempotent — each call creates a separate post.', idempotent: false },displayName: 'Create Post',outputSchema: createPostActionOutputSchema,props: {title: Property.ShortText({- description: 'Title of the post about to be added',displayName: 'Title',required: true,}),content: Property.LongText({- description: 'Uses the WordPress Text Editor which supports HTML',+ description: 'Body of the post. HTML is allowed.',displayName: 'Content',required: true,}),- slug: Property.ShortText({- displayName: 'Slug',- required: false,- }),+ status: wordpressCommon.status,date: Property.ShortText({- description: 'Post publish date (ISO-8601)',- displayName: 'Date',- required: false,- }),- featured_media_file: wordpressCommon.featured_media_file,- tags: wordpressCommon.tags,- acfFields: Property.Object({- displayName: 'Custom ACF fields',- description:- 'Provide field name with value.You can find out field name from ACF plugin menu.',+ description: "Publish date and time in the site's timezone.",+ displayName: 'Publish Date',+ placeholder: '2026-09-21T09:00:00',required: false,}),categories: wordpressCommon.categories,+ tags: wordpressCommon.tags,featured_media: wordpressCommon.featured_media,- status: wordpressCommon.status,+ featured_media_file: wordpressCommon.featured_media_file,excerpt: Property.LongText({- description: 'Uses the WordPress Text Editor which supports HTML',+ description: 'Short summary shown in listings. HTML is allowed.',displayName: 'Excerpt',required: false,}),+ slug: Property.ShortText({+ advanced: true,+ description: 'Last part of the URL.',+ displayName: 'Slug',+ placeholder: 'my-first-post',+ required: false,+ }),+ acfFields: Property.Object({+ advanced: true,+ displayName: 'ACF Fields',+ description:+ 'Field names and values for the Advanced Custom Fields plugin.',+ required: false,+ }),comment_status: Property.Checkbox({- displayName: 'Enable Comments',+ advanced: true,+ description: 'On lets readers comment. Off leaves the setting as is.',+ displayName: 'Allow Comments',required: false,}),ping_status: Property.Checkbox({- displayName: 'Open to Pinging',+ advanced: true,+ description: 'On accepts pingbacks and trackbacks. Off leaves it as is.',+ displayName: 'Allow Pingbacks',required: false,}),},diff --git a/packages/pieces/community/wordpress/src/lib/actions/get-post.action.ts b/packages/pieces/community/wordpress/src/lib/actions/get-post.action.tsindex 4e53cd42752..6afe953a934 100644--- a/packages/pieces/community/wordpress/src/lib/actions/get-post.action.ts+++ b/packages/pieces/community/wordpress/src/lib/actions/get-post.action.ts@@ -17,14 +17,14 @@ export const getWordPressPost = createAction({auth: wordpressAuth,name: 'get_post',classification: 'READ',- description: 'Get a post from WordPress',+ description: 'Fetch one post by its ID',audience: 'both',aiMetadata: { description: 'Fetches a single WordPress post by its numeric post ID via the REST API. Use it to read the current content, status, or metadata of a known post before acting on it. Requires the post ID; read-only and idempotent.', idempotent: true },displayName: 'Get Post Details',outputSchema: getPostActionOutputSchema,props: {id: Property.Number({- description: 'The ID of the post to get',+ description: "Number after post= in the post's edit URL.",displayName: 'Post ID',required: true,}),diff --git a/packages/pieces/community/wordpress/src/lib/actions/update-post.action.ts b/packages/pieces/community/wordpress/src/lib/actions/update-post.action.tsindex a4e4a138e63..b5203a7c231 100644--- a/packages/pieces/community/wordpress/src/lib/actions/update-post.action.ts+++ b/packages/pieces/community/wordpress/src/lib/actions/update-post.action.ts@@ -13,7 +13,7 @@ export const updateWordPressPost = createAction({auth: wordpressAuth,name: 'update_post',classification: 'WRITE',- description: 'Update an existing post on WordPress.',+ description: 'Change the title, content or settings of an existing post',audience: 'both',aiMetadata: { description: 'Updates an existing WordPress post identified by its post ID, changing only the fields you supply (title, content, status, categories, tags, excerpt, featured image, or ACF fields). Choose this to edit or republish a known post rather than create a new one. Requires the target post ID; idempotent — repeating with the same input leaves the post in the same final state.', idempotent: true },displayName: 'Update Post',@@ -21,46 +21,56 @@ export const updateWordPressPost = createAction({props: {post: wordpressCommon.post,title: Property.ShortText({- description: 'Title of the post about to be added',+ description: 'New title. Empty keeps the current one.',displayName: 'Title',required: false,}),content: Property.LongText({- description: 'Uses the WordPress Text Editor which supports HTML',+ description: 'New body, HTML allowed. Empty keeps the current one.',displayName: 'Content',required: false,}),- slug: Property.ShortText({- displayName: 'Slug',+ status: wordpressCommon.status,+ categories: wordpressCommon.categories,+ tags: wordpressCommon.tags,+ featured_media: wordpressCommon.featured_media,+ featured_media_file: wordpressCommon.featured_media_file,+ excerpt: Property.LongText({+ description: 'Short summary shown in listings. HTML is allowed.',+ displayName: 'Excerpt',required: false,}),date: Property.ShortText({- description: 'Post publish date (ISO-8601)',- displayName: 'Date',+ advanced: true,+ description: "Publish date and time in the site's timezone.",+ displayName: 'Publish Date',+ placeholder: '2026-09-21T09:00:00',required: false,}),- featured_media_file: wordpressCommon.featured_media_file,- tags: wordpressCommon.tags,- acfFields: Property.Object({- displayName: 'Custom ACF fields',- description:- 'Provide field name with value.You can find out field name from ACF plugin menu.',+ slug: Property.ShortText({+ advanced: true,+ description: 'Last part of the URL.',+ displayName: 'Slug',+ placeholder: 'my-first-post',required: false,}),- categories: wordpressCommon.categories,- featured_media: wordpressCommon.featured_media,- status: wordpressCommon.status,- excerpt: Property.LongText({- description: 'Uses the WordPress Text Editor which supports HTML',- displayName: 'Excerpt',+ acfFields: Property.Object({+ advanced: true,+ displayName: 'ACF Fields',+ description:+ 'Field names and values for the Advanced Custom Fields plugin.',required: false,}),comment_status: Property.Checkbox({- displayName: 'Enable Comments',+ advanced: true,+ description: 'On lets readers comment. Off leaves the setting as is.',+ displayName: 'Allow Comments',required: false,}),ping_status: Property.Checkbox({- displayName: 'Open to Pinging',+ advanced: true,+ description: 'On accepts pingbacks and trackbacks. Off leaves it as is.',+ displayName: 'Allow Pingbacks',required: false,}),},diff --git a/packages/pieces/community/wordpress/src/lib/common/index.ts b/packages/pieces/community/wordpress/src/lib/common/index.tsindex e58929db6f9..96875c24bf5 100644--- a/packages/pieces/community/wordpress/src/lib/common/index.ts+++ b/packages/pieces/community/wordpress/src/lib/common/index.ts@@ -16,13 +16,14 @@ const PAGE_HEADER = 'x-wp-totalpages';export const wordpressCommon = {featured_media_file: Property.File({- displayName: 'Featured Media (URL)',+ displayName: 'Featured Image File',required: false,- description: 'URL of featured media',+ description: 'Upload an image or paste its URL. Overrides Featured Image.',}),authors: Property.Dropdown({auth: wordpressAuth,- displayName: 'Authors',+ displayName: 'Author',+ description: 'Only posts by this author. Empty means any author.',required: false,refreshers: [],options: async ({ auth }) => {@@ -38,7 +39,7 @@ export const wordpressCommon = {if (!connection?.username || !connection?.password || !websiteUrl) {return {disabled: true,- placeholder: 'Connect your account first',+ placeholder: 'Please connect your account first',options: [],};}@@ -50,6 +51,7 @@ export const wordpressCommon = {username: connection.username,password: connection.password,},+ queryParams: { per_page: '100' },};const response = await httpClient.sendRequest<{ id: string; name: string }[]@@ -63,7 +65,7 @@ export const wordpressCommon = {}),tags: Property.MultiSelectDropdown<string, false,typeof wordpressAuth>({auth: wordpressAuth,- description: 'Post tags',+ description: 'Pick existing tags. Create new ones in WordPress.',displayName: 'Tags',required: false,refreshers: [],@@ -80,7 +82,7 @@ export const wordpressCommon = {if (!(await wordpressCommon.urlExists(connection.website_url.trim()))) {return {disabled: true,- placeholder: 'Incorrect website url',+ placeholder: 'Website URL is not reachable',options: [],};}@@ -97,7 +99,7 @@ export const wordpressCommon = {let tags = await wordpressCommon.getTags(getTagsParams);while (hasNext) {result.push(...tags.tags);- hasNext = pageCursor <= tags.totalPages;+ hasNext = pageCursor < tags.totalPages;if (hasNext) {pageCursor++;tags = await wordpressCommon.getTags({@@ -110,7 +112,7 @@ export const wordpressCommon = {return {disabled: true,options: [],- placeholder: 'Please add tags from your admin dashboard',+ placeholder: 'No tags found. Create some in WordPress first.',};}const options = result.map((res) => {@@ -127,7 +129,8 @@ export const wordpressCommon = {}),categories: Property.MultiSelectDropdown<string, false,typeof wordpressAuth>({auth: wordpressAuth,- description: 'Post categories',+ description:+ 'Pick existing categories. Create new ones in WordPress.',displayName: 'Categories',required: false,refreshers: [],@@ -143,7 +146,7 @@ export const wordpressCommon = {if (!(await wordpressCommon.urlExists(connection.website_url.trim()))) {return {disabled: true,- placeholder: 'Incorrect website url',+ placeholder: 'Website URL is not reachable',options: [],};}@@ -153,7 +156,6 @@ export const wordpressCommon = {websiteUrl: connection.website_url,username: connection.username,password: connection.password,- perPage: 10,page: pageCursor,};const result: { id: string; name: string }[] = [];@@ -161,7 +163,7 @@ export const wordpressCommon = {let hasNext = true;while (hasNext) {result.push(...categories.categories);- hasNext = pageCursor <= categories.totalPages;+ hasNext = pageCursor < categories.totalPages;if (hasNext) {pageCursor++;categories = await wordpressCommon.getCategories({@@ -174,7 +176,7 @@ export const wordpressCommon = {return {disabled: true,options: [],- placeholder: 'Please add categories from your admin dashboard',+ placeholder: 'No categories found. Create some in WordPress first.',};}const options = result.map((res) => {@@ -191,8 +193,8 @@ export const wordpressCommon = {}),featured_media: Property.Dropdown({auth: wordpressAuth,- description: 'Choose from one of your uploaded media files',- displayName: 'Featured Media (image)',+ description: 'Pick an image already in your media library.',+ displayName: 'Featured Image',required: false,refreshers: [],options: async ({ auth }) => {@@ -207,7 +209,7 @@ export const wordpressCommon = {if (!(await wordpressCommon.urlExists(connection.website_url.trim()))) {return {disabled: true,- placeholder: 'Incorrect website url',+ placeholder: 'Website URL is not reachable',options: [],};}@@ -220,21 +222,25 @@ export const wordpressCommon = {page: pageCursor,};const result: WordPressMedia[] = [];+ let hasNext = true;let media = await wordpressCommon.getMedia(getMediaParams);- if (media.totalPages === 0) {- result.push(...media.media);- }- while (media.media.length > 0 && pageCursor <= media.totalPages) {+ while (hasNext) {result.push(...media.media);- pageCursor++;- media = await wordpressCommon.getMedia(getMediaParams);+ hasNext = pageCursor < media.totalPages;+ if (hasNext) {+ pageCursor++;+ media = await wordpressCommon.getMedia({+ ...getMediaParams,+ page: pageCursor,+ });+ }}if (result.length === 0) {return {disabled: true,options: [],placeholder:- 'Please add an image to your media from your admin dashboard',+ 'No images found. Upload some to the media library first.',};}const options = result.map((res) => {@@ -250,7 +256,7 @@ export const wordpressCommon = {},}),status: Property.StaticDropdown({- description: 'Choose post status',+ description: 'Publish now, schedule it, or save as a draft.',displayName: 'Status',required: false,options: {@@ -283,7 +289,7 @@ export const wordpressCommon = {if (!connection?.username || !connection?.password || !websiteUrl) {return {disabled: true,- placeholder: 'Connect your account first',+ placeholder: 'Please connect your account first',options: [],};}@@ -348,6 +354,7 @@ export const wordpressCommon = {order: 'desc',before: new Date().toISOString(),after: params.afterDate,+ per_page: '100',page: params.page.toString(),};if (params.authors) {@@ -382,6 +389,7 @@ export const wordpressCommon = {method: HttpMethod.GET,url: `${params.websiteUrl}/wp-json/wp/v2/media`,queryParams: {+ per_page: '100',page: params.page.toString(),},authentication: {@@ -409,6 +417,7 @@ export const wordpressCommon = {method: HttpMethod.GET,url: `${params.websiteUrl}/wp-json/wp/v2/tags`,queryParams: {+ per_page: '100',page: params.page.toString(),},authentication: {@@ -443,6 +452,7 @@ export const wordpressCommon = {password: params.password,},queryParams: {+ per_page: '100',page: params.page.toString(),},};