An n8n workflow can turn a single WordPress post into a set of platform-specific drafts — a LinkedIn analysis, a short X thread, a newsletter blurb — by treating WordPress as the source of truth and a large language model as the transformer in the middle. n8n supplies the connective tissue: it watches for new or updated content, pulls the full text through the WordPress API, sends it to a model with platform-aware instructions, and writes the results back as drafts for a human to approve.
This guide is written for a technically curious beginner or intermediate practitioner who already has a WordPress site and wants a reproducible repurposing pipeline rather than a black box. It covers the stages of the workflow, the prerequisites that determine whether it works at all, the failure points that most often break it, and where a locally hosted model fits.
What the pipeline actually does
Content repurposing means taking one “parent” asset and slicing it into “child” assets tuned to different channels. One description of an AI-based repurposing workflow in n8n frames the process as exactly that: the parent content is divided into child assets, and the model is directed to extract the most useful insights for each destination rather than copy-pasting the same text everywhere (n8nnode.com).
The same source breaks a well-built workflow into four functional parts: a trigger, a brain (the model), a refiner, and a delivery agent. Keeping those responsibilities separate is what makes the workflow debuggable. When a draft comes out wrong, you can tell whether the trigger sent the wrong content, the model misunderstood the platform, the refiner stripped something it should have kept, or delivery wrote to the wrong place.
n8n’s role is the orchestration layer. It is an open-source, node-based workflow automation platform that is self-hostable and ships with hundreds of built-in integrations; on a self-hosted deployment there is no per-task pricing, which matters when a single parent post fans out into several model calls and several output records (Marketing Advice). WordPress supplies both the input content and, often, the review surface where drafts land before anyone sees them.
Prerequisites before you build
- An n8n instance. Self-hosted or cloud; self-hosted gives you control over credentials and outbound traffic, cloud removes maintenance work.
- WordPress REST API access. You need a user that can read posts and create drafts, plus an application password or equivalent credential. Confirm the API responds before you open n8n — a request to the posts endpoint in a browser or with curl is a fast sanity check.
- Model access. Either a hosted API key or a local runtime such as Ollama or LM Studio exposing an OpenAI-compatible endpoint. n8n’s HTTP Request node can talk to either, so the workflow shape does not change when you switch.
- A review destination. A WordPress draft, a staging category, or an external sheet. Decide this before you build, because it determines whether the last step is an HTTP request or a spreadsheet append.
- A short list of target platforms. Each platform you add is another prompt, another model call, and another thing to review.
One design decision is worth making early: never let the workflow publish directly to a live channel. Drafts plus human approval is the pattern that keeps a bad generation from becoming a public post.
The workflow, stage by stage
1. Trigger on new or updated WordPress content
Two common triggers exist. A webhook fires when WordPress publishes or updates a post, which is close to instant but can also fire on edits you do not care about. A scheduled poll queries posts modified since the last run, which is slower but easier to reason about and easier to deduplicate with a stored timestamp or post ID. Choose the poll if your editors revise posts frequently, and the webhook if latency matters.
2. Fetch and normalize the parent content
Pull the rendered content, title, slug, categories, and canonical URL. The rendered body arrives as HTML, and raw markup wastes context and can confuse a model into echoing tags. A Code node is the natural place for this cleanup; the same anatomy described above treats the code step as the logic bridge between the CMS and the model.
// Normalize WordPress HTML into plain text for the model
const html = $json.content.rendered;
const text = html
.replace(/<[^>]+>/g, ' ')
.replace(/ /g, ' ')
.replace(/s+/g, ' ')
.trim();
return [{ json: { title: $json.title.rendered, body: text } }];Log the character count at this stage. If a long post silently exceeds the model’s context window, truncation happens without an error, and the drafts quietly lose the second half of your argument.
3. Generate platform-specific drafts
You can make one model call per platform or a single call that returns structured JSON with a field per platform. The per-platform call is easier to tune; the single call is cheaper and keeps the drafts thematically consistent. Either way, the instruction must be explicit about register. Repurposing is not copy-paste: a model needs to be told how a professional LinkedIn tone differs from the punchy, rapid-fire style of X, and it needs the platform named in the prompt rather than inferred.
A minimal prompt skeleton looks like this: state the platform, the desired length in words, the audience, the one idea the post must land, the required link, and the format (single post, thread, bullet list). Then add a hard constraint such as “do not invent statistics or quotes that do not appear in the source.” That single line prevents the most damaging class of failure.
4. Refine for brand voice
The refiner is a second pass, not a second model. It checks drafts against a style guide: banned phrases, required disclosures, link formatting, hashtag policy, and whether the draft repeats the parent post’s opening sentence. Keeping this separate from generation makes it possible to change your style rules without rewriting every platform prompt.
5. Human review checkpoint
Route the drafts somewhere a person will actually look. AI-generated drafts combined with human editing is the quality pattern that makes high-volume publishing viable; the alternative is publishing raw model output and accepting the error rate that comes with it. A WordPress draft in a dedicated category works well because reviewers already know the editor interface.
6. Deliver and record
Write approved items back to WordPress as drafts, or push them to whatever scheduling tool you use. Store the parent post ID and a revision marker alongside each child record. Without that link, a re-run after an edit will create duplicates instead of updating the existing drafts.
An illustrative run-through
The following scenario is illustrative, not a measured test result. A 1,800-word WordPress tutorial on prompt caching is published. The trigger fires, normalization yields roughly 9,000 characters, and three model calls produce a 180-word LinkedIn post, a five-post X thread, and a 120-word newsletter blurb. The refiner removes a phrase on your banned list and normalizes the link format. All three land as drafts in a “Repurposed” category. A reviewer approves two and rewrites the opening of the third, which is the expected outcome — the workflow’s job is to remove the blank-page problem, not to replace editorial judgment.
How to verify the pipeline works
- Publish a test post with a distinctive phrase and confirm that phrase appears in at least one draft.
- Check that the child record stores the parent post ID.
- Edit the parent post and re-run; confirm the drafts update rather than multiply.
- Inspect the normalized text length against the model’s context limit.
- Confirm nothing reached a live channel without approval.
Common failure points
- Authentication errors (401 or 403). Usually a revoked application password or a WordPress user without permission to create posts. Test the credential outside n8n first.
- HTML leaking into prompts. Strip tags during normalization; some models will faithfully reproduce markup they are handed.
- Duplicate runs. Webhooks can fire more than once for a single publish event. Use an idempotency key based on post ID plus revision.
- Silent context truncation. Long posts lose their tail without an error. Chunk the content or summarize before generating.
- Rate limits and timeouts. Fanning out to several platforms multiplies request volume. Add waits and retries with backoff.
- Malformed structured output. If you request JSON from the model, validate it before writing to WordPress, and fail loudly when parsing breaks.
Running the model locally
If the parent content is unpublished, client-confidential, or otherwise sensitive, a local model keeps the text on your own hardware. Ollama and LM Studio both expose OpenAI-compatible endpoints, so the n8n side of the workflow stays the same — you change the base URL and credential, not the node graph. The tradeoffs are real: instruction-following quality varies with model size, long posts may exceed a practical context window on modest hardware, and throughput depends on your GPU or CPU. For a repurposing pipeline that mostly rewrites and reformats existing text, a mid-size local model is often adequate; for nuanced tone adaptation across five platforms, a larger hosted model may still produce better first drafts.
Tradeoffs and when not to automate
Automation is strong at volume and consistency: it never forgets to add the canonical link, and it applies the same style rules at 3 a.m. as at noon. It is weak at judgment — deciding which ideas deserve amplification, or whether a paragraph is too legally sensitive to paraphrase. Treat the workflow as a drafting assistant with a mandatory review gate, not as an autopublisher.
Cost scales with volume in two places. Hosted model calls are billed per token, so a long post fanned out to five platforms is five long prompts. Self-hosted n8n avoids per-task automation fees, but you pay in server maintenance and, if you run models locally, in hardware. Measure the ratio of drafts that survive review unchanged; if most need heavy rewriting, the prompts are the problem, not the platform.
A reasonable first build
Start narrow: one platform, one parent post, a trigger, a fetch, a single model call, and a draft written back to WordPress. Verify it end to end before adding the refiner and additional platforms. Once the first path is reliable, the rest is repetition rather than new engineering.
If you build this and hit a wall — a 403 from WordPress, drafts that duplicate on re-run, or a local model that ignores your format instructions — share your n8n version, WordPress setup, model, and the exact error in the community so others can reproduce it.
FAQ
Do I need to write code to build this workflow?
Not for the core path. The trigger, WordPress fetch, model call, and draft creation can all be handled by built-in nodes. A small Code node is useful for stripping HTML and reshaping data before the model sees it, and that snippet is only a few lines long.
Can I run the AI step on a local model instead of a hosted API?
Yes. Local runtimes such as Ollama and LM Studio expose OpenAI-compatible endpoints, so you change the base URL and credential rather than the workflow structure. Expect lower instruction-following quality on small models and tighter limits on how much source text fits in context.
Why do my drafts duplicate every time the workflow runs?
The workflow is almost certainly creating a new record on each run instead of updating an existing one. Store the parent post ID and a revision marker with each child draft, then check for an existing record before writing.
Should the workflow publish directly to social channels?
No. Route output to a review surface such as a WordPress draft or a staging sheet. Generated text can misstate facts or misjudge tone, and a review gate is the cheapest safeguard against that reaching an audience.