🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Perplexity to WordPress, posts published and logged

Lisa Granqvist Partner Workflow Automation Expert

Your content plan usually doesn’t fail because of “ideas.” It fails because turning an idea into a published post takes too many little steps, and they always land on the same already-full week. Perplexity WordPress automation fixes that.

Marketing managers feel it when “weekly posting” becomes a monthly scramble. A solo founder feels it when publishing slips behind product and sales. And an agency lead? They feel it every time a client asks, “What went live this week?”

This workflow researches a topic, writes the article, generates a featured image, publishes to WordPress, and logs the result in Google Sheets. You’ll see what it does, what you need, and where teams usually tweak it.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Perplexity to WordPress, posts published and logged

The Problem: Weekly publishing dies in the handoff

Publishing consistently sounds simple until you do the whole chain yourself. You research a topic, collect sources, outline, draft, find an image, rename it, upload it, add alt text, format HTML so it doesn’t break, then finally hit publish. And after that, you still need a place to track what went live, which category it used, and what URL to share. Miss one step and you either ship something sloppy or you delay again. Honestly, it’s the switching between tools that drains you.

It’s rarely one big blocker. The friction compounds.

  • Topic research gets repeated because last week’s notes are scattered across tabs, docs, and messages.
  • Formatting and uploading to WordPress takes about 30 minutes per post, even when the writing is already done.
  • Featured images become a mini-project, which means posts sit “almost ready” for days.
  • Tracking happens after the fact, so you lose links, categories, and publishing history when you need it most.

The Solution: Perplexity research → AI draft → WordPress publish + Sheets log

This n8n workflow runs on a schedule every Monday morning and builds a complete blog post end-to-end. It starts by calling Perplexity to pull a timely startup topic (and the supporting context you’d normally hunt down manually). Then it extracts the key fields it needs and uses GPT to generate an SEO-friendly article in structured HTML, so WordPress formatting is less of a gamble. Next, it creates an image prompt, requests a cinematic featured image from Leonardo AI, waits until the render is ready, and downloads the final asset. Finally, it uploads the image to WordPress, applies alt text, publishes the post in your chosen category, and logs the URL and metadata into Google Sheets so you have a clean history.

The workflow begins with a weekly CRON trigger. From there, Perplexity + GPT handle the research and writing while Leonardo produces the image in the background. WordPress receives a finished post and Google Sheets becomes your tracking dashboard, automatically.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you publish one SEO post every week. Manually, you might spend about 45 minutes researching, about 60 minutes turning a draft into clean WordPress HTML, and another 20 minutes finding or generating an image, uploading it, and setting alt text. That’s roughly 2 hours per post, plus the annoying context switching. With this workflow, you spend about 10 minutes reviewing the draft and tweaking the category or headline, then it publishes and logs the URL automatically.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Perplexity API for topic research and sources
  • OpenAI API to generate the HTML article
  • Leonardo AI token (get it from your Leonardo account settings)
  • WordPress credentials (Basic Auth from your WordPress setup)
  • Google Sheets access to log published posts

Skill level: Intermediate. You will connect APIs, paste keys, and verify WordPress endpoints, but you won’t be writing an app.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A weekly schedule triggers the run. Every Monday at 6:00 AM, n8n starts the workflow automatically, so content production isn’t stuck behind meetings or inbox triage.

Perplexity pulls a trend-worthy topic. An HTTP request asks Perplexity for trending startup ideas and returns research context you can build on instead of starting from a blank page.

The workflow turns research into a publishable post. A code step extracts the fields you care about, then GPT generates a structured HTML article. Another AI step creates a strong image prompt, and Leonardo renders the featured image while n8n checks status and waits if it’s not ready yet.

WordPress gets the final assets and Google Sheets gets the record. The workflow uploads the image, applies alt text, publishes the post in your chosen category, then logs key details to a Sheets row so you can track output over time.

You can easily modify the publishing day to match your editorial calendar based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Scheduled Trigger

Set the weekly schedule that starts the pipeline.

  1. Add the Scheduled Automation Start node as your trigger.
  2. Set the cron expression to 0 6 * * 1 in the rule interval to run every Monday at 06:00.
  3. Connect Scheduled Automation Start to Retrieve Topic via Perplexity.

Tip: If you change the cron schedule, keep the format consistent with standard cron syntax to avoid silent misfires.

Step 2: Connect Perplexity for Article Generation

Pull a fresh, structured article in JSON format from Perplexity.

  1. Select the Retrieve Topic via Perplexity node.
  2. Credential Required: Connect your perplexityApi credentials.
  3. Credential Required: Connect your httpHeaderAuth credentials.
  4. Set URL to https://api.perplexity.ai/chat/completions and Method to POST.
  5. Set JSON Body to the provided JSON prompt payload that returns title and content in strict JSON.
  6. Connect Retrieve Topic via Perplexity to Extract Article Fields.

⚠️ Common Pitfall: If the response is not valid JSON, Extract Article Fields will fail to parse it. Ensure the Perplexity prompt enforces strict JSON output.

Step 3: Parse the Article and Generate the Image Prompt

Transform the Perplexity output into structured fields and prepare an editorial image prompt.

  1. Open Extract Article Fields and keep the JavaScript that parses choices[0].message.content and builds image_filename.
  2. Confirm the output fields are title, content, and image_filename.
  3. Open Generate Image Prompt and set the model to gpt-4.1-mini.
  4. Credential Required: Connect your openAiApi credentials.
  5. Ensure the prompt references {{ $json.title }} and {{ $json.content }} to build the image description.
  6. Connect Extract Article Fields to Generate Image Prompt.

Tip: The image prompt should be single-line and output only the prompt text to work reliably with Leonardo.

Step 4: Generate and Retrieve the Leonardo Image

Request the image, poll for completion, and download the final asset.

  1. In Request Leonardo Image, set URL to https://cloud.leonardo.ai/api/rest/v1/generations and keep the JSON body with "prompt": "{{ $json.message.content }}".
  2. Credential Required: Connect your httpBearerAuth credentials in Request Leonardo Image and Check Leonardo Status.
  3. In Check Leonardo Status, set the URL to =https://cloud.leonardo.ai/api/rest/v1/generations/{{ $json.sdGenerationJob.generationId }}.
  4. Configure Status Branch Check to check {{ $json.generations_by_pk.status }} equals COMPLETE.
  5. Ensure Status Branch Check routes to Fetch Leonardo Image when complete, and to Delay Interval when not complete.
  6. Connect Delay Interval back to Check Leonardo Status to create the polling loop.
  7. In Fetch Leonardo Image, set the URL to ={{ $json.generations_by_pk.generated_images[0].url }}.

⚠️ Common Pitfall: If Delay Interval is too short, you may exceed API rate limits during status polling.

Step 5: Publish to WordPress and Log to Sheets

Upload the image, set alt text, publish the post, and record it in Google Sheets.

  1. In Upload Media to WordPress, set URL to https://cristiantala.com/wp-json/wp/v2/media and Content Type to binaryData.
  2. Set the header Content-Disposition to =attachment; filename="{{ $('Extract Article Fields').item.json.image_filename }}" and Content-Type to image/jpeg.
  3. Credential Required: Connect your httpBasicAuth credentials for Upload Media to WordPress, Apply Image Alt Text, and Publish WordPress Post.
  4. In Apply Image Alt Text, set URL to =https://cristiantala.com/wp-json/wp/v2/media/{{ $json.id }} and set alt_text to {{ $('Generate Image Prompt').item.json.message.content }}.
  5. In Publish WordPress Post, set the JSON body to include "title": "{{ $('Extract Article Fields').item.json.title }}", "content": "{{ $('Extract Article Fields').item.json.content }}", "status": "publish", "categories": [916], and "featured_media": {{ $('Upload Media to WordPress').item.json.id }}.
  6. In Log Post to Sheets, set Operation to appendOrUpdate, select the spreadsheet [YOUR_ID], and map columns like URL, Topic, and Fecha del Posteo.
  7. Credential Required: Connect your googleSheetsOAuth2Api credentials in Log Post to Sheets.

Step 6: Test and Activate Your Workflow

Run a manual execution to verify the full pipeline before letting it run on schedule.

  1. Click Execute Workflow and confirm that Retrieve Topic via Perplexity returns JSON with title and content.
  2. Verify Request Leonardo Image and Check Leonardo Status loop until Status Branch Check routes to Fetch Leonardo Image.
  3. Confirm Upload Media to WordPress returns a media id and that Publish WordPress Post returns a published post.
  4. Open the Google Sheet to verify Log Post to Sheets appended or updated the row with the new post URL and image URL.
  5. Toggle the workflow to Active so Scheduled Automation Start runs it automatically every week.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • WordPress credentials can expire or need specific permissions. If things break, check your WordPress application password or Basic Auth settings first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Perplexity WordPress automation?

About an hour if you already have all API keys.

Do I need coding skills to automate Perplexity WordPress publishing?

No coding required. You’ll mainly connect accounts, paste API keys, and test a manual run.

Is n8n free to use for this Perplexity WordPress automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Perplexity, OpenAI, and Leonardo API usage costs.

Where can I host n8n to run this Perplexity WordPress automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Perplexity WordPress automation workflow for Spanish posts?

Yes, but you’ll want to change it in the prompts, not at the end. Update the “Retrieve Topic via Perplexity” request to fetch Spanish-language sources, then adjust the GPT prompt so it writes in Spanish with your preferred tone. If you need Spanish alt text too, keep that instruction in the image/alt-text part of the workflow so it stays consistent. Category IDs in WordPress can also be swapped to route Spanish posts into a dedicated category.

Why is my WordPress connection failing in this workflow?

Usually it’s invalid Basic Auth credentials or an endpoint mismatch. Regenerate your WordPress application password (or confirm Basic Auth is allowed), then update the credentials used in the HTTP requests for media upload and post publishing. Also check that your site blocks XML-RPC/REST requests from unknown IPs, which can silently fail on some hosts. If media uploads work but publishing fails, it’s often a permissions issue for the user role tied to the credentials.

How many posts can this Perplexity WordPress automation handle?

Practically, it can handle as many as your n8n plan and API quotas allow.

Is this Perplexity WordPress automation better than using Zapier or Make?

Often, yes, because this workflow needs waiting, branching, and multi-step HTTP calls that get clunky (and pricey) in simpler tools. n8n handles the Leonardo “check status, wait, retry” loop cleanly, and you can self-host if you want unlimited executions. The trade-off is a bit more setup time up front. If your process is just “take text, create a draft,” Zapier or Make might be fine. If you want the full pipeline with images, publishing, and logging, n8n is a better fit. Talk to an automation expert if you want a quick recommendation based on your stack.

Once this is running, “weekly publishing” stops being a recurring task and becomes a scheduled outcome. The workflow handles the repetitive parts so you can focus on what to say next.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal