How to Build n8n WordPress Automation for Multi-Channel Publishing
Build n8n WordPress automation that reads a content queue, generates per-channel captions with AI, and distributes one post everywhere. Templates inside.
Most WordPress automation tutorials stop at "create a post with AI." They show the WordPress node firing once, maybe a staggered push to Twitter, and call it done. That's the easy 20%. The part that actually eats a marketer's week is everything after publish: rewriting the same article for five channels, scheduling it, and keeping a record of what went where.
n8n WordPress automation closes that gap. n8n is an open-source workflow tool where you wire nodes together on a canvas, and its WordPress node plus the OpenAI and Google Sheets nodes can run the full publish-and-distribute loop without a human babysitting it. No per-task billing, no five tabs open.
This post covers the production version of that workflow. The one with a content queue, per-channel captions, and a log.
What you can automate
- Publishing a queued draft to WordPress on a schedule, straight from a Google Sheets backlog
- Generating a distinct caption and hashtag set per channel (the tone for LinkedIn isn't the tone for Twitter)
- Pushing each variant to its destination with the right copy attached
- Auto-tagging and auto-categorizing posts from their content
- Logging every published item so you have an audit trail of what shipped and when
- Holding posts for human approval before anything goes live
The Hostinger tutorial (hostinger.com) walks the WordPress node operations well: create user, create post, get posts, update post, fetch post, all through an application password. But its social step uses one generic caption across X, LinkedIn, and Facebook. The Contabo guide (contabo.com) does staggered posting with a Wait node, yet it explicitly skips editorial queues from a spreadsheet and skips any logging or audit trail. That's the gap worth closing.
The WordPress distribution pipeline
Schedule Trigger → Read queue (Sheets) → Filter today's row
→ WordPress (create/publish) → OpenAI (per-channel captions)
→ Code (split variants) → Route to channels → Log to Sheets
One trigger. Two jobs that used to be separate. The publish and the distribute now share a single execution.
1. Read the queue
A scheduleTrigger v1.2 node fires the workflow (say, every morning at 9). The next node reads your content backlog from Google Sheets. Each row is a planned post: title, body or draft URL, target date, channels. A Filter node keeps only the rows whose publish date is today. Everything else waits its turn. This is the piece both competitor guides leave out, and it's what turns a one-off automation into a real editorial calendar.
2. Publish to WordPress
The WordPress node takes the filtered row and creates the post. Use the create post operation, map the title and content fields from the sheet, and set the status to publish or draft depending on whether you want a human gate. Credentials are an application password (generated under Users → Profile in WordPress), the admin username, and the site URL. The REST API has shipped on by default since WordPress 4.7, so there's no plugin to install for this.
3. Generate per-channel captions
Here's where the better build pulls ahead. Feed the published post's title and excerpt into the @n8n/n8n-nodes-langchain.openAi v2.1 node. Prompt it to return a JSON object with a caption per channel, not one caption for all. LinkedIn wants a hook and a takeaway; Twitter wants brevity and one hashtag; a newsletter blurb wants a different rhythm again. The node returns its output at $json.output[0].content[0].text — and yes, that path matters. Tutorials copied from 2023 still reference the deprecated n8n-nodes-base.openAi paths, which break silently when you paste them in.
4. Split and route
The AI hands back a blob of text. The next node has to expect structured fields. So add a n8n-nodes-base.code v2 node with jsCode that parses the JSON and emits one item per channel. Then a Switch node routes each item to its destination node. Add this Code node every single time, even when it feels redundant. The execution log makes a missing parse step obvious; the failure itself is quiet.
5. Log what shipped
The last node appends a row to a "Published" tab in Google Sheets: post URL, channels hit, timestamp. Boring. Also the thing you'll want the first time someone asks "did the Tuesday post go to LinkedIn?" Neither the Contabo nor Hostinger walkthrough includes this step.
If a 2022 tutorial tells you to drop in a Function node with functionCode, don't. Use n8n-nodes-base.code v2 with jsCode. The parse path changed at the v1.0 upgrade, and copy-pasting the old node breaks the JSON-handling step without throwing a loud error. Check the node version, not just the node name.
Implementation patterns
Pattern 1: Queue-driven publishing. Drive everything from one Google Sheet. A row is a post; a column is a channel toggle. Marketers schedule a month of content by filling cells, and the workflow drains the queue daily. No n8n knowledge required to operate it once it's built.
Schedule → Sheets (read queue) → Filter (date == today) → WordPress (publish)
Pattern 2: One source, many variants. The article is written once. The captions are not. A single OpenAI call returns a map of channel → copy, and a Code node fans it out. This is the pattern both ranking guides miss: they generate one caption and reuse it, which reads identically everywhere and converts on none.
WordPress (excerpt) → OpenAI (per-channel JSON) → Code (split) → Switch → channel nodes
Pattern 3: Human-in-the-loop gate. For teams that don't trust full autopilot, publish to WordPress as a draft, then email the editor the proposed captions with an approval link. Approve, and a second workflow flips the post live and distributes. Slower, safer, and honestly the right default for a brand account.
n8n nodes you'll use most
| Node | Purpose |
|---|---|
n8n-nodes-base.scheduleTrigger v1.2 | Fires the workflow daily so the queue drains on its own |
n8n-nodes-base.googleSheets | Reads the content queue and logs published items |
n8n-nodes-base.wordpress | Creates, publishes, and updates the post via the REST API |
@n8n/n8n-nodes-langchain.openAi v2.1 | Generates per-channel captions; output at $json.output[0].content[0].text |
n8n-nodes-base.code v2 | Parses AI JSON and splits one post into per-channel items |
n8n-nodes-base.switch | Routes each channel variant to the right destination |
Getting started
- Stand up n8n (self-hosted on a small VPS, or n8n Cloud) and confirm you can open the canvas.
- In WordPress, go to Users → Profile and generate an application password. Keep the username and site URL handy.
- Add the WordPress credential in n8n and test the get posts operation to confirm the connection.
- Build the read-queue half:
scheduleTrigger→ Google Sheets read → Filter on today's date. - Add the WordPress create-post node and map your sheet columns to the title and content fields.
- Wire in the OpenAI node with a per-channel JSON prompt, then a Code node to split the output.
- Add the channel nodes and a final Google Sheets append to log the run. Test end to end with one queued row.
For the caption side specifically, the deep dive on Content Scheduler & Distributor shows the exact prompt shape that returns clean per-channel JSON.
Browse the content automation templates →The Content Scheduler & Distributor ships this end-to-end: a scheduleTrigger reads your Google Sheets queue, filters items scheduled for today, an OpenAI node returns platform-optimized captions and hashtags per channel, Gmail sends the distribution-ready copy with Google Drive file links, and every published piece is logged for the audit trail. It's part of The Complete n8n Templates Bundle, a one-time lifetime license to the whole catalog plus every template added later, which pays off fast if you run more than one of these automations.
The publish-once-post-everywhere pattern is the same backbone behind broader content distribution automation and the AI-drafting side covered in n8n blog content generation. Wire the WordPress node into either and the queue does the rest. For the social-scheduling layer specifically, the Social Media Scheduler handles cadence once the captions exist.
See how the queue drives publishing →Common questions
What can n8n WordPress automation actually do?
Do I need code to automate WordPress with n8n?
How does n8n authenticate to WordPress?
Get the workflow templates this guide is built on
Import-ready n8n JSON, step-by-step setup, and tested end-to-end. One-time payment, own it forever.
Get 3 tested n8n templates, free
The full customer package for three real catalog templates — workflow JSON, step-by-step setup guide, credential checklist. Built through the same live-instance release process as everything we sell. Plus new templates and automation guides in your inbox. No spam, unsubscribe anytime.
- 01Smart To-Do List ManagerPre-built n8n workflow template that automates productivity with OpenAI. Live in about 10 minutes.$14
- 02Email Follow-Up AutomatorPre-built n8n workflow template that automates crm with OpenAI. Live in about 15 minutes.$12
- 03Market Trend AnalyzerPre-built n8n workflow template that automates data processing with OpenAI. Live in about 10 minutes.$14
More automation guides

How to Build n8n Decision Support Automation with AI Frameworks
A founder spends a week circling a pricing decision. Not because the information's missing. It's all there. The hold-up is that there's no process to run it through. The pros and cons live in three ha…

How to Build n8n Employee Wellness Automation with AI Risk Scoring
Two people resign in the same month, both citing burnout. Nothing in the 1:1 notes flagged it. Nothing in their Slack activity looked off. The signals were there, in the throwaway comments, the slippi…

How to Build n8n Approval Workflow Automation That Auto-Approves and Escalates
A finance lead approves the same refunds every morning. Under $100, customer in good standing, clear reason. Approved, approved, approved. The decision was never hard. It just never got automated, so…