n8nen.nl logo n8nen.nl

n8n + WordPress: REST API Automatisering voor Content Management

2026-03-10 n8nen
n8n + WordPress: REST API Automatisering voor Content Management
W WordPress REST API n8n Posts & Pages Media & Users WooCommerce AI Content Pipeline SEO & Monitoring n8n + WordPress Automatisering REST API | Content Management | WooCommerce | AI Pipelines | Multisite

WordPress draait op ruim 43% van alle websites. Dat maakt het veruit het meest gebruikte CMS. Toch doen de meeste WordPress-beheerders nog alles handmatig: posts publiceren, media uploaden, comments modereren, SEO-checks uitvoeren. Met n8n en de WordPress REST API automatiseer je al deze taken en bouw je workflows die je uren per week besparen.

In deze gids behandelen we de volledige WordPress-integratie in n8n: van de eerste koppeling met Application Passwords tot geavanceerde AI-content pipelines, WooCommerce order automatisering en multisite management. Geen theorie zonder praktijk — elke sectie bevat werkende workflow-voorbeelden.

Wat je leert in deze gids:

  • WordPress koppelen aan n8n via Application Passwords
  • De WordPress node gebruiken voor posts, pages, media en users
  • 8+ productie-klare workflows: auto-publish, social sharing, SEO monitoring, comment moderation en meer
  • AI-powered content pipeline: van research tot publicatie
  • WooCommerce order automatisering
  • WordPress multisite management vanuit n8n
  • Kostenvergelijking: n8n vs Zapier vs Uncanny Automator
  • Security best practices voor API-toegang

WordPress REST API: Wat Kun Je Ermee?

De WordPress REST API is beschikbaar op elke WordPress installatie vanaf versie 4.7 (december 2016). Via het endpoint /wp-json/wp/v2/ heb je programmatische toegang tot vrijwel elk onderdeel van je site. n8n maakt hier gebruik van via drie methodes:

Methode Hoe Beste voor Technisch niveau
WordPress Node Ingebouwde n8n node met GUI Posts, pages, users aanmaken/bewerken Beginner
HTTP Request Node Directe REST API calls Custom endpoints, taxonomies, ACF-velden Gemiddeld
Webhook Trigger WordPress stuurt events naar n8n Reageren op publicaties, form submissions, WooCommerce events Gemiddeld

Wat de WordPress Node ondersteunt

De ingebouwde WordPress node in n8n biedt directe toegang tot de meest gebruikte resources:

Posts

  • Create, Update, Get, Get All
  • Status instellen (draft, publish, pending)
  • Categories en tags toewijzen
  • Featured image koppelen

Pages

  • Create, Update, Get, Get All
  • Parent page instellen
  • Template toewijzen
  • Menu order bepalen

Users

  • Create, Update, Get, Get All
  • Rollen toewijzen
  • Profielinformatie beheren

Voor operaties buiten deze scope (media upload, comments, custom post types, WooCommerce) gebruik je de HTTP Request node met de WordPress REST API.

Stap 1: Application Passwords Instellen

Sinds WordPress 5.6 zijn Application Passwords de standaard methode om externe applicaties te authenticeren via de REST API. Ze zijn veiliger dan je admin-wachtwoord delen: elk application password is apart in te trekken, werkt alleen via de API (niet voor wp-admin login), en is compatibel met 2FA op je account.

Application Password Aanmaken

  1. 1. Log in op je WordPress admin dashboard
  2. 2. Ga naar Users → Profile (of klik op je eigen gebruikersnaam)
  3. 3. Scroll naar beneden tot je "Application Passwords" ziet
  4. 4. Vul een naam in, bijvoorbeeld: n8n-automatisering
  5. 5. Klik op "Add New Application Password"
  6. 6. Kopieer het gegenereerde wachtwoord direct (je ziet het maar een keer)

Vereiste: HTTPS

Application Passwords werken standaard alleen op sites met SSL/HTTPS. Op lokale ontwikkelomgevingen (WordPress 6.4.1+) kun je de omgevingsvariabele WP_ENVIRONMENT_TYPE op 'local' zetten om dit te omzeilen.

Credentials Toevoegen in n8n

// n8n WordPress Credentials configureren:

1. Open n8n en ga naar Settings → Credentials
2. Klik "Add Credential" → zoek "WordPress API"
3. Vul in:
   - WordPress URL: https://jouwsite.nl
   - Username: jouw-wp-gebruikersnaam
   - Password: het application password (met spaties ertussen)
4. Klik "Test Connection"
5. Sla op als de test slaagt

// Het application password ziet er zo uit:
// abcd EFGH 1234 ijkl MNOP 5678
// Kopieer het INCLUSIEF de spaties.

Stap 2: Je Eerste WordPress Workflow

Laten we beginnen met een eenvoudige maar nuttige workflow: elke ochtend automatisch een draft post aanmaken op basis van trending topics.

// Workflow: Dagelijkse Draft Post Generator

1. Schedule Trigger
   - Cron: 0 8 * * *  (elke dag om 08:00)

2. HTTP Request (trending topics ophalen)
   - URL: https://trends.google.com/trends/trendingsearches/daily/rss?geo=NL
   - Method: GET
   - Response Format: XML

3. OpenAI / Claude Node (artikel genereren)
   - Prompt: "Schrijf een blogpost van 800 woorden over: {{$json.title}}
             Taal: Nederlands. Toon: informatief en praktisch.
             Voeg een meta description toe van max 155 karakters."

4. WordPress Node
   - Resource: Post
   - Operation: Create
   - Title: {{$json.title}}
   - Content: {{$json.generatedContent}}
   - Status: draft
   - Categories: ["Nieuws"]

5. Slack/Email Node (notificatie)
   - Bericht: "Nieuwe draft aangemaakt: {{$json.title}}"

Meer over scheduled workflows vind je in de scheduling en cron jobs gids.

8+ Praktische WordPress Workflows

Hieronder vind je acht productie-klare workflows. Elke workflow is direct te implementeren in je n8n instance.

Workflow 1: Auto-Publish met Approval Flow

Publiceer content automatisch nadat een reviewer goedkeuring geeft via een webhook.

// Auto-Publish na Goedkeuring

1. Webhook Trigger
   - Method: POST
   - Path: /approve-post
   - Body: { postId: 123, approved: true, reviewer: "jan@bedrijf.nl" }

2. IF Node
   - Condition: $json.approved === true

3. WordPress Node (bij goedkeuring)
   - Resource: Post
   - Operation: Update
   - Post ID: {{$json.postId}}
   - Status: publish

4. HTTP Request (social sharing trigger)
   - URL: https://jouw-n8n.nl/webhook/social-share
   - Method: POST
   - Body: { postId: {{$json.postId}}, title: {{$json.title}} }

5. Email Node (bevestiging naar reviewer)
   - To: {{$json.reviewer}}
   - Subject: "Post gepubliceerd: {{$json.title}}"

Workflow 2: Social Media Auto-Sharing

Zodra een post op "publish" gezet wordt, deel je automatisch op alle sociale kanalen.

// Social Sharing bij Publicatie

1. Schedule Trigger (elke 10 minuten)

2. HTTP Request (recent gepubliceerde posts ophalen)
   - URL: https://jouwsite.nl/wp-json/wp/v2/posts?after={{lastCheck}}&status=publish
   - Authentication: WordPress API credentials

3. IF Node (nieuwe posts gevonden?)

4. Code Node (social media teksten genereren)
   const title = $json.title.rendered;
   const url = $json.link;
   const excerpt = $json.excerpt.rendered.replace(/<[^>]*>/g, '').substring(0, 200);
   
   return {
     linkedin: `${title}\n\n${excerpt}...\n\nLees meer: ${url}`,
     twitter: `${title.substring(0, 200)} ${url}`,
     facebook: `${excerpt}\n\n${url}`
   };

5. Parallel nodes:
   - LinkedIn API Post
   - Twitter/X API Tweet
   - Facebook Page Post

Workflow 3: AI Content Pipeline (Research tot Publicatie)

Dit is de krachtigste workflow: een volledige content pipeline die keywords omzet in gepubliceerde, SEO-geoptimaliseerde artikelen. Lees ook de gids over automatisch blog posts genereren.

// AI Content Pipeline: Keyword → Gepubliceerd Artikel

1. Google Sheets Trigger (nieuw keyword toegevoegd)
   - Sheet: "Content Planning"
   - Kolommen: keyword, category, priority

2. HTTP Request (Perplexity API - research)
   - URL: https://api.perplexity.ai/chat/completions
   - Body: { model: "sonar", messages: [{
       role: "user",
       content: "Doe diepgaand onderzoek naar: {{$json.keyword}}.
                 Geef feiten, statistieken en recente ontwikkelingen."
     }]}

3. Claude/OpenAI Node (artikel schrijven)
   - Prompt: "Schrijf een SEO-geoptimaliseerd artikel van 1500+ woorden.
     Keyword: {{$json.keyword}}
     Research: {{$node['Perplexity'].json.content}}
     Structuur: H2 headings, bullet points, praktische tips.
     Taal: Nederlands. Geen AI-cliches."

4. OpenAI Node (meta description genereren)
   - Prompt: "Schrijf een meta description van max 155 karakters
     voor dit artikel: {{$json.article}}"

5. HTTP Request (featured image genereren via fal.ai)
   - URL: https://fal.run/fal-ai/flux/schnell
   - Body: { prompt: "Blog header for: {{$json.keyword}}" }

6. HTTP Request (image uploaden naar WordPress)
   - URL: https://jouwsite.nl/wp-json/wp/v2/media
   - Method: POST
   - Content-Type: multipart/form-data
   - Body: binary image data

7. WordPress Node (post aanmaken)
   - Title: {{$json.title}}
   - Content: {{$json.article}}
   - Status: draft (of publish)
   - Featured Media: {{$json.mediaId}}
   - Categories: {{$json.category}}

8. Google Sheets Update (status bijwerken)
   - Status: "Gepubliceerd"
   - URL: {{$json.postUrl}}
   - Datum: {{new Date().toISOString()}}

Meer over AI-agents in workflows vind je in de complete gids over n8n AI agents.

Workflow 4: SEO Monitoring & Alerts

// SEO Health Check Workflow

1. Schedule Trigger (dagelijks om 06:00)

2. HTTP Request (alle posts ophalen)
   - URL: https://jouwsite.nl/wp-json/wp/v2/posts?per_page=100&_fields=id,title,link,yoast_head_json

3. Loop Over Items

4. Code Node (SEO checks per post)
   const post = $json;
   const seo = post.yoast_head_json || {};
   const issues = [];
   
   // Check meta description
   if (!seo.description || seo.description.length < 50) {
     issues.push('Meta description ontbreekt of is te kort');
   }
   if (seo.description && seo.description.length > 160) {
     issues.push('Meta description te lang (' + seo.description.length + ' chars)');
   }
   
   // Check title length
   if (post.title.rendered.length > 60) {
     issues.push('Titel langer dan 60 karakters');
   }
   
   // Check canonical
   if (!seo.canonical) {
     issues.push('Geen canonical URL ingesteld');
   }
   
   return { postId: post.id, title: post.title.rendered, url: post.link, issues };

5. Filter Node (alleen posts met issues)

6. Google Sheets Append (SEO rapport)

7. Slack Alert (samenvatting van issues)

Workflow 5: Broken Link Checker

// Broken Link Checker

1. Schedule Trigger (wekelijks, zondag 02:00)

2. HTTP Request (alle posts + pages ophalen)
   - URL: https://jouwsite.nl/wp-json/wp/v2/posts?per_page=100&_fields=id,title,content,link

3. Code Node (links extraheren uit content)
   const content = $json.content.rendered;
   const linkRegex = /href="(https?:\/\/[^"]+)"/g;
   const links = [];
   let match;
   while ((match = linkRegex.exec(content)) !== null) {
     links.push({ url: match[1], postId: $json.id, postTitle: $json.title.rendered });
   }
   return links.map(l => ({ json: l }));

4. Split In Batches (10 tegelijk, rate limiting)

5. HTTP Request (elke link testen)
   - URL: {{$json.url}}
   - Method: HEAD
   - Options: { redirect: 'follow', timeout: 10000 }
   - On Error: Continue Using Error Output

6. Error Branch → Log broken link
   - Post: {{$json.postTitle}}
   - Broken URL: {{$json.url}}
   - Status code: {{$json.statusCode}}

7. Google Sheets Append (broken links rapport)

8. Email Alert ("X broken links gevonden op je site")

Workflow 6: Comment Moderation met AI

// AI-Powered Comment Moderation

1. Schedule Trigger (elke 30 minuten)

2. HTTP Request (pending comments ophalen)
   - URL: https://jouwsite.nl/wp-json/wp/v2/comments?status=hold&per_page=50
   - Auth: WordPress API credentials

3. Loop Over Items

4. OpenAI/Claude Node (comment beoordelen)
   - Prompt: "Beoordeel dit WordPress comment:
     Auteur: {{$json.author_name}}
     Content: {{$json.content.rendered}}
     
     Classificeer als:
     - APPROVE: legitiem, relevant comment
     - SPAM: commerciele content, onzin, linkbuilding
     - TOXIC: beledigend, discriminerend, bedreigend
     
     Antwoord in JSON: { classification: '...', confidence: 0.0-1.0, reason: '...' }"

5. Switch Node (op classificatie)
   - APPROVE → HTTP Request: PUT /wp/v2/comments/{{id}} { status: 'approved' }
   - SPAM → HTTP Request: DELETE /wp/v2/comments/{{id}}
   - TOXIC → Slack Alert + houd in 'hold' status

6. Google Sheets Log (alle beslissingen loggen)

Workflow 7: Automatische Backup

// WordPress Content Backup naar Google Drive

1. Schedule Trigger (dagelijks om 03:00)

2. HTTP Request (alle posts exporteren)
   - URL: https://jouwsite.nl/wp-json/wp/v2/posts?per_page=100

3. HTTP Request (alle pages exporteren)
   - URL: https://jouwsite.nl/wp-json/wp/v2/pages?per_page=100

4. HTTP Request (media library metadata)
   - URL: https://jouwsite.nl/wp-json/wp/v2/media?per_page=100

5. Code Node (data samenvoegen tot JSON)
   return {
     exportDate: new Date().toISOString(),
     posts: $node['Posts'].json,
     pages: $node['Pages'].json,
     media: $node['Media'].json
   };

6. Google Drive Upload
   - Folder: "WordPress Backups"
   - File name: backup-{{$today}}.json

7. Google Drive (oude backups opruimen, ouder dan 30 dagen)

8. Slack/Email ("Backup voltooid: {{$json.posts.length}} posts,
   {{$json.pages.length}} pages")

Workflow 8: Media Optimalisatie

// Afbeelding Optimalisatie Pipeline

1. Schedule Trigger (dagelijks)

2. HTTP Request (recente media ophalen)
   - URL: https://jouwsite.nl/wp-json/wp/v2/media?per_page=50&orderby=date&order=desc

3. Filter Node (alleen afbeeldingen zonder alt text)
   - Condition: $json.alt_text === '' || !$json.alt_text

4. OpenAI Vision Node (alt text genereren)
   - Prompt: "Beschrijf deze afbeelding in het Nederlands,
     max 125 karakters, voor SEO alt-text."
   - Image URL: {{$json.source_url}}

5. HTTP Request (alt text updaten)
   - URL: https://jouwsite.nl/wp-json/wp/v2/media/{{$json.id}}
   - Method: POST
   - Body: { alt_text: "{{$json.generatedAltText}}" }

6. Log resultaten in Google Sheets

WooCommerce Order Automatisering via n8n

WooCommerce heeft een eigen n8n node met aparte REST API credentials. De setup verschilt van standaard WordPress.

WooCommerce API Setup

  1. 1. Ga in WordPress naar WooCommerce → Settings → Advanced → REST API
  2. 2. Klik "Add Key"
  3. 3. Description: n8n Integration
  4. 4. User: selecteer een admin-gebruiker
  5. 5. Permissions: Read/Write
  6. 6. Klik "Generate API Key"
  7. 7. Kopieer de Consumer Key en Consumer Secret

Permalink-instelling vereist

De WooCommerce REST API werkt alleen als je permalinks op "Post name" of een custom structuur staan. Met "Plain" permalinks krijg je een 404 error. Controleer dit via Settings → Permalinks in WordPress.

WooCommerce Workflow Voorbeelden

// Order Processing + Klant Notificatie

1. WooCommerce Trigger (Order Created)

2. Switch Node (op order type)
   - Order total > 500 → VIP flow
   - Internationaal adres → Customs flow
   - Standaard → Reguliere verwerking

3. HTTP Request (naar fulfillment partner API)
   - POST order details naar warehouse

4. WooCommerce Node (order note toevoegen)
   - "Order doorgestuurd naar fulfillment: {{timestamp}}"

5. Email/WhatsApp Node (klant bevestiging)
   - "Je bestelling #{{orderId}} wordt verwerkt!"

6. Google Sheets Append (order log)
// Abandoned Cart Recovery via WooCommerce Webhook

1. Webhook Trigger (WooCommerce checkout abandoned)

2. Wait Node (2 uur)

3. HTTP Request (check of order alsnog geplaatst is)
   - URL: /wp-json/wc/v3/orders?customer={{$json.email}}&after={{checkoutTime}}

4. IF Node (order nog niet geplaatst?)

5. Email Node (herinneringsmail met kortingscode)
   - Subject: "Je winkelwagen wacht op je"
   - Body: items + 10% kortingscode

6. Wait Node (24 uur) → Tweede herinnering indien nodig

Vergelijkbare e-commerce workflows vind je in de Shopify automatisering gids. Veel patronen zijn direct toepasbaar op WooCommerce.

WordPress Multisite Management

Beheer je meerdere WordPress sites? Met n8n kun je dezelfde workflow op al je sites tegelijk uitvoeren. Het principe is simpel: sla je site-configuraties op in een Google Sheet en loop er doorheen.

// Multisite Health Check (10+ sites tegelijk)

1. Google Sheets Read (site-lijst)
   - Kolommen: domain, wpUser, appPassword, siteNaam
   - Voorbeeld rij: "site1.nl", "admin", "xxxx xxxx xxxx", "Mijn Blog"

2. Loop Over Items (elke site)

3. HTTP Request per site:
   a. GET /wp-json/wp/v2/posts?per_page=1 (site bereikbaar?)
   b. GET /wp-json/wp/v2/plugins (plugin updates nodig?)
   c. GET /wp-json/ (WP versie ophalen)

4. Code Node (resultaten analyseren)
   const site = $json.domain;
   const wpVersion = $json.version;
   const outdatedPlugins = $json.plugins.filter(p => p.update_available);
   
   return {
     site,
     status: 'online',
     wpVersion,
     outdatedPlugins: outdatedPlugins.length,
     pluginNames: outdatedPlugins.map(p => p.name).join(', ')
   };

5. Filter (sites met issues)

6. Slack Alert ("3 van 12 sites hebben plugin updates nodig")
7. Google Sheets Update (resultaten opslaan)

Bulk Content Distributie

Publiceer dezelfde aankondiging op al je sites tegelijk:

// Bericht publiceren op alle sites

1. Webhook Trigger (POST met bericht data)
   Body: { title: "...", content: "...", status: "publish" }

2. Google Sheets Read (site-lijst met credentials)

3. Split In Batches (3 tegelijk, voorkom overload)

4. HTTP Request (per site)
   - URL: https://{{$json.domain}}/wp-json/wp/v2/posts
   - Method: POST
   - Auth: Basic Auth (user + app password per site)
   - Body: { title, content, status }

5. Merge resultaten

6. Slack samenvatting: "Post gepubliceerd op 8/10 sites. 2 mislukt: ..."

Kostenvergelijking: n8n vs WordPress Plugins vs Zapier

Automatisering kan op meerdere manieren. Hieronder vergelijken we de drie meest gebruikte opties voor WordPress automatisering:

Criteria n8n (self-hosted) n8n Cloud Zapier Uncanny Automator
Maandelijkse kosten ~$5-10 (VPS) Vanaf $24/maand Vanaf $30/maand ~$12/maand (jaarlijks)
Prijsmodel Flat (onbeperkte runs) Per workflow execution Per taak (elke stap telt) Jaarlicentie
100 workflows/dag ~$5-10/maand ~$24-50/maand $150-500+/maand ~$12/maand
Integraties 400+ nodes + elke API 400+ nodes + elke API 8.000+ apps 210+ WP plugins
AI integratie Ingebouwd (LangChain) Ingebouwd (LangChain) Beperkt Minimaal
Custom code JS + Python JS + Python Alleen JS (beperkt) PHP hooks
Externe API calls Onbeperkt Onbeperkt Tellen als taken Beperkt
Beste voor Technische teams, hoog volume Snel starten, gemiddeld volume Non-techies, simpele workflows WP-only automatisering

Rekenvoorbeeld: 10 WordPress sites beheren

Stel je beheert 10 sites en draait dagelijks 50 workflows per site (health checks, backups, content updates). Dat zijn 500 executions per dag, 15.000 per maand.

  • n8n self-hosted: ~$10/maand (vaste VPS kosten, onbeperkte runs)
  • n8n Cloud: ~$50-100/maand
  • Zapier: Een 5-staps workflow x 15.000 = 75.000 tasks = $300-600+/maand
  • Uncanny Automator: $149/jaar per site x 10 = $1.490/jaar (~$124/maand)

Security Best Practices bij WordPress API Toegang

Je WordPress REST API is een directe toegangspoort tot je site. Behandel de beveiliging net zo serieus als je wp-admin login. Meer over n8n security in de error handling gids.

Doen

  • Aparte gebruiker: Maak een dedicated WordPress user aan voor n8n (niet je persoonlijke admin)
  • Minimale rechten: Geef alleen de permissions die de workflow nodig heeft (Author i.p.v. Administrator waar mogelijk)
  • HTTPS verplicht: Alle API communicatie over SSL/TLS
  • Credentials roteren: Vernieuw application passwords elke 90 dagen
  • IP-whitelisting: Beperk API-toegang tot het IP van je n8n server via .htaccess of Wordfence
  • Audit logging: Gebruik WP Activity Log om API-acties bij te houden

Vermijden

  • Admin credentials delen: Gebruik altijd Application Passwords, nooit je echte wachtwoord
  • API wijd open laten: Beperk ongeauthenticeerde endpoints waar mogelijk
  • Credentials in workflows hardcoden: Gebruik n8n's credential management of environment variables
  • Rate limiting overslaan: Bouw pauzes in bij bulk operaties (2 requests per seconde max)
  • HTTP gebruiken: Zonder SSL zijn credentials leesbaar in transit
  • Oude passwords laten staan: Verwijder ongebruikte application passwords direct

IP-Whitelisting via .htaccess

Als je n8n server een vast IP-adres heeft, kun je de WordPress REST API beperken tot dat IP:

# .htaccess regel: alleen n8n server toegang tot REST API
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wp-json/ [NC]
RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.10$
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
RewriteRule .* - [F,L]
</IfModule>

# Vervang 123.456.789.10 met het IP van je n8n instance.
# Voeg eventueel extra IP's toe voor andere services.

n8n Environment Variables voor WordPress Credentials

# docker-compose.yml (n8n)
environment:
  - N8N_ENCRYPTION_KEY=je-sterke-encryption-key
  # Credentials worden versleuteld opgeslagen in de n8n database.
  # De encryption key moet geheim blijven.
  # Gebruik NOOIT plaintext credentials in workflow JSON exports.

Veelgemaakte Fouten (en Hoe Je Ze Vermijdt)

Fout 1: Application Password zonder spaties invoeren

WordPress genereert het password met spaties (bijv. abcd EFGH 1234 ijkl). Sommige gebruikers verwijderen de spaties. Doe dit niet: n8n verwacht het password inclusief spaties.

Fout 2: REST API geblokkeerd door security plugin

Plugins zoals Wordfence, iThemes Security of WP Cerber kunnen de REST API blokkeren voor ongeauthenticeerde of externe requests. Controleer de plugin-instellingen en whitelist het IP van je n8n server.

Fout 3: Geen error handling op WordPress nodes

WordPress servers geven soms timeouts bij zware operaties (grote media uploads, bulk updates). Zet altijd Retry on Fail aan (3 retries, 5000ms wachttijd) op alle WordPress-gerelateerde nodes. Zie de error handling gids.

Fout 4: Content met HTML entities door shell escaping

Bij het gebruik van de HTTP Request node voor het updaten van post content, zorg dat je HTML content correct escaped. Gebruik de n8n expression editor en vermijd handmatige string concatenatie met speciale karakters.

Fout 5: Rate limiting niet respecteren

WordPress REST API heeft standaard geen rate limiting, maar je webserver wel (meestal 100-300 requests per minuut). Bij bulk operaties gebruik je de Split In Batches node met een Wait node van 1-2 seconden ertussen.

Fout 6: Alle API endpoints open laten

Standaard zijn endpoints als /wp-json/wp/v2/users publiek bereikbaar. Dit lekt gebruikersnamen. Gebruik een plugin als WP Cerber om ongeauthenticeerde toegang tot gevoelige endpoints te blokkeren.

Fout 7: Vergeten de REST API te testen na WordPress updates

WordPress core updates kunnen API-gedrag subtiel veranderen. Bouw een simpele health-check workflow die dagelijks test of je API endpoints nog correct reageren.

Geavanceerd: Custom Endpoints Aanroepen

Veel WordPress plugins voegen eigen REST API endpoints toe. Denk aan Yoast SEO, Advanced Custom Fields (ACF), Gravity Forms en WooCommerce. Met de HTTP Request node benader je deze endpoints rechtstreeks.

Voorbeelden van Plugin-Endpoints

// Yoast SEO meta data ophalen
GET /wp-json/wp/v2/posts/123?_fields=yoast_head_json

// ACF custom fields uitlezen
GET /wp-json/wp/v2/posts/123?_fields=acf

// ACF custom fields updaten
POST /wp-json/wp/v2/posts/123
Body: { "acf": { "prijs": "29.95", "voorraad": 150 } }

// Gravity Forms entries ophalen
GET /wp-json/gf/v2/entries?form_ids[0]=1

// WooCommerce producten
GET /wp-json/wc/v3/products?per_page=50&status=publish
Auth: Consumer Key + Consumer Secret (aparte credentials)

// Contact Form 7 submissions
GET /wp-json/contact-form-7/v1/contact-forms/456/feedback

Workflow Architectuur: Modulair Opzetten

Bij grotere WordPress automatisering projecten splits je workflows op in modules. Gebruik sub-workflows om herbruikbare componenten te maken.

Orchestrator Workflow Content Generator Sub-workflow WordPress Publisher Sub-workflow Social Distributor Sub-workflow Error Handler Sub-workflow Elke sub-workflow is herbruikbaar en onafhankelijk testbaar

Performance Tips voor WordPress + n8n

WordPress-kant

  • Gebruik _fields parameter om alleen benodigde data op te halen: /wp/v2/posts?_fields=id,title,link
  • Stel per_page in op maximaal wat je nodig hebt
  • Gebruik caching plugins (WP Super Cache, W3 Total Cache) maar zorg dat API responses niet gecached worden
  • Overweeg WP-CLI voor zware bulk operaties in plaats van de REST API

n8n-kant

  • Gebruik Split In Batches voor operaties op 50+ items
  • Sla frequente API responses op in Static Data (workflow-level cache)
  • Gebruik webhooks i.p.v. polling waar mogelijk
  • Zet Retry on Fail aan met minimaal 3 retries

Conclusie

WordPress automatisering met n8n is een krachtige combinatie. De REST API geeft je volledige controle over je site, en n8n biedt de workflow-logica om er iets nuttigs mee te bouwen. Of je nu een enkele blog beheert of tien WooCommerce-winkels draait: met de workflows uit deze gids bespaar je uren per week en voorkom je menselijke fouten.

Begin klein. Start met de auto-publish workflow of de broken link checker. Als dat draait, voeg je de AI content pipeline toe. En voor je het weet, draait je hele WordPress operatie op de automatische piloot.

Volgende Stappen

  • Application Password aanmaken op je WordPress site
  • n8n credentials configureren en testen
  • Eerste workflow bouwen (begin met de broken link checker)
  • Error handling toevoegen aan elke productie-workflow
  • Uitbreiden naar AI content pipeline en multisite management

Gerelateerde Artikelen

#n8n #wordpress #rest api #automatisering #content management #woocommerce #ai content #multisite #application passwords #seo