Integrating n8n with WordPress allows you to automate tasks like publishing posts, syncing user data, collecting form submissions, and more. You can connect n8n to WordPress using the WordPress node (via REST API) or by using Webhook nodes in combination with plugins like WP Webhooks or WPForms.
✅ 1. Prerequisites
Before you start, ensure:
- You have a running instance of n8n
- You have admin access to your WordPress site
- You enable Application Passwords or JWT Authentication in WordPress for secure API access (available by default in WordPress 5.6+)
🔌 2. Connect n8n to WordPress (via WordPress Node)
Step 1: Enable Application Passwords in WordPress
- Go to
Users > Your Profile
- Scroll to Application Passwords
- Name the app (e.g.,
n8n) and click Add New Application Password
- Copy the password shown — you will use it in n8n
Step 2: Create WordPress Credentials in n8n
Go to Settings > Credentials
Create new credentials for WordPress
Enter:
Base URL: https://yourdomain.com
Username: Your WordPress username
Password: The application password from Step 1
Save the credentials
Step 3: Build Workflow with WordPress Node
Create a new workflow in n8n
Add a Trigger (e.g., webhook, cron, Gmail, etc.)
Add the WordPress node
Example: Create a new post
Choose operation: Create
Resource: Post
Fill in fields like Title, Content, etc.
Use the credentials you saved
🔄 3. Receive Data from WordPress (Using Webhooks)
To trigger an n8n workflow from WordPress, use plugins like:
Option A: WP Webhooks Plugin
- Install WP Webhooks
- Go to
WP Webhooks > Send Data
- Add a new webhook URL (your n8n webhook URL)
- Choose triggers like “New Post”, “User Registered”, etc.
Option B: WPForms Plugin
- Install WPForms and its Webhook Addon
- Create a form and add a webhook that points to your n8n Webhook node
- n8n will receive form data every time the form is submitted
⚙️ 4. Example Use Case: Post from Google Sheets to WordPress
- Trigger: Google Sheets (new row)
- Transform data if needed using Function or Set nodes
- Action: WordPress node – Create new post using the row data
🔐 Security Note
- Always use HTTPS for your WordPress site
- Use secure methods like OAuth2 or Application Passwords
- Restrict what API endpoints your n8n workflows can access
🧪 Test and Activate
Once your workflow is set up:
- Test the trigger (form submit, webhook, etc.)
- Check WordPress to confirm the action (post created, user updated, etc.)
- Activate the workflow in n8n
Here's a ready-made n8n workflow that creates a new WordPress blog post whenever a new row is added to Google Sheets. This is perfect for content teams who draft articles in Google Sheets and want them automatically posted to WordPress.
📌 Use Case: Auto-Publish WordPress Post from Google Sheets
🧩 Nodes Used:
- Google Sheets Trigger – watches for new rows
- Set – formats data
- WordPress – creates the post
🔧 Prerequisites
WordPress:
- WordPress site with Application Passwords enabled (or use WP Webhooks)
- n8n credentials set for WordPress (see previous answer)
Google Sheets:
- A spreadsheet with headers like:
title, content, status (e.g., "publish" or "draft")
- n8n connected to your Google account
🛠 Workflow Steps
🔹 Step 1: Google Sheets Trigger
- Node:
Google Sheets Trigger
- Event:
New Row
- Authentication: Use your Google account
- Spreadsheet ID: Copy from the URL of your sheet
- Sheet Name: The tab name inside the spreadsheet
🔹 Step 2: Set Node (Optional)
Format the fields if needed:
{
"title": "={{$json[\"title\"]}}",
"content": "={{$json[\"content\"]}}",
"status": "={{$json[\"status\"] || \"publish\"}}"
}
🔹 Step 3: WordPress Node
🔁 Full JSON (Import to n8n)
You can copy and paste this JSON into n8n via “Import workflow”:
{
"nodes": [
{
"parameters": {
"sheetId": "your-spreadsheet-id",
"range": "Sheet1!A:C",
"valueRenderMode": "UNFORMATTED_VALUE",
"dateTimeRenderOption": "FORMATTED_STRING"
},
"id": "1",
"name": "Google Sheets Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"typeVersion": 1,
"position": [300, 300],
"credentials": {
"googleSheetsOAuth2Api": {
"id": "your-credentials-id",
"name": "Google Sheets Account"
}
}
},
{
"parameters": {
"fields": {
"title": "={{$json[\"title\"]}}",
"content": "={{$json[\"content\"]}}",
"status": "={{$json[\"status\"] || \"publish\"}}"
}
},
"id": "2",
"name": "Set Data",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [500, 300]
},
{
"parameters": {
"operation": "create",
"resource": "post",
"title": "={{$json[\"title\"]}}",
"content": "={{$json[\"content\"]}}",
"status": "={{$json[\"status\"]}}"
},
"id": "3",
"name": "WordPress - Create Post",
"type": "n8n-nodes-base.wordpress",
"typeVersion": 1,
"position": [700, 300],
"credentials": {
"wordpressApi": {
"id": "your-wordpress-credentials-id",
"name": "WordPress Credentials"
}
}
}
],
"connections": {
"Google Sheets Trigger": {
"main": [
[
{
"node": "Set Data",
"type": "main",
"index": 0
}
]
]
},
"Set Data": {
"main": [
[
{
"node": "WordPress - Create Post",
"type": "main",
"index": 0
}
]
]
}
}
}
Replace:
"your-spreadsheet-id" with your actual sheet ID
- Credential IDs with yours (or re-select manually in UI)
✅ Final Tips
- You can extend this to include tags, categories, or even custom post types
- Add error handling (e.g., if WordPress is down)
- Use a
Filter node to skip rows without titles or required fields