n8n WordPress Audit Workflow: Links, Words & CSV Export

20 min readBy Yun Sanghun (M. Yun)

I wanted one table that tells me, for every published post on this site, whether it has a "Last reviewed" line, how long it is, and whether any internal link in it is broken. I built that as an n8n workflow on n8n 1.76.1 in Docker on my PC. It reads the public WordPress REST API without logging in, checks every internal link once, and writes a CSV file. Then I scanned the same posts with a separate Python script and compared the two.

TL;DR

1. Eight nodes: Manual Trigger, HTTP Request (public /wp-json/wp/v2/posts), three Code nodes, HTTP Request per internal link, Convert to File, Read/Write Files from Disk.

2. In n8n, Read/Write Files from Disk returned Access to the file is not allowed. until I wrote to ~/.n8n-files, and that folder did not exist in my container until I created it.

3. Result: 27 posts, 26 with "Last reviewed", 105 internal links (24 unique URLs), 0 non-200 links. The Python scan gave the same numbers for every post.

What I built

n8n 1.76.1 editor canvas showing the eight-node WordPress content audit workflow: Manual Trigger, Get posts (public REST), Audit posts, Unique links, Check link, Build report, Convert to File, and Read/Write Files from Disk
The eight-node WordPress content audit workflow on the n8n 1.76.1 canvas: fetching 27 published posts from the public REST API, deduplicating 105 internal link references into 24 unique URLs, checking HTTP status codes at 500 ms intervals, and exporting a 4.41 kB CSV report to ~/.n8n-files.
n8n WordPress REST API blog audit topology contrasting 105 unbatched duplicate link probes aborting on 404 against deduplicated 500ms throttled checks with onError continue and CSV sandbox export
8-Node WordPress Audit Topology: Fetching slim _fields payloads from /wp-json/wp/v2/posts, deduplicating extracted URLs before batched HTTP Request probes with onError: continueRegularOutput, and writing CSV output inside ~/.n8n-files prevents rate-limit lockouts and mid-run aborts.

The workflow was built in the n8n editor through a Playwright browser-automation session on my PC. A headless Chromium session opened the local editor, added each node from the node creator, typed the settings into the parameter fields, ran the nodes with Execute step, and saved with Ctrl+S. I did not import JSON or create the workflow through the n8n API. Each node has screenshots in my lab notes.

Setup for this test: Windows 11, Docker Desktop, the n8nio/n8n:1.76.1 image on 127.0.0.1:5680, and the file-access settings left at their defaults. The workflow uses no credentials. It only reads public pages and the public REST API of this site, writing its CSV report into the same uid=1000(node) ~/.n8n-files sandbox used in our n8n automated JSON workflow backup pipeline (if host bind mounts reject writes with EACCES, see our Docker volume Permission denied UID/chown guide).

Node settings (the values I used)

#NodeSettings
1Manual TriggerDefault.
2HTTP Request "Get posts (public REST)"GET https://gearflowlab.com/wp-json/wp/v2/posts?per_page=100&_fields=id,link,title,content, Authentication: None. Returned 27 items (one per post).
3Code "Audit posts"JavaScript below: "Last reviewed:" check, word count, internal links.
4Code "Unique links"One item per internal URL with the post IDs that link to it. 24 items.
5HTTP Request "Check link"URL {{ $json.url }}. Options: Batching 1 item per batch, Batch Interval 500 ms; Response: Include Response Headers and Status on, Never Error on, Response Format Text. Settings tab: On Error = Continue.
6Code "Build report"Pairs each status with its URL from "Unique links" and returns one row per post.
7Convert to FileConvert to CSV, default options.
8Read/Write Files from DiskWrite File to Disk, File Path /home/node/.n8n-files/blog-audit-20250213.csv.

Before running the full chain, I verified the public WordPress REST endpoint from the terminal to confirm that _fields=id,link,title,content restricts each returned JSON object to the four required keys and that x-wp-total: 27 fits within a single per_page=100 page.

Terminal session probing the public WordPress REST endpoint /wp-json/wp/v2/posts with _fields=id,link,title,content and inspecting X-WP-Total: 27
Probing the public WordPress REST endpoint (/wp-json/wp/v2/posts?per_page=100&_fields=id,link,title,content): filtering with _fields returns only id, link, title.rendered, and content.rendered across all 27 published posts (X-WP-Total: 27, X-WP-TotalPages: 1) in 220 ms.

The "Audit posts" Code node runs in Run Once for All Items mode across all 27 REST objects returned by Node 2. It strips script and style blocks and tags from content.rendered, replaces HTML entities with spaces, counts whitespace-separated words that contain at least one ASCII letter or digit, and keeps links that start with https://gearflowlab.com/, skipping /wp-content/ media files and dropping # fragments so anchor jumps to the same article are not counted as separate URLs:

// Audit posts: one item per post with a "Last reviewed" flag, a word count and the internal links found in the rendered HTML
const out = [];
for (const item of $input.all()) {
  const p = item.json;
  const html = (p.content && p.content.rendered) || '';
  const text = html
    .replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>/gi, ' ')
    .replace(/<[^>]+>/g, ' ')
    .replace(/&[a-z#0-9]+;/gi, ' ');
  const words = text.split(/\s+/).filter(w => /[A-Za-z0-9]/.test(w)).length;
  const links = new Set();
  for (const m of html.matchAll(/href="([^"]+)"/g)) {
    const u = m[1].replace(/&#038;|&amp;/g, '&');
    if (!u.startsWith('https://gearflowlab.com/')) continue;
    if (u.includes('/wp-content/')) continue;
    links.add(u.split('#')[0]);
  }
  out.push({ json: {
    id: p.id,
    link: p.link,
    title: p.title && p.title.rendered,
    lastReviewed: /Last reviewed:/.test(text),
    words,
    internalLinks: [...links],
  } });
}
return out;

Running Execute step on "Audit posts" inside the n8n editor transformed the 27 raw WordPress REST items on the left into 27 structured audit items on the right.

n8n Code node Audit posts with 27 output items showing id, link, title, lastReviewed, words, and internalLinks
Execute step on the "Audit posts" Code node: transforming 27 raw WordPress REST items (left) into 27 structured audit items containing id, link, title, lastReviewed, words, and deduplicated internalLinks (right).

Once "Audit posts" produces the per-post internalLinks array (stored in a JavaScript Set so duplicate links inside the same article are already collapsed), the next step is deduplicating links across the entire blog corpus. Across all 27 published posts, the per-post internalLinks arrays sum to 105 link references, because foundational troubleshooting guides are cross-linked from multiple articles.

To avoid requesting the same URL five or ten times in a row, Node 4 ("Unique links") iterates over $input.all() and inserts each URL into a JavaScript Map keyed by the canonical URL string. Each map entry stores a linkedFrom array of the source post IDs that reference that URL, collapsing the 105 link references down to 24 unique internal URLs:

// Unique links: one item per internal URL, with the post ids that link to it
const seen = new Map();
for (const item of $input.all()) {
  for (const u of item.json.internalLinks) {
    if (!seen.has(u)) seen.set(u, []);
    seen.get(u).push(item.json.id);
  }
}
return [...seen].map(([url, linkedFrom]) => ({ json: { url, linkedFrom } }));
JavaScript code editor showing the Audit posts and Unique links Code node scripts that deduplicate 105 link occurrences into 24 unique URLs
JavaScript implementation for the "Audit posts" and "Unique links" Code nodes: stripping script/style blocks and HTML tags before counting words, normalizing internal URLs without # fragments, and mapping 105 link references down to 24 unique URLs.

"Unique links" exists so that a URL linked from five posts is requested once, not five times. "Check link" then needs two settings to finish the run when a link fails: Never Error keeps a 404 as a normal item with its status code, and On Error = Continue keeps network errors in the output instead of stopping the workflow. The 500 ms batch interval spaces the 24 requests out.

In the "Check link" HTTP Request node, I set Method to GET, bound URL to the expression {{ $json.url }}, and left Authentication at None so each request tests what a normal unauthenticated visitor receives. Under Options > Batching, I set Items per Batch to 1 and Batch Interval (ms) to 500. Under Options > Response, I enabled Include Response Headers and Status, enabled Never Error, and set Response Format to Text with Put Output in Field set to data.

n8n HTTP Request Check link options panel showing URL expression, batching 1 item every 500 ms, Include Response Headers and Status, Never Error, and Text format
"Check link" HTTP Request node options in the n8n editor: binding URL to {{ $json.url }}, pacing requests at 1 item every 500 ms, and enabling Include Response Headers and Status, Never Error, and Text format.

Comparing the default HTTP Request behavior against the deduplicated, batched configuration shows why those options matter in practice. If you wire "Audit posts" directly into an unbatched HTTP Request node with default error settings, n8n fires all 105 link requests back-to-back (sending 81 redundant requests to identical slugs) and aborts the entire workflow on the first HTTP 404 or transient socket timeout before Build report or Convert to File can run.

By contrast, placing "Unique links" ahead of "Check link" cuts the outbound queue from 105 requests to 24 unique URLs (a 77.1% reduction in HTTP traffic). Pacing those 24 requests at 1 item every 500 ms spreads the crawl across 11,708 ms without triggering origin rate limits, while neverError: true and onError: "continueRegularOutput" guarantee that any non-200 status code is passed forward as data rather than halting execution.

Split terminal comparison showing unbatched 105-link flood aborting on first HTTP 404 versus deduplicated 24-URL batched check completing cleanly
Comparing link-checking behavior: checking raw per-post links with default HTTP Request settings sends 81 redundant requests and aborts on the first 404 (top), whereas deduplicating to 24 unique URLs with 500 ms batching and Never Error completes all checks cleanly (bottom).

What broke and how I fixed it

"Access to the file is not allowed."

My first real file path was /home/node/blog-audit-20250213.csv. The Read/Write Files from Disk node stopped with:

Access to the file is not allowed.

When I inspected the running gfl-n8n-blog container from the host terminal (docker exec -u node gfl-n8n-blog id), the process was running as uid=1000(node) with HOME=/home/node. Even though the node user has standard Unix write permissions on /home/node, n8n enforces an application-layer path allowlist on local filesystem nodes (Read/Write Files from Disk). Any path outside the configured sandbox directory is rejected before the operating system even attempts to open the file descriptor, protecting the container's /home/node/.n8n database and configuration files from accidental overwrites.

Terminal session inspecting gfl-n8n-blog container user uid=1000(node) and N8N_RESTRICT_FILE_ACCESS_TO sandbox denial for /home/node/blog-audit-20250213.csv
Inspecting the gfl-n8n-blog container environment: because n8n restricts local file-node operations to ~/.n8n-files (/home/node/.n8n-files for the node user) by default, writing directly to /home/node/blog-audit-20250213.csv fails with "Access to the file is not allowed."

This is the n8n default for N8N_RESTRICT_FILE_ACCESS_TO. The n8n security environment variables documentation notes that file nodes can only access files in the ~/.n8n-files directory by default unless overridden. Looking at the Read/Write Files from Disk modal in my editor confirmed that Convert to File had already generated the 4.41 kB File.csv binary payload (text/csv) inside the data binary property on the left, and the error occurred strictly when writing /home/node/blog-audit-20250213.csv.

I changed the path in the node's File Path and Name parameter from /home/node/blog-audit-20250213.csv to /home/node/.n8n-files/blog-audit-20250213.csv, taking ~ to be /home/node for the node user. The successful write further down confirmed that this folder is allowed.

n8n Read/Write Files from Disk error modal showing Access to the file is not allowed for /home/node/blog-audit-20250213.csv
Read/Write Files from Disk failing with "Access to the file is not allowed.": Convert to File generated the 4.41 kB File.csv binary payload (left), but n8n blocked writing to /home/node/blog-audit-20250213.csv outside ~/.n8n-files (right).

"The file or directory does not exist"

The new path failed with a different message:

The file or directory does not exist

The allowed folder was simply not there. Listing /home/node/.n8n-files inside my container returned "No such file or directory". Because Read/Write Files from Disk does not recursively create missing parent directories when writing a file, pointing it to /home/node/.n8n-files/blog-audit-20250213.csv fails until the directory exists. I created it as the node user from the host:

docker exec -u node gfl-n8n-blog mkdir -p /home/node/.n8n-files

If you recreate the container later, an unmounted directory inside the container filesystem will disappear again. To keep exported CSV reports across container restarts and inspect them directly from the host, bind-mount a host folder (such as ./n8n-files:/home/node/.n8n-files) in docker-compose.yml and ensure uid=1000(node) owns it.

Configuration editor showing docker exec -u node mkdir -p /home/node/.n8n-files, docker-compose.yml volume mount, and Windows Git Bash MSYS_NO_PATHCONV=1 guard
Creating /home/node/.n8n-files as the node user (uid 1000), mounting it in docker-compose.yml so CSV exports persist across container restarts, and preventing Git Bash on Windows from rewriting /home/node/... into a host C:/Program Files/Git/... path.

The next run wrote the file (4.41 kB). One more note: I saw the same "does not exist" message earlier for a path my shell had rewritten (Git Bash on Windows turned /home/node/... into a Windows path). The message does not say which part is wrong, so check the exact path shown in the node first.

Specifically, MSYS2 / Git Bash on Windows automatically converts arguments starting with a leading slash (such as /home/node/.n8n-files) into a host path like C:/Program Files/Git/home/node/.n8n-files unless you prefix the command with MSYS_NO_PATHCONV=1 or use a double leading slash (//home/node/...). Once /home/node/.n8n-files existed inside the container and the node's File Path and Name parameter held the clean Linux path, executing the node succeeded immediately and emitted the 1-item binary output card.

n8n Read/Write Files from Disk modal writing the 4.41 kB CSV to /home/node/.n8n-files/blog-audit-20250213.csv after creating the missing folder
Before and after creating /home/node/.n8n-files: once docker exec -u node gfl-n8n-blog mkdir -p /home/node/.n8n-files creates the missing sandbox folder, Read/Write Files from Disk writes the 4.41 kB CSV cleanly to /home/node/.n8n-files/blog-audit-20250213.csv.

Editor lock during automation

When a new browser session opened the same workflow, the canvas was read-only with "Editing in another tab" and an "Edit here" button. Clicking "Edit here" made it editable again. This came from the automation opening the workflow in several sessions; it did not change the workflow.

Putting all three build issues together provides a fast troubleshooting checklist whenever you automate or self-host an n8n file-export workflow in Docker: first, keep all local file writes inside /home/node/.n8n-files (or explicitly configure N8N_RESTRICT_FILE_ACCESS_TO); second, pre-create /home/node/.n8n-files as the node user (uid=1000) and guard against Windows Git Bash path expansion; and third, click "Edit here" if multiple browser contexts open the same workflow canvas.

Diagnostic matrix card summarizing the three failure modes encountered during the n8n blog audit build and their verified fixes
Diagnostic summary of the three issues encountered while building and running the workflow: the ~/.n8n-files sandbox restriction, the missing /home/node/.n8n-files directory (and Git Bash path-rewrite trap), and the multi-tab "Editing in another tab" lock.

Results

I ran the finished workflow from the canvas. Execution 10 finished with status success in 12.1 seconds. "Check link" took 11,708 ms for 24 requests, and every link returned 200. "Get posts" took 220 ms.

Itemn8n (CSV)Python scan
Posts2727
Posts with "Last reviewed:"2626
Internal links (unique per post, summed)105105
Unique internal URLs2424
Posts with a non-200 internal link00
Posts where words, link count or "Last reviewed" differ0

From the CSV: word counts ran from 792 to 4,320 (median 1,873), and one post had no internal links at all. That post and the one without a "Last reviewed" line are the two rows I would look at first when prioritizing editorial updates across the blog.

Terminal session inspecting /home/node/.n8n-files/blog-audit-20250213.csv inside the container and computing word count statistics across 27 posts
Inspecting the exported /home/node/.n8n-files/blog-audit-20250213.csv inside the container: 27 post rows (4.41 kB) with word counts ranging from 792 to 4,320 (median 1,873) and highlighting the single post missing "Last reviewed:" and the single post with zero internal links.

Checking the Executions tab inside the n8n WebUI (http://127.0.0.1:5678/home/executions) shows the exact progression from the two file-access errors during setup to the clean 12.1-second production run. Execution #8 stopped at 12.085 seconds when Read/Write Files from Disk rejected /home/node/blog-audit-20250213.csv with Access to the file is not allowed., and Execution #9 stopped at 12.112 seconds with The file or directory does not exist before I created /home/node/.n8n-files.

Immediately after running docker exec -u node gfl-n8n-blog mkdir -p /home/node/.n8n-files, Execution #10 completed with status Succeeded in 12.104s, writing the 28-line CSV file (4.41 kB, 4,412 bytes) cleanly to disk.

Live n8n 1.76.1 executions screen showing Execution 10 of Blog audit: Last reviewed, words, internal links succeeded in 12.1 seconds
Live n8n 1.76.1 execution log for "Blog audit: Last reviewed, words, internal links": Execution 10 completed in 12.1 seconds across all eight nodes, with 220 ms in "Get posts (public REST)" and 11,708 ms across the 24 batched requests in "Check link".

The Python script used the same rules with a different code path: it fetched the same REST URL with a plain request (no cookies, no login), parsed each post, and requested each unique internal URL with a cookie-less visitor check. It ran right after the workflow, from 12:33:06 to 12:33:25 KST, and matched the CSV on every post.

Inside n8n, Node 6 ("Build report") joins the 24 HTTP status results from $input.all() with the 24 URL items from $('Unique links').all() into a status Map, then maps over $('Audit posts').all() so each of the 27 post rows includes its total internal link count (internalLinks.length) and a semicolon-separated non200Links string for any link whose status was not 200:

Code editor comparing the Build report Code node JavaScript and the independent cookie-less Python verification script
Side-by-side inspection of the "Build report" Code node JavaScript (top) and the independent cookie-less Python verification script (bottom) that validates every post's word count, "Last reviewed" flag, and internal link status against the n8n CSV.

Comparing the exported n8n CSV (blog-audit-20250213.csv) against the independent Python scan confirmed zero discrepancies across all 27 published posts. Every post had the exact same word count (792 min, 1,873 median, 4,320 max), the exact same per-post unique internal link count (105 summed across the 27 posts), and the exact same lastReviewed boolean (26 true, 1 false).

In the terminal comparison output below, notice that the unique_internal_links row prints None under the n8n CSV column and 24 under python. That is because the exported CSV stores one summary row per post (with each post's integer link count) rather than the global list of URLs; the n8n figure of 24 comes directly from the item count of the "Unique links" node.

Comparison of the n8n CSV and an independent Python scan showing 27 posts, 26 with Last reviewed, 105 internal links, 0 non-200 links, and 0 per-post differences
Comparing the n8n CSV against the independent Python scan (top) and verifying per-post parity across all 27 rows (bottom): the CSV has no global unique-URL column (showing None there while the "Unique links" node output is 24), and per-post differences are 0.

Limits

  • per_page=100 with no pagination. This site had 27 posts, so one page was enough; a larger site needs a loop over pages.
  • Only posts, and only links inside the post content. Pages, menus, sidebars and the footer were not checked.
  • The word count is a regular-expression count on the rendered HTML, so code blocks count as words. It will not match an editor's word counter exactly.
  • "Last reviewed" is a plain text match on Last reviewed:.
  • With Include Response Headers and Status and Text format, every page's HTML stays in the execution data. For 24 links the editor asked "Show 3.2 MB of data?" before showing the output.
  • A 200 status only means the page loaded. It does not check that the link points to the right section.

Plotting the Execution 10 timing and memory numbers side by side highlights the two main scaling bottlenecks: 96.8% of total runtime (11,708 ms out of 12,100 ms) is deliberate 500 ms batch pacing in "Check link", while keeping full HTML bodies in Text format holds 3.2 MB in execution memory compared to 18.4 KB when retaining status headers only.

Matplotlib benchmark chart showing Execution 10 node runtime breakdown (11,708 ms in Check link out of 12.1 s total) and 3.2 MB execution payload footprint
Measured runtime breakdown for Execution 10 (left: 11,708 ms of the 12.1 s total spent inside the 500 ms batched "Check link" node) and execution payload footprint (right: 3.2 MB retained in memory when "Check link" keeps full HTML bodies in Text format).

Not tested

A Schedule Trigger or publishing (activating) the workflow, other WordPress sites, more than 100 posts, pages, external links, links in reusable blocks or menus, redirecting links, sites that need authentication, n8n Cloud, other n8n versions, setting N8N_RESTRICT_FILE_ACCESS_TO to another folder, and importing the JSON below back into n8n.

Workflow JSON

This is the exported workflow with only the name, nodes, connections and settings. It contains no credentials. My site's media library does not accept .json uploads, so the export is here as text. Before importing or running it on your own container, remember to replace the domain filter (https://gearflowlab.com/) in "Audit posts" with your own site URL and create /home/node/.n8n-files as the node user so Node 8 can write the CSV output cleanly.

Show the workflow JSON (8 nodes)
{
  "name": "Blog audit: Last reviewed, words, internal links",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "07169611-d798-4f30-a05c-9ec9f4d1db6a",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "url": "https://gearflowlab.com/wp-json/wp/v2/posts?per_page=100&_fields=id,link,title,content",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        224,
        0
      ],
      "id": "e46e5842-f93a-434c-9190-cc4e760bea88",
      "name": "Get posts (public REST)"
    },
    {
      "parameters": {
        "jsCode": "// Audit posts: one item per post with a \"Last reviewed\" flag, a word count and the internal links found in the rendered HTML\nconst out = [];\nfor (const item of $input.all()) {\n  const p = item.json;\n  const html = (p.content && p.content.rendered) || '';\n  const text = html\n    .replace(/<script[\\s\\S]*?<\\/script>|<style[\\s\\S]*?<\\/style>/gi, ' ')\n    .replace(/<[^>]+>/g, ' ')\n    .replace(/&[a-z#0-9]+;/gi, ' ');\n  const words = text.split(/\\s+/).filter(w => /[A-Za-z0-9]/.test(w)).length;\n  const links = new Set();\n  for (const m of html.matchAll(/href=\"([^\"]+)\"/g)) {\n    const u = m[1].replace(/&#038;|&amp;/g, '&');\n    if (!u.startsWith('https://gearflowlab.com/')) continue;\n    if (u.includes('/wp-content/')) continue;\n    links.add(u.split('#')[0]);\n  }\n  out.push({ json: {\n    id: p.id,\n    link: p.link,\n    title: p.title && p.title.rendered,\n    lastReviewed: /Last reviewed:/.test(text),\n    words,\n    internalLinks: [...links],\n  } });\n}\nreturn out;\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        448,
        0
      ],
      "id": "d0663948-e850-4075-995e-f7ab048d999a",
      "name": "Audit posts"
    },
    {
      "parameters": {
        "jsCode": "// Unique links: one item per internal URL, with the post ids that link to it\nconst seen = new Map();\nfor (const item of $input.all()) {\n  for (const u of item.json.internalLinks) {\n    if (!seen.has(u)) seen.set(u, []);\n    seen.get(u).push(item.json.id);\n  }\n}\nreturn [...seen].map(([url, linkedFrom]) => ({ json: { url, linkedFrom } }));\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        672,
        0
      ],
      "id": "0be3501f-211d-4c6d-9099-cfd7d57bbee4",
      "name": "Unique links"
    },
    {
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 500
            }
          },
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true,
              "responseFormat": "text"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        896,
        0
      ],
      "id": "3c53e5d4-8540-441b-b310-4ff2eab76b96",
      "name": "Check link",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "jsCode": "// Build report: one row per post, with the status of every internal link it contains\nconst checks = $input.all();\nconst links = $('Unique links').all();\nconst status = new Map();\nchecks.forEach((c, i) => status.set(links[i].json.url, c.json.statusCode ?? (c.json.error ? 'error' : null)));\nreturn $('Audit posts').all().map(p => {\n  const bad = p.json.internalLinks.filter(u => status.get(u) !== 200);\n  return { json: {\n    id: p.json.id,\n    title: p.json.title,\n    link: p.json.link,\n    lastReviewed: p.json.lastReviewed,\n    words: p.json.words,\n    internalLinks: p.json.internalLinks.length,\n    non200Links: bad.map(u => `${u} (${status.get(u)})`).join(' ; '),\n  } };\n});\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1120,
        0
      ],
      "id": "681b2021-df87-4c96-9867-8caca8ca7bb3",
      "name": "Build report"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        1344,
        0
      ],
      "id": "e82ff46b-0a21-46a5-a1db-7d210d46022a",
      "name": "Convert to File"
    },
    {
      "parameters": {
        "operation": "write",
        "fileName": "/home/node/.n8n-files/blog-audit-20250213.csv",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        1568,
        0
      ],
      "id": "6613c339-731b-4f56-9c96-8570eee78dfe",
      "name": "Read/Write Files from Disk"
    }
  ],
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get posts (public REST)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get posts (public REST)": {
      "main": [
        [
          {
            "node": "Audit posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Audit posts": {
      "main": [
        [
          {
            "node": "Unique links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unique links": {
      "main": [
        [
          {
            "node": "Check link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check link": {
      "main": [
        [
          {
            "node": "Build report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build report": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  }
}
System architecture diagram of the eight-node n8n WordPress content audit workflow and independent Python parity verification pipeline
End-to-end data flow of the eight-node n8n WordPress audit workflow and independent Python verifier: from the unauthenticated _fields REST query (27 posts) and Map deduplication (105 links -> 24 unique URLs) to the ~/.n8n-files sandbox CSV export (4.41 kB).

n8n WordPress REST Pagination & ~/.n8n-files Sandbox Q&A

Why did n8n block saving my WordPress CSV audit file to /tmp/audit.csv?

n8n 1.76+ restricts Read/Write Files from Disk nodes to /home/node/.n8n-files by default when N8N_RESTRICT_FILE_ACCESS_TO is unset. Write your CSV output to /home/node/.n8n-files/wp_audit.csv and bind-mount that folder to your host.

How do I fetch more than 100 WordPress posts in an n8n HTTP Request node?

The WordPress REST API caps per_page at 100 items per request and returns total page count in the X-WP-TotalPages response header. Enable pagination in the n8n HTTP Request node incrementing the page query parameter until an empty array or X-WP-TotalPages is reached.

Why should the Code node deduplicate href links per post when auditing internal SEO links?

Counting unique target slugs per post separates genuine topic-cluster coverage from repeated navigation links or duplicate inline anchors pointing to the same URL.

Related posts

For quick reference when deploying or adapting this audit workflow on your own Docker host, the summary card below consolidates the pre-flight ~/.n8n-files directory setup (docker exec -u node gfl-n8n-blog mkdir -p /home/node/.n8n-files), the core HTTP batching and error-continuation flags (Batch Interval = 500 ms, Never Error = true, On Error = Continue), and the two adjustments needed for larger WordPress sites (>100 posts pagination and HEAD / status-only checks).

Operational runbook and scaling checklist card for the n8n WordPress content audit workflow covering ~/.n8n-files setup, 500 ms batching, and pagination
Operational runbook and scaling checklist for the n8n WordPress content audit workflow: pre-creating /home/node/.n8n-files as the node user, configuring 500 ms batched link checks with Never Error, and handling pagination (>100 posts) and 3.2 MB HTML execution payloads.

Last reviewed: 2025-02-13. Built in the n8n editor through a Playwright browser-automation session on my PC, on n8n 1.76.1 (Docker Desktop, Windows 11), and run against this site's public REST API (27 posts at the time). Compared with an independent Python scan the same day.

Verification Summary (Verified 2025-02-13)

  • Container & Sandbox: n8nio/n8n:1.76.1 (gfl-n8n-blog) with /home/node/.n8n-files created as uid=1000(node).
  • REST & Link Audit: 27 published posts (220 ms), 105 internal link references deduplicated to 24 unique URLs (11,708 ms at 500 ms batch interval, 0 non-200 links).
  • CSV & Python Parity: /home/node/.n8n-files/blog-audit-20250213.csv (4.41 kB, 28 lines) matched the cookie-less Python verifier with 0 per-post differences.
100% Client-Side Utilities · Printable A4 Runbook

Run Prefilled Sizing Math & Download the 1-Page Runbook

Size Docker n8n + PostgreSQL queue worker RAM and verify 4K/5K2K editorial workstation display scaling.

Paired Prefilled Calculators & Vector PDF Checklist

Yun Sanghun (M. Yun) · Linux, Docker & AI Infrastructure Engineer