Automate SEO-Optimized Blog with n8n + Perplexity + SerpAPI (Full Build & Demo)
Based on Alex, PhD AI's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Use n8n to schedule weekly runs, but keep a manual execution path for testing before going live.
Briefing
A full automation pipeline can generate an SEO-optimized WordPress blog draft end to end: it pulls a weekly trending topic, uses Perplexity for deep research, writes an article with targeted keywords, creates or retrieves an image, formats everything into WordPress-ready HTML, and uploads the draft with structured metadata fields. The practical payoff is speed—turning a spreadsheet of company details into a publishable draft on a schedule—while still acknowledging where WordPress automation hits API limits.
The workflow starts in n8n with two execution paths: a scheduled run (set to trigger every week on Wednesday at 2:00 a.m. GMT in the example) and a manual run for testing. In both cases, the pipeline reads company and audience inputs from a Google Sheets spreadsheet—fields like “Who we are,” “What are you selling,” differentiators, customer age and job titles, niche, and desired word count. Those inputs guide the topic selection and the downstream writing so the content matches an ICP rather than generic trends.
Topic discovery uses Google News via SERPAPI (configured as a “search Google news” operation). The returned popular titles feed an OpenAI step that generates a similar blog title tailored to the company’s niche. Next, Perplexity (configured with the “sonar deep search” model) performs a deeper web research pass on that title and returns structured findings and citations. Those results are then transformed into SEO assets: a metadata generation step produces the article’s focus keyword, SEO title, slug, meta description, and social sharing fields (Open Graph and Twitter), while an “information extractor” structures keyword placement guidance—what keywords to use, how often, and where to place them.
The article-writing agent then produces the full blog content using the title and SEO keyword plan, with a strict output structure that feeds directly into formatting. An image agent either generates an image via OpenAI (DALL·E 3 by default, with an option to use a different image model) or retrieves a stock image from Pexels using a Pexels API key. Another agent generates image alt text and image keyword metadata, and a WordPress formatting step converts the combined text and image instructions into HTML suitable for WordPress.
After execution, the pipeline writes results back to the spreadsheet (including the generated/retrieved image URL and all SEO fields) and creates a WordPress draft via the WordPress API. However, the workflow deliberately stops short of fully automating SEO scoring and schema setup. During the demo, Rank Math and Content AI scores were not fully populated automatically—because WordPress API endpoints for those SEO settings and schema aren’t available—so the user must manually paste focus keyword and social snippet fields, then verify Rank Math/Content AI scores before publishing.
Overall, the system is a workable blueprint for scaling content production: it automates research, writing, keyword planning, image selection, and draft creation, while leaving a small but important manual checklist for SEO plugins and schema fields inside WordPress.
Cornell Notes
The n8n workflow turns a Google Sheets “company profile” into a scheduled WordPress blog draft. It finds a trending topic using SERPAPI (Google News), generates a tailored title, then uses Perplexity (sonar deep search) for research and citations. OpenAI agents convert that research into an SEO keyword plan and write a full article, then either generate an image (DALL·E 3) or fetch one from Pexels, including alt text. The pipeline formats the result as WordPress-ready HTML and uploads a draft, while manual steps remain for Rank Math fields and schema because WordPress API support is limited. The result is faster publishing with a repeatable spreadsheet-driven process.
How does the workflow decide what to write about each week?
What role does Perplexity play compared with SERPAPI?
How does the system turn research into SEO metadata and keyword placement?
How are images handled, and what metadata is produced for them?
Why does publishing still require manual SEO work inside WordPress?
What does the Google Sheets spreadsheet contain, and why is it central to the automation?
Review Questions
- Which external service is responsible for pulling popular Google News titles, and which one performs deep research with citations?
- What specific SEO fields are generated and written back to the spreadsheet before the WordPress draft is created?
- What parts of Rank Math SEO setup remain manual after the draft upload, and why?
Key Points
- 1
Use n8n to schedule weekly runs, but keep a manual execution path for testing before going live.
- 2
Drive topic selection and writing quality with Google Sheets inputs like niche, differentiators, customer profile, and desired word count.
- 3
Use SERPAPI for Google News discovery, then Perplexity (sonar deep search) for research and citations that inform the article.
- 4
Generate a structured SEO plan (focus keyword, meta fields, social snippets, and keyword placement guidance) before writing the article text.
- 5
Choose image generation (OpenAI/DALL·E 3) or image retrieval (Pexels API) and always generate alt text for SEO and accessibility.
- 6
Upload WordPress drafts via the WordPress API, but expect to manually complete Rank Math focus keyword/snippets and schema because API coverage is limited.
- 7
Treat the spreadsheet as both the configuration source and the output ledger so each run’s SEO fields and image URLs are traceable.