The Content Treadmill Problem
Every content-driven business eventually faces the same challenge: publishing consistently requires either a large team or a founder spending hours each week on research and writing instead of on the work that actually moves the business forward. I spent months building a solution to this problem for my own sites and for clients, and the answer turned out to be a surprisingly practical automation loop built on n8n and Perplexity AI.
This is not about replacing writers. It is about replacing the most time-consuming and least creative parts of content production — initial research, outline generation, first-draft assembly — so that a human editor can focus on what they do best: adding genuine insight, personal experience, and editorial judgment.
Setting Up n8n
n8n is an open-source workflow automation platform that I self-host on a small VPS alongside my other services. The self-hosted version has no per-execution pricing, which matters when you are running dozens of content pipelines per week. Install it with Docker in under five minutes.
docker run -d \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
-e N8N_BASIC_AUTH_ACTIVE=true \
-e N8N_BASIC_AUTH_USER=admin \
-e N8N_BASIC_AUTH_PASSWORD=yourpassword \
n8nio/n8n
Once running, access the UI at port 5678 and create your first workflow. n8n's visual canvas makes it easy to prototype the pipeline before worrying about error handling and edge cases.
Connecting the Perplexity AI API for Research
Perplexity AI's API is the research engine of the pipeline. Unlike a general-purpose language model, Perplexity searches the web in real time and returns sourced, current information — exactly what you need for the research phase of content production.
In n8n, add an HTTP Request node configured to POST to https://api.perplexity.ai/chat/completions with your API key in the Authorization header. The prompt I use asks Perplexity to research a topic and return key facts, statistics, recent developments, and a suggested outline — structured as JSON so downstream nodes can parse it reliably.
{
"model": "sonar-pro",
"messages": [
{
"role": "system",
"content": "You are a research assistant. Return your response as structured JSON with keys: key_facts (array), recent_stats (array), outline (array of section titles), sources (array of URLs)."
},
{
"role": "user",
"content": "Research this topic for a technical blog article: {{ $json.topic }}"
}
]
}
Building the Research to Write to Publish Pipeline
The full pipeline has five stages connected in sequence. The first node reads a content brief from a Google Sheet or Airtable — topic, target keyword, word count, tone, destination (WordPress or Strapi). The second node sends the research prompt to Perplexity and parses the JSON response.
The third node takes the structured research and sends it to a writing model — I use Claude or GPT-4 — with a detailed prompt that includes the research findings, the outline, the target keyword, the desired tone, and explicit instructions about HTML formatting and word count. The writing model returns the complete article HTML.
The fourth node runs quality checks: minimum word count, presence of the target keyword, absence of certain phrases that signal low-quality AI output, and a basic readability score via a simple API call. If any check fails, the workflow triggers a Slack notification for human review rather than publishing automatically.
The fifth node publishes to the destination. For WordPress I use the REST API; for Strapi I POST to the content type endpoint. Either way the node also sets the article status to "draft" unless the quality checks all passed with high scores, in which case it publishes directly.
Scheduling and Volume
I run the pipeline on a cron trigger set to fire at 6am Monday through Friday. The content brief spreadsheet acts as a queue — the workflow reads the first unprocessed row, marks it as in-progress, runs the pipeline, then marks it as complete. This produces five articles per week with zero manual intervention during the production phase.
For clients with higher volume needs, I add a batch execution mode that processes multiple briefs in parallel using n8n's Split In Batches node, keeping within API rate limits by adding a Wait node between batches.
WordPress and Strapi Integration
The WordPress publishing node authenticates via Application Passwords, creates the post via POST /wp-json/wp/v2/posts, uploads the featured image if one was generated, and sets the appropriate categories and tags based on the content brief data. The Strapi node does the same through the Strapi REST API, with the added step of creating the slug from the title.
Avoiding AI Detection and Maintaining Quality
Purely AI-generated text has recognizable patterns that both readers and detection tools flag. My mitigation strategy operates at three levels. First, the research phase pulls in real, current data — statistics with years, specific product names, recent events — that ground the article in verifiable reality. Second, the writing prompt explicitly instructs the model to vary sentence length, use contractions naturally, include specific examples, and avoid certain overused AI phrases. Third, the human editor review step before final publication catches anything that slips through and adds the personal perspective that no AI can genuinely provide.
The result is a content operation that produces high-quality, research-backed drafts at scale, leaving the editorial team free to focus on refinement rather than assembly. That is the real value of autonomous publishing.