Perplexity to WordPress, drafts ready to edit fast
You finally sit down to write, and half your time disappears into research tabs, messy notes, and “where did I save that source?” moments. Then you still have to format WordPress, hunt for a featured image, and craft a decent meta description.
Content marketers feel it first. But agency owners and solo founders shipping their own blogs get stuck in the same loop. This Perplexity WordPress drafts automation gets you from research to a clean WordPress draft (title, slug, meta, HTML, and featured image) without the constant copy-paste.
Below you’ll see what the workflow does, what it saves you, and how to adapt it for your niche so drafts land ready to edit, not rebuild.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Perplexity to WordPress, drafts ready to edit fast
flowchart LR
subgraph sg0["Form Submission Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Form Submission Trigger"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Perplexity Research Call"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Normalize Citation Links", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Copywriting Agent", pos: "b", h: 48 }
n4@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Mini Model", pos: "b", h: 48 }
n5@{ icon: "mdi:robot", form: "rounded", label: "Compose HTML Output", pos: "b", h: 48 }
n6@{ icon: "mdi:robot", form: "rounded", label: "Generate Title Slug Meta", pos: "b", h: 48 }
n7@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Engine", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Structured JSON Parser", pos: "b", h: 48 }
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Combine Streams"]
n10@{ icon: "mdi:cog", form: "rounded", label: "Aggregate Blog Details", pos: "b", h: 48 }
n11@{ icon: "mdi:swap-vertical", form: "rounded", label: "Sanitize HTML", pos: "b", h: 48 }
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/wordpress.svg' width='40' height='40' /></div><br/>Publish WordPress Draft"]
n13@{ icon: "mdi:swap-vertical", form: "rounded", label: "Define Image URL", pos: "b", h: 48 }
n14["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch Image File"]
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Media to WP"]
n16["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Assign Featured Media"]
n17["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Telegram Success Notice"]
n9 --> n10
n14 --> n15
n12 --> n13
n5 --> n9
n4 -.-> n3
n11 --> n12
n2 --> n3
n13 --> n14
n7 -.-> n6
n0 --> n1
n3 --> n5
n3 --> n6
n3 --> n9
n1 --> n2
n10 --> n11
n6 --> n9
n8 -.-> n6
n15 --> n16
n16 --> n17
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n3,n5,n6,n8 ai
class n4,n7 aiModel
class n1,n14,n15,n16 api
classDef customIcon fill:none,stroke:none
class n0,n1,n9,n12,n14,n15,n16,n17 customIcon
The Problem: Research-to-Draft Takes Forever
Writing a good post isn’t the hard part. It’s everything around it. You research in one place, outline somewhere else, draft in a doc, then rebuild the whole thing inside WordPress because the formatting gets weird. Meanwhile you’re trying to remember which citations were trustworthy, and you still need a title that doesn’t flop, a slug that makes sense, and a meta description that isn’t bland. Do this a few times a week and it quietly becomes a second job.
It adds up fast. And the friction compounds when you’re publishing on a schedule.
- Research notes turn into a cluttered pile, so your final draft loses structure and you spend another hour fixing it.
- WordPress formatting gets rebuilt manually, which means headings, links, and spacing drift from your standards.
- Featured images become a last-minute scramble, and posts sit in “almost ready” limbo.
- Metadata is often skipped or rushed, so the post is weaker on search from day one.
The Solution: Perplexity Research → WordPress Draft, Automatically
This workflow starts with a simple form submission in n8n: you enter a query (topic, angle, audience, or even a rough outline). n8n sends that prompt to Perplexity to gather research and citations, then normalizes the citation links so sources stay clean and usable. Next, an OpenAI-powered copywriting agent turns the research into structured content and generates the critical extras you usually postpone: a strong title, a WordPress-friendly slug, and a meta description. The workflow then composes HTML, sanitizes it so WordPress doesn’t choke on odd markup, and creates a new draft post directly inside WordPress with the right fields filled in. Finally, it fetches a featured image file, uploads it to your WordPress media library, assigns it to the draft, and sends a Telegram message confirming the draft is ready.
The workflow kicks off with your topic. Perplexity handles the research pass, OpenAI turns it into publishable structure, and WordPress receives a draft that already looks like a real post. Telegram is your “done” receipt, so you’re not guessing if it worked.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you publish 3 posts a week. Manually, a “research + draft setup + WordPress formatting + image” pass often takes about 2 hours per post, so you’re spending roughly 6 hours before you even get to editing. With this workflow, you submit the query in a minute or two, wait about 10 minutes for the draft to land in WordPress, then jump straight into editing and adding your real expertise. That’s roughly 5 hours back each week, without lowering quality.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- WordPress for creating drafts via API access
- Perplexity AI to generate research with citations
- OpenAI API key (get it from the OpenAI dashboard)
- Telegram bot for “draft is ready” notifications
Skill level: Intermediate. You’ll connect a few credentials and test a run, but you won’t be writing code.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You submit a topic using the n8n form trigger. That can be a single query (“best onboarding automations for agencies”) or a more guided prompt with audience and tone.
Perplexity gathers research and citations. n8n calls Perplexity via HTTP, then cleans up citation links so sources are consistent, clickable, and easier to review later.
OpenAI generates the post assets. A copywriting agent creates the article structure and HTML, and a separate generation step produces a title, slug, and meta description in a predictable format that can be parsed reliably.
WordPress receives a sanitized draft, then gets a featured image. The workflow publishes a draft post, fetches an image file from the URL you define, uploads it to your media library, assigns it as featured media, then sends a Telegram success message.
You can easily modify the research prompt and the writing constraints to match your niche and brand voice based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
Start by setting up the incoming form submission that kicks off the workflow and captures the research topic.
- Add and configure Form Submission Trigger with Form Title set to
Blog Factoryand Form Description set toCreate SEO optimized blog posts. - In Form Fields, add a textarea labeled Research Query and set its placeholder to
What are the most common challenges facing Canadian employers regarding recruitment and why would they want to hire a recruiting firm to solve these problems.. - Ensure the field is marked as required so every run includes a valid topic.
Step 2: Connect the Research Source
Use Perplexity to fetch detailed research that will inform the blog post.
- Configure Perplexity Research Call with URL set to
https://api.perplexity.ai/chat/completionsand Method set toPOST. - Set JSON Body to the provided expression, including the user prompt with
{{ $json['Research Query'] }}. - Credential Required: Connect your
httpHeaderAuthcredentials in Perplexity Research Call. - In Normalize Citation Links, set the research field to
{{ $json.choices[0].message.content.replaceAll("[1]", " - source: " +$json.citations[0]).replaceAll("[2]"," - source:" +$json.citations[1]).replaceAll("[3]"," - source: " +$json.citations[2]).replaceAll("[4]"," - source: "+$json.citations[3]).replaceAll("[5]"," - source: "+$json.citations[4]).replaceAll("[6]"," - source: "+$json.citations[5]).replaceAll("[7]"," - source: "+$json.citations[6]).replaceAll("[8]"," - source: "+$json.citations[7]).replaceAll("[9]"," - source: "+$json.citations[8]).replaceAll("[10]"," - source: "+$json.citations[9]) }}.
Step 3: Set Up the AI Copywriting and Metadata Generation
Configure the AI agents and models that generate the article, HTML, and SEO metadata.
- In Copywriting Agent, confirm the prompt uses
{{ $('Form Submission Trigger').item.json['Research Query'] }}and{{ $('Normalize Citation Links').item.json.research }}as inputs. - Connect OpenAI Mini Model to Copywriting Agent as the language model, with Model set to
gpt-4o-mini. Credential Required: Connect youropenAiApicredentials in OpenAI Mini Model. - Configure Compose HTML Output to use the provided prompt and ensure it processes
{{ $json.output }}. Credential Required: Connect youropenAiApicredentials in Compose HTML Output. - Set up Generate Title Slug Meta with the JSON-only prompt. This node uses OpenAI Chat Engine as the language model — Credential Required: Connect your
openAiApicredentials in OpenAI Chat Engine. - Keep Structured JSON Parser attached as the output parser for Generate Title Slug Meta; credentials should be added to the parent model node (not the parser).
Step 4: Merge Parallel Outputs and Prepare HTML
This workflow merges three parallel streams to assemble the final payload for WordPress.
- Ensure Copywriting Agent outputs to Compose HTML Output, Generate Title Slug Meta, and Combine Streams in parallel.
- Set Combine Streams to Number of Inputs =
3so it can merge HTML, title/slug/meta, and agent output. - Configure Aggregate Blog Details with Aggregate set to
aggregateAllItemData. - In Sanitize HTML, set the content field to
{{ $json.data[0].message.content.replaceAll('```html', '').replaceAll('```','') }}to strip code fences.
Step 5: Configure WordPress Publishing and Media Upload
Publish the draft, upload a featured image, and attach it to the WordPress post.
- In Publish WordPress Draft, set Title to
{{ $('Aggregate Blog Details').item.json.data[2].output.title }}and Slug to{{ $('Aggregate Blog Details').item.json.data[2].output.slug }}. - Set Status to
draft, Content to{{ $json.content }}, and Author ID to2. - Credential Required: Connect your
wordpressApicredentials in Publish WordPress Draft, Upload Media to WP, and Assign Featured Media. - In Define Image URL, set image-url to
https://smartcdn.gprod.postmedia.digital/healthing/wp-content/uploads/2024/07/GettyImages-1455799246.jpg?quality=90&strip=all&w=704&h=395. - Configure Fetch Image File with URL set to
{{ $json['image-url'] }}. - In Upload Media to WP, keep URL set to
https://commonclone.com/wp-json/wp/v2/mediaand set the Content-Disposition header toattachment; filename="cover-image-{{ $('Publish WordPress Draft').item.json.id }}.jpeg". - In Assign Featured Media, set the URL to
https://commonclone.com/wp-json/wp/v2/posts/{{ $('Publish WordPress Draft').item.json.id }}and the featured_media query to{{ $json.id }}.
Step 6: Configure the Success Notification
Send a confirmation message after the post is created and media is attached.
- In Telegram Success Notice, set Text to
Success! Your blog post was created at {{ $now }}. - Set Chat ID to
{{ $env.TELEGRAM_CHAT_ID }}. - Credential Required: Connect your
telegramApicredentials in Telegram Success Notice.
Step 7: Test and Activate Your Workflow
Run a manual test to verify content generation, WordPress draft creation, media upload, and Telegram notification.
- Click Execute Workflow and submit the form in Form Submission Trigger with a realistic research topic.
- Confirm that Publish WordPress Draft creates a new draft post with the generated title, slug, and HTML content.
- Verify that Assign Featured Media sets the featured image and that Telegram Success Notice posts a success message.
- Once verified, toggle the workflow to Active so it runs for future form submissions.
Common Gotchas
- WordPress credentials can expire or need specific permissions. If things break, check your WordPress Application Passwords (or user role permissions) 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.
- Perplexity and OpenAI prompts that are too generic create bland drafts. Add your audience, tone, and “must-include” points early or you will be editing outputs forever.
Frequently Asked Questions
About 30 minutes if your API keys are ready.
No. You’ll mostly connect accounts and tweak prompts. The hardest part is usually WordPress permissions, not “code.”
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 and OpenAI API usage, which depends on how long your prompts and drafts are.
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.
Yes, and you should. Update the prompt inside the “Copywriting Agent” to include tone, audience, and forbidden phrases, then adjust “Generate Title Slug Meta” so your titles match your style. Many teams also swap the image logic by changing the “Define Image URL” step to pull from a brand asset library or a keyword-based source. If citations matter in your industry, keep the “Normalize Citation Links” behavior strict so links stay clean.
Most of the time it’s an application password issue or the user role can’t create posts. Regenerate the WordPress application password, update the credential in n8n, and confirm the account has permission to upload media too (featured images often fail first). If it works for posts but fails on images, the media upload endpoint is being blocked by a security plugin or your host’s firewall. Rate limits are rare here, but they can happen if you trigger a bunch of drafts at once.
A lot, as long as your API limits and hosting can keep up.
Often, yes, because this workflow has multiple “streams” (research, content generation, metadata generation, image upload) that need merging and cleanup before WordPress. n8n handles branching and merging without making you pay extra for every path. Self-hosting is also a big deal if you plan to run lots of drafts. Zapier or Make can be quicker for simple two-step jobs, but they get awkward when you need structured JSON parsing, HTML sanitizing, and multi-call WordPress media handling in one flow. Talk to an automation expert if you want a quick recommendation based on your volume.
Once this is running, you stop “setting up” posts and start improving them. The workflow handles the repetitive parts, so your editing time actually goes into making the content worth reading.
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.