first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled

This commit is contained in:
2026-03-17 16:22:57 +03:30
commit 3d5eaf9445
15349 changed files with 2847338 additions and 0 deletions
@@ -0,0 +1,57 @@
import { NodeApiError } from 'n8n-workflow';
import { wordpressApiRequest, wordpressApiRequestAllItems } from '../GenericFunctions';
describe('Wordpress > GenericFunctions', () => {
const mockFunctions: any = {
helpers: {
requestWithAuthentication: jest.fn(),
},
getCredentials: jest.fn().mockResolvedValue({
url: 'http://example.com',
allowUnauthorizedCerts: false,
}),
getNode: jest.fn(),
};
beforeEach(() => {
jest.clearAllMocks();
});
describe('wordpressApiRequest', () => {
it('should make a successful request', async () => {
mockFunctions.helpers.requestWithAuthentication.mockResolvedValue({ data: 'testData' });
const result = await wordpressApiRequest.call(mockFunctions, 'GET', '/posts', {}, {});
expect(result).toEqual({ data: 'testData' });
expect(mockFunctions.helpers.requestWithAuthentication).toHaveBeenCalled();
});
it('should throw NodeApiError on failure', async () => {
mockFunctions.helpers.requestWithAuthentication.mockRejectedValue({ message: 'fail' });
await expect(
wordpressApiRequest.call(mockFunctions, 'GET', '/posts', {}, {}),
).rejects.toThrow(NodeApiError);
});
});
describe('wordpressApiRequestAllItems', () => {
it('should accumulate all pages', async () => {
mockFunctions.helpers.requestWithAuthentication
.mockResolvedValueOnce({
body: [{ post: 1 }],
headers: {
'x-wp-totalpages': '2',
},
})
.mockResolvedValueOnce({
body: [{ post: 2 }],
headers: {
'x-wp-totalpages': '2',
},
});
const results = await wordpressApiRequestAllItems.call(mockFunctions, 'GET', '/posts');
expect(results).toEqual([{ post: 1 }, { post: 2 }]);
});
});
});
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
export const credentials = {
wordpressApi: {
url: 'https://myblog.com',
allowUnauthorizedCerts: false,
username: 'nodeqa',
password: 'fake-password',
},
};
@@ -0,0 +1,37 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { pageCreate, pageGet, pageGetMany, pageUpdate } from '../apiResponses';
import { credentials } from '../credentials';
describe('Wordpress > Page Workflows', () => {
beforeAll(() => {
const mock = nock(credentials.wordpressApi.url);
mock
.post('/wp-json/wp/v2/pages', {
title: 'A new page',
content: 'Some content',
status: 'draft',
comment_status: 'closed',
ping_status: 'closed',
menu_order: 1,
})
.reply(200, pageCreate);
mock.get('/wp-json/wp/v2/pages/2').reply(200, pageGet);
mock.get('/wp-json/wp/v2/pages').query({ per_page: 1 }).reply(200, pageGetMany);
mock
.get('/wp-json/wp/v2/pages')
.query({ per_page: 1, before: '2026-01-01T00:00:00' })
.reply(200, pageGetMany);
mock
.post('/wp-json/wp/v2/pages/2', {
id: 2,
title: 'New Title',
content: 'Updated Content',
slug: 'new-slug',
})
.reply(200, pageUpdate);
});
new NodeTestHarness().setupTests({ credentials });
});
@@ -0,0 +1,762 @@
{
"name": "Wordpress Test - Pages",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [-32, 464],
"id": "246376de-5cc4-4fd2-9671-0a45b8bff10d",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"resource": "page",
"title": "A new page",
"additionalFields": {
"content": "Some content",
"status": "draft",
"commentStatus": "closed",
"pingStatus": "closed",
"menuOrder": 1
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 80],
"id": "36cf31d4-ad52-4bbc-8abf-bd384b6968f7",
"name": "Page > Create",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {
"resource": "page",
"operation": "get",
"pageId": "2",
"options": {}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 272],
"id": "236d9c67-319b-435f-94e1-1719f2752a72",
"name": "Page > Get",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {
"resource": "page",
"operation": "getAll",
"limit": 1,
"options": {}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 464],
"id": "b1a3788f-9c81-4591-8a4c-e138612d3fb2",
"name": "Page > Get Many",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {
"resource": "page",
"operation": "update",
"pageId": "2",
"updateFields": {
"title": "New Title",
"content": "Updated Content",
"slug": "new-slug"
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 848],
"id": "cac71c1a-3367-4d5b-ba8d-d2285934be4e",
"name": "Page > Update",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 80],
"id": "bb846050-d39c-4e34-ad64-a97ccbbef256",
"name": "Create Response"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 272],
"id": "9634f881-592c-4165-8f9c-5a1aad5f76ee",
"name": "Get Response"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 464],
"id": "4343c931-3ded-4505-950c-43ba56929692",
"name": "Get Many Response"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 848],
"id": "e159e8fa-a9c9-4f54-a941-29dc7983fd3a",
"name": "Update Response"
},
{
"parameters": {
"resource": "page",
"operation": "getAll",
"limit": 1,
"options": {
"before": "2026-01-01T00:00:00"
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 656],
"id": "a08d9d51-e97f-4ea7-b189-d109b77e9f57",
"name": "Page > Get Many (With Filters)",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 656],
"id": "18c8cd20-de15-4ceb-9d6f-e4279532fe3c",
"name": "Get Many Response (With Filters)"
}
],
"pinData": {
"Create Response": [
{
"json": {
"id": 9,
"date": "2025-03-27T20:17:01",
"date_gmt": "2025-03-27T20:17:01",
"guid": {
"rendered": "https://myblog.com/?page_id=9",
"raw": "https://myblog.com/?page_id=9"
},
"modified": "2025-03-27T20:17:01",
"modified_gmt": "2025-03-27T20:17:01",
"password": "",
"slug": "",
"status": "draft",
"type": "page",
"link": "https://myblog.com/?page_id=9",
"title": {
"raw": "A new page",
"rendered": "A new page"
},
"content": {
"raw": "Some content",
"rendered": "<p>Some content</p>\n",
"protected": false,
"block_version": 0
},
"excerpt": {
"raw": "",
"rendered": "<p>Some content</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"parent": 0,
"menu_order": 1,
"comment_status": "closed",
"ping_status": "closed",
"template": "",
"meta": {
"footnotes": ""
},
"permalink_template": "https://myblog.com/%pagename%/",
"generated_slug": "a-new-page",
"class_list": ["post-9", "page", "type-page", "status-draft", "hentry"],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/9",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/page"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=9"
}
],
"version-history": [
{
"count": 0,
"href": "https://myblog.com/wp-json/wp/v2/pages/9/revisions"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=9"
}
],
"wp:action-publish": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/9"
}
],
"wp:action-unfiltered-html": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/9"
}
],
"wp:action-assign-author": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/9"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Get Response": [
{
"json": {
"id": 2,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?page_id=2"
},
"modified": "2025-03-27T18:05:01",
"modified_gmt": "2025-03-27T18:05:01",
"slug": "sample-page",
"status": "publish",
"type": "page",
"link": "https://myblog.com/sample-page/",
"title": {
"rendered": "Sample Page"
},
"content": {
"rendered": "\n<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:</p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Hi there! I&#8217;m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi&#241;a coladas. (And gettin&#8217; caught in the rain.)</p></blockquote>\n\n\n\n<p>&#8230;or something like this:</p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</p></blockquote>\n\n\n\n<p>As a new WordPress user, you should go to <a href=\"https://myblog.com/wp-admin/\">your dashboard</a> to delete this page and create new pages for your content. Have fun!</p>\n",
"protected": false
},
"excerpt": {
"rendered": "<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I&#8217;m a bike messenger [&hellip;]</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"parent": 0,
"menu_order": 0,
"comment_status": "closed",
"ping_status": "open",
"template": "",
"meta": {
"footnotes": ""
},
"class_list": ["post-2", "page", "type-page", "status-publish", "hentry"],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/2",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/page"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=2"
}
],
"version-history": [
{
"count": 0,
"href": "https://myblog.com/wp-json/wp/v2/pages/2/revisions"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=2"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Get Many Response": [
{
"json": {
"id": 2,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?page_id=2"
},
"modified": "2025-03-27T18:05:01",
"modified_gmt": "2025-03-27T18:05:01",
"slug": "sample-page",
"status": "publish",
"type": "page",
"link": "https://myblog.com/sample-page/",
"title": {
"rendered": "Sample Page"
},
"content": {
"rendered": "\n<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:</p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Hi there! I&#8217;m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi&#241;a coladas. (And gettin&#8217; caught in the rain.)</p></blockquote>\n\n\n\n<p>&#8230;or something like this:</p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</p></blockquote>\n\n\n\n<p>As a new WordPress user, you should go to <a href=\"https://myblog.com/wp-admin/\">your dashboard</a> to delete this page and create new pages for your content. Have fun!</p>\n",
"protected": false
},
"excerpt": {
"rendered": "<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I&#8217;m a bike messenger [&hellip;]</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"parent": 0,
"menu_order": 0,
"comment_status": "closed",
"ping_status": "open",
"template": "",
"meta": {
"footnotes": ""
},
"class_list": ["post-2", "page", "type-page", "status-publish", "hentry"],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/2",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/page"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=2"
}
],
"version-history": [
{
"count": 0,
"href": "https://myblog.com/wp-json/wp/v2/pages/2/revisions"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=2"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Update Response": [
{
"json": {
"id": 2,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?page_id=2",
"raw": "https://myblog.com/?page_id=2"
},
"modified": "2025-03-27T20:21:11",
"modified_gmt": "2025-03-27T20:21:11",
"password": "",
"slug": "new-slug",
"status": "publish",
"type": "page",
"link": "https://myblog.com/new-slug/",
"title": {
"raw": "New Title",
"rendered": "New Title"
},
"content": {
"raw": "Updated Content",
"rendered": "<p>Updated Content</p>\n",
"protected": false,
"block_version": 0
},
"excerpt": {
"raw": "",
"rendered": "<p>Updated Content</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"parent": 0,
"menu_order": 0,
"comment_status": "closed",
"ping_status": "open",
"template": "",
"meta": {
"footnotes": ""
},
"permalink_template": "https://myblog.com/%pagename%/",
"generated_slug": "new-title",
"class_list": ["post-2", "page", "type-page", "status-publish", "hentry"],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/2",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/page"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=2"
}
],
"version-history": [
{
"count": 1,
"href": "https://myblog.com/wp-json/wp/v2/pages/2/revisions"
}
],
"predecessor-version": [
{
"id": 10,
"href": "https://myblog.com/wp-json/wp/v2/pages/2/revisions/10"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=2"
}
],
"wp:action-publish": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/2"
}
],
"wp:action-unfiltered-html": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/2"
}
],
"wp:action-assign-author": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/2"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Get Many Response (With Filters)": [
{
"json": {
"id": 2,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?page_id=2"
},
"modified": "2025-03-27T18:05:01",
"modified_gmt": "2025-03-27T18:05:01",
"slug": "sample-page",
"status": "publish",
"type": "page",
"link": "https://myblog.com/sample-page/",
"title": {
"rendered": "Sample Page"
},
"content": {
"rendered": "\n<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:</p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Hi there! I&#8217;m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi&#241;a coladas. (And gettin&#8217; caught in the rain.)</p></blockquote>\n\n\n\n<p>&#8230;or something like this:</p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</p></blockquote>\n\n\n\n<p>As a new WordPress user, you should go to <a href=\"https://myblog.com/wp-admin/\">your dashboard</a> to delete this page and create new pages for your content. Have fun!</p>\n",
"protected": false
},
"excerpt": {
"rendered": "<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I&#8217;m a bike messenger [&hellip;]</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"parent": 0,
"menu_order": 0,
"comment_status": "closed",
"ping_status": "open",
"template": "",
"meta": {
"footnotes": ""
},
"class_list": ["post-2", "page", "type-page", "status-publish", "hentry"],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages/2",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/pages"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/page"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=2"
}
],
"version-history": [
{
"count": 0,
"href": "https://myblog.com/wp-json/wp/v2/pages/2/revisions"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=2"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
]
},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Page > Create",
"type": "main",
"index": 0
},
{
"node": "Page > Get",
"type": "main",
"index": 0
},
{
"node": "Page > Get Many",
"type": "main",
"index": 0
},
{
"node": "Page > Update",
"type": "main",
"index": 0
},
{
"node": "Page > Get Many (With Filters)",
"type": "main",
"index": 0
}
]
]
},
"Page > Create": {
"main": [
[
{
"node": "Create Response",
"type": "main",
"index": 0
}
]
]
},
"Page > Update": {
"main": [
[
{
"node": "Update Response",
"type": "main",
"index": 0
}
]
]
},
"Page > Get Many": {
"main": [
[
{
"node": "Get Many Response",
"type": "main",
"index": 0
}
]
]
},
"Page > Get": {
"main": [
[
{
"node": "Get Response",
"type": "main",
"index": 0
}
]
]
},
"Page > Get Many (With Filters)": {
"main": [
[
{
"node": "Get Many Response (With Filters)",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "b76bf6d6-3a62-4e01-938a-f63e55ef236b",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "eeda9e3069aca300d1dfceeb64beb5b53d715db44a50461bbc5cb0cf6daa01e3"
},
"id": "W7kWl5BZvsrmZeVw",
"tags": []
}
@@ -0,0 +1,43 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { postCreate, postGet, postGetMany, postUpdate } from '../apiResponses';
import { credentials } from '../credentials';
describe('Wordpress > Post Workflows', () => {
beforeAll(() => {
const mock = nock(credentials.wordpressApi.url);
mock.get('/wp-json/wp/v2/posts/1').reply(200, postGet);
mock.get('/wp-json/wp/v2/posts').query({ per_page: 10, page: 1 }).reply(200, postGetMany);
mock
.get('/wp-json/wp/v2/posts')
.query({ per_page: 10, page: 1, before: '2026-01-01T00:00:00' })
.reply(200, postGetMany);
mock
.post('/wp-json/wp/v2/posts', {
title: 'New Post',
author: 1,
content: 'This is my content',
slug: 'new-post',
status: 'future',
comment_status: 'closed',
ping_status: 'closed',
sticky: true,
categories: [1],
format: 'standard',
date: '2025-03-27T18:30:04',
})
.reply(200, postCreate);
mock
.post('/wp-json/wp/v2/posts/1', {
id: 1,
title: 'New Title',
content: 'Some new content',
status: 'publish',
date: '2025-03-27T18:05:01',
})
.reply(200, postUpdate);
});
new NodeTestHarness().setupTests({ credentials });
});
@@ -0,0 +1,941 @@
{
"name": "Wordpress Test - Posts",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [-32, 688],
"id": "d9528df2-82cb-47fe-8176-238283d1827e",
"name": "When clicking Execute workflow"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 688],
"id": "1f61c57c-8bf3-44bd-86a7-651906c1b06d",
"name": "Update Response"
},
{
"parameters": {
"operation": "update",
"postId": "1",
"updateFields": {
"title": "New Title",
"content": "Some new content",
"status": "publish",
"date": "2025-03-27T18:05:01"
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 688],
"id": "eb2e2d7a-48e9-49fb-a808-e2546ce14a2b",
"name": "Post > Update",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {
"operation": "getAll",
"returnAll": true,
"options": {}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 304],
"id": "72a59773-a15a-4e58-8bed-be1108449550",
"name": "Post > Get Many",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 304],
"id": "11b128da-9b78-4f02-93a7-c3db1bc3363a",
"name": "Get Many"
},
{
"parameters": {
"operation": "get",
"postId": "1",
"options": {}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 880],
"id": "3ff21988-4d92-4c87-831f-4e684248c761",
"name": "Post > Get",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 880],
"id": "dc730fc9-a28d-4eb4-aa8d-a1b85ff45ef9",
"name": "Get Response"
},
{
"parameters": {
"title": "New Post",
"additionalFields": {
"authorId": 1,
"content": "This is my content",
"slug": "new-post",
"status": "future",
"date": "2025-03-27T18:30:04",
"commentStatus": "closed",
"pingStatus": "closed",
"format": "standard",
"sticky": true,
"categories": [1]
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 1072],
"id": "f2e1c5f0-fbfa-419e-ba7a-ef60c8853304",
"name": "Post > Create",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 1072],
"id": "c386bee8-4bb9-4a1e-b4bc-4f8689722729",
"name": "Create Response"
},
{
"parameters": {
"operation": "getAll",
"returnAll": true,
"options": {
"before": "2026-01-01T00:00:00"
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [192, 496],
"id": "cc61993a-ac13-42d7-aace-c501da128361",
"name": "Post > Get Many (With Filters)",
"credentials": {
"wordpressApi": {
"id": "f5S0ZnKe8cDEPpjx",
"name": "Wordpress (localhost)"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [416, 496],
"id": "770a6cf9-93ca-4b56-a23b-b1d9904de993",
"name": "Get Many (With Filters)"
}
],
"pinData": {
"Update Response": [
{
"json": {
"id": 1,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?p=1",
"raw": "https://myblog.com/?p=1"
},
"modified": "2025-03-27T18:22:36",
"modified_gmt": "2025-03-27T18:22:36",
"password": "",
"slug": "hello-world",
"status": "publish",
"type": "post",
"link": "https://myblog.com/2025/03/27/hello-world/",
"title": {
"raw": "New Title",
"rendered": "New Title"
},
"content": {
"raw": "Some new content",
"rendered": "<p>Some new content</p>\n",
"protected": false,
"block_version": 0
},
"excerpt": {
"raw": "",
"rendered": "<p>Some new content</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"comment_status": "open",
"ping_status": "open",
"sticky": false,
"template": "",
"format": "standard",
"meta": {
"footnotes": ""
},
"categories": [1],
"tags": [],
"permalink_template": "https://myblog.com/2025/03/27/%postname%/",
"generated_slug": "new-title",
"class_list": [
"post-1",
"post",
"type-post",
"status-publish",
"format-standard",
"hentry",
"category-uncategorised"
],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/post"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=1"
}
],
"version-history": [
{
"count": 1,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions"
}
],
"predecessor-version": [
{
"id": 6,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions/6"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=1"
}
],
"wp:term": [
{
"taxonomy": "category",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/categories?post=1"
},
{
"taxonomy": "post_tag",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/tags?post=1"
}
],
"wp:action-publish": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"wp:action-unfiltered-html": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"wp:action-sticky": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"wp:action-assign-author": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"wp:action-create-categories": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"wp:action-assign-categories": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"wp:action-create-tags": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"wp:action-assign-tags": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Get Many": [
{
"json": {
"id": 1,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?p=1"
},
"modified": "2025-03-27T18:22:36",
"modified_gmt": "2025-03-27T18:22:36",
"slug": "hello-world",
"status": "publish",
"type": "post",
"link": "https://myblog.com/2025/03/27/hello-world/",
"title": {
"rendered": "Hello world!"
},
"content": {
"rendered": "\n<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>\n",
"protected": false
},
"excerpt": {
"rendered": "<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"comment_status": "open",
"ping_status": "open",
"sticky": false,
"template": "",
"format": "standard",
"meta": {
"footnotes": ""
},
"categories": [1],
"tags": [],
"class_list": [
"post-1",
"post",
"type-post",
"status-publish",
"format-standard",
"hentry",
"category-uncategorised"
],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/post"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=1"
}
],
"version-history": [
{
"count": 1,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions"
}
],
"predecessor-version": [
{
"id": 6,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions/6"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=1"
}
],
"wp:term": [
{
"taxonomy": "category",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/categories?post=1"
},
{
"taxonomy": "post_tag",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/tags?post=1"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Get Response": [
{
"json": {
"id": 1,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?p=1"
},
"modified": "2025-03-27T18:22:36",
"modified_gmt": "2025-03-27T18:22:36",
"slug": "hello-world",
"status": "publish",
"type": "post",
"link": "https://myblog.com/2025/03/27/hello-world/",
"title": {
"rendered": "New Title"
},
"content": {
"rendered": "<p>Some new content</p>\n",
"protected": false
},
"excerpt": {
"rendered": "<p>Some new content</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"comment_status": "open",
"ping_status": "open",
"sticky": false,
"template": "",
"format": "standard",
"meta": {
"footnotes": ""
},
"categories": [1],
"tags": [],
"class_list": [
"post-1",
"post",
"type-post",
"status-publish",
"format-standard",
"hentry",
"category-uncategorised"
],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/post"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=1"
}
],
"version-history": [
{
"count": 1,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions"
}
],
"predecessor-version": [
{
"id": 6,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions/6"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=1"
}
],
"wp:term": [
{
"taxonomy": "category",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/categories?post=1"
},
{
"taxonomy": "post_tag",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/tags?post=1"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Create Response": [
{
"json": {
"id": 7,
"date": "2025-03-27T18:30:04",
"date_gmt": "2025-03-27T18:30:04",
"guid": {
"rendered": "https://myblog.com/2025/03/27/new-post/",
"raw": "https://myblog.com/2025/03/27/new-post/"
},
"modified": "2025-03-27T18:30:04",
"modified_gmt": "2025-03-27T18:30:04",
"password": "",
"slug": "new-post",
"status": "publish",
"type": "post",
"link": "https://myblog.com/2025/03/27/new-post/",
"title": {
"raw": "New Post",
"rendered": "New Post"
},
"content": {
"raw": "This is my content",
"rendered": "<p>This is my content</p>\n",
"protected": false,
"block_version": 0
},
"excerpt": {
"raw": "",
"rendered": "<p>This is my content</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"comment_status": "closed",
"ping_status": "closed",
"sticky": true,
"template": "",
"format": "standard",
"meta": {
"footnotes": ""
},
"categories": [1],
"tags": [],
"permalink_template": "https://myblog.com/2025/03/27/%postname%/",
"generated_slug": "new-post",
"class_list": [
"post-7",
"post",
"type-post",
"status-publish",
"format-standard",
"hentry",
"category-uncategorised"
],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/post"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=7"
}
],
"version-history": [
{
"count": 0,
"href": "https://myblog.com/wp-json/wp/v2/posts/7/revisions"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=7"
}
],
"wp:term": [
{
"taxonomy": "category",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/categories?post=7"
},
{
"taxonomy": "post_tag",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/tags?post=7"
}
],
"wp:action-publish": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"wp:action-unfiltered-html": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"wp:action-sticky": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"wp:action-assign-author": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"wp:action-create-categories": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"wp:action-assign-categories": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"wp:action-create-tags": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"wp:action-assign-tags": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/7"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
],
"Get Many (With Filters)": [
{
"json": {
"id": 1,
"date": "2025-03-27T18:05:01",
"date_gmt": "2025-03-27T18:05:01",
"guid": {
"rendered": "https://myblog.com/?p=1"
},
"modified": "2025-03-27T18:22:36",
"modified_gmt": "2025-03-27T18:22:36",
"slug": "hello-world",
"status": "publish",
"type": "post",
"link": "https://myblog.com/2025/03/27/hello-world/",
"title": {
"rendered": "Hello world!"
},
"content": {
"rendered": "\n<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>\n",
"protected": false
},
"excerpt": {
"rendered": "<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>\n",
"protected": false
},
"author": 1,
"featured_media": 0,
"comment_status": "open",
"ping_status": "open",
"sticky": false,
"template": "",
"format": "standard",
"meta": {
"footnotes": ""
},
"categories": [1],
"tags": [],
"class_list": [
"post-1",
"post",
"type-post",
"status-publish",
"format-standard",
"hentry",
"category-uncategorised"
],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts/1",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/posts"
}
],
"about": [
{
"href": "https://myblog.com/wp-json/wp/v2/types/post"
}
],
"author": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/comments?post=1"
}
],
"version-history": [
{
"count": 1,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions"
}
],
"predecessor-version": [
{
"id": 6,
"href": "https://myblog.com/wp-json/wp/v2/posts/1/revisions/6"
}
],
"wp:attachment": [
{
"href": "https://myblog.com/wp-json/wp/v2/media?parent=1"
}
],
"wp:term": [
{
"taxonomy": "category",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/categories?post=1"
},
{
"taxonomy": "post_tag",
"embeddable": true,
"href": "https://myblog.com/wp-json/wp/v2/tags?post=1"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
}
]
},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Post > Update",
"type": "main",
"index": 0
},
{
"node": "Post > Get Many",
"type": "main",
"index": 0
},
{
"node": "Post > Get",
"type": "main",
"index": 0
},
{
"node": "Post > Create",
"type": "main",
"index": 0
},
{
"node": "Post > Get Many (With Filters)",
"type": "main",
"index": 0
}
]
]
},
"Post > Update": {
"main": [
[
{
"node": "Update Response",
"type": "main",
"index": 0
}
]
]
},
"Post > Get Many": {
"main": [
[
{
"node": "Get Many",
"type": "main",
"index": 0
}
]
]
},
"Post > Get": {
"main": [
[
{
"node": "Get Response",
"type": "main",
"index": 0
}
]
]
},
"Post > Create": {
"main": [
[
{
"node": "Create Response",
"type": "main",
"index": 0
}
]
]
},
"Post > Get Many (With Filters)": {
"main": [
[
{
"node": "Get Many (With Filters)",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "15a2bfaf-cdca-4010-81ee-e589d6fddc1e",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "eeda9e3069aca300d1dfceeb64beb5b53d715db44a50461bbc5cb0cf6daa01e3"
},
"id": "W7kWl5BZvsrmZeVw",
"tags": []
}
@@ -0,0 +1,34 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { userCreate, userGet, userGetMany, userUpdate } from '../apiResponses';
import { credentials } from '../credentials';
describe('Wordpress > User Workflows', () => {
beforeAll(() => {
const mock = nock(credentials.wordpressApi.url);
mock
.post('/wp-json/wp/v2/users', {
name: 'nathan tester',
username: 'new-user',
first_name: 'Nathan',
last_name: 'Tester',
email: 'nathan@domain.com',
password: 'fake-password',
})
.reply(200, userCreate);
mock.get('/wp-json/wp/v2/users/2').query({ context: 'view' }).reply(200, userGet);
mock.get('/wp-json/wp/v2/users').query({ orderby: 'id', per_page: 1 }).reply(200, userGetMany);
mock
.post('/wp-json/wp/v2/users/2', {
id: '2',
name: 'Name Change',
first_name: 'Name',
last_name: 'Change',
nickname: 'newuser',
})
.reply(200, userUpdate);
});
new NodeTestHarness().setupTests({ credentials });
});
@@ -0,0 +1,387 @@
{
"name": "Wordpress Tests - User",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [0, 300],
"id": "15748f86-cdf3-4dad-aa75-a27442073de8",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"resource": "user",
"username": "new-user",
"name": "nathan tester",
"firstName": "Nathan",
"lastName": "Tester",
"email": "nathan@domain.com",
"password": "fake-password",
"additionalFields": {}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [220, 0],
"id": "f5058499-b6c5-42e3-8912-53de6124f811",
"name": "User > Create",
"credentials": {
"wordpressApi": {
"id": "vNOAnwp9mSIq39cD",
"name": "nodeqa"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [440, 0],
"id": "ffcae931-d165-41a0-b49d-12afbfa73238",
"name": "Create Response"
},
{
"parameters": {
"resource": "user",
"operation": "get",
"userId": "2",
"options": {
"context": "view"
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [220, 200],
"id": "707abdd8-4976-45c4-a1ec-aac08cdcf530",
"name": "User > Get",
"credentials": {
"wordpressApi": {
"id": "vNOAnwp9mSIq39cD",
"name": "nodeqa"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [440, 200],
"id": "ca7f1e89-6b2b-4c96-8a43-ef758a39cfa1",
"name": "Get Response"
},
{
"parameters": {
"resource": "user",
"operation": "getAll",
"limit": 1,
"options": {
"orderBy": "id"
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [220, 400],
"id": "2a2ac1a3-a163-49cc-8974-eb81b87d2aee",
"name": "User > Get Many",
"credentials": {
"wordpressApi": {
"id": "vNOAnwp9mSIq39cD",
"name": "nodeqa"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [440, 400],
"id": "1b4ccb5b-e3e5-4741-b533-2274501971c1",
"name": "Get Many Response"
},
{
"parameters": {
"resource": "user",
"operation": "update",
"userId": "2",
"updateFields": {
"name": "Name Change",
"firstName": "Name",
"lastName": "Change",
"nickname": "newuser"
}
},
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [220, 600],
"id": "8d000d21-c5c6-421a-b11d-193813adf35f",
"name": "User > Update",
"credentials": {
"wordpressApi": {
"id": "vNOAnwp9mSIq39cD",
"name": "nodeqa"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [440, 600],
"id": "60e0f507-00ab-42f0-81af-47692bc508c9",
"name": "Update Response"
}
],
"pinData": {
"Create Response": [
{
"json": {
"id": 2,
"username": "new-user",
"name": "nathan tester",
"first_name": "Nathan",
"last_name": "Tester",
"email": "nathan@domain.com",
"url": "",
"description": "",
"link": "https://myblog.com/author/new-user/",
"locale": "en_GB",
"nickname": "new-user",
"slug": "new-user",
"roles": ["subscriber"],
"registered_date": "2025-03-27T19:49:07+00:00",
"capabilities": {
"read": true,
"level_0": true,
"subscriber": true
},
"extra_capabilities": {
"subscriber": true
},
"avatar_urls": {
"24": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=48&d=mm&r=g",
"96": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=96&d=mm&r=g"
},
"meta": {
"persisted_preferences": []
},
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/users/2",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/users"
}
]
}
}
}
],
"Get Response": [
{
"json": {
"id": 2,
"name": "nathan tester",
"url": "",
"description": "",
"link": "https://myblog.com/author/new-user/",
"slug": "new-user",
"avatar_urls": {
"24": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=48&d=mm&r=g",
"96": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=96&d=mm&r=g"
},
"meta": [],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/users/2",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/users"
}
]
}
}
}
],
"Get Many Response": [
{
"json": {
"id": 1,
"name": "nodeqa",
"url": "https://myblog.com",
"description": "",
"link": "https://myblog.com/author/nodeqa/",
"slug": "nodeqa",
"avatar_urls": {
"24": "https://secure.gravatar.com/avatar/de2d127be16acfb3d435ff80b5e13687?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/de2d127be16acfb3d435ff80b5e13687?s=48&d=mm&r=g",
"96": "https://secure.gravatar.com/avatar/de2d127be16acfb3d435ff80b5e13687?s=96&d=mm&r=g"
},
"meta": [],
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/users/1",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/users"
}
]
}
}
}
],
"Update Response": [
{
"json": {
"id": 2,
"username": "new-user",
"name": "Name Change",
"first_name": "Name",
"last_name": "Change",
"email": "nathan@domain.com",
"url": "",
"description": "",
"link": "https://myblog.com/author/new-user/",
"locale": "en_GB",
"nickname": "newuser",
"slug": "new-user",
"roles": ["subscriber"],
"registered_date": "2025-03-27T19:49:07+00:00",
"capabilities": {
"read": true,
"level_0": true,
"subscriber": true
},
"extra_capabilities": {
"subscriber": true
},
"avatar_urls": {
"24": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=48&d=mm&r=g",
"96": "https://secure.gravatar.com/avatar/6eabaa023affb379ccfd92d522ab0e37?s=96&d=mm&r=g"
},
"meta": {
"persisted_preferences": []
},
"_links": {
"self": [
{
"href": "https://myblog.com/wp-json/wp/v2/users/2",
"targetHints": {
"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]
}
}
],
"collection": [
{
"href": "https://myblog.com/wp-json/wp/v2/users"
}
]
}
}
}
]
},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "User > Create",
"type": "main",
"index": 0
},
{
"node": "User > Get",
"type": "main",
"index": 0
},
{
"node": "User > Get Many",
"type": "main",
"index": 0
},
{
"node": "User > Update",
"type": "main",
"index": 0
}
]
]
},
"User > Create": {
"main": [
[
{
"node": "Create Response",
"type": "main",
"index": 0
}
]
]
},
"User > Get": {
"main": [
[
{
"node": "Get Response",
"type": "main",
"index": 0
}
]
]
},
"User > Get Many": {
"main": [
[
{
"node": "Get Many Response",
"type": "main",
"index": 0
}
]
]
},
"User > Update": {
"main": [
[
{
"node": "Update Response",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "b301e130-8b6e-4802-9b86-388040843566",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "0fa937d34dcabeff4bd6480d3b42cc95edf3bc20e6810819086ef1ce2623639d"
},
"id": "K7sj1qC0d2JFoMGp",
"tags": []
}