🔓 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

Google Trends to WordPress, publish posts consistently

Lisa Granqvist Partner Workflow Automation Expert

Keeping a blog consistent is brutally manual. You find a topic, check Trends, open ten tabs for research, write, format, upload, add links, grab an image, then still forget to track what went live.

Content managers get stuck chasing deadlines. Marketing leads feel it when “we should publish more” turns into late nights. And if you run a small business, Google Trends automation like this is how you publish without living inside WordPress.

This workflow turns a trending search into a finished WordPress post, complete with research, internal links, and a tracking row in Google Sheets. You’ll see how it works, what you need, and the common places it can wobble.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Trends to WordPress, publish posts consistently

The Problem: Consistent SEO publishing takes too much effort

Publishing “consistently” sounds simple until you do the math. Every post needs a topic with demand, real sources, a clean structure, a meta description, internal links that actually make sense, and an image that won’t look like a placeholder. Most teams end up in a loop: scramble for ideas, write something decent, then lose another hour formatting and uploading it. A week later, nobody remembers which keyword the post targeted or what URL it published to, so optimization turns into guesswork.

The friction compounds. Not because any one step is impossible, but because you repeat the whole sequence again and again.

  • Trend research gets skipped when you’re busy, so you publish topics people aren’t searching for.
  • Internal links happen “later,” which usually means never, and the posts don’t support each other.
  • Formatting inside WordPress eats about an hour per post if you care about clean HTML and headings.
  • Tracking is scattered, so you can’t easily answer, “What did we publish last month and for which keyword?”

The Solution: Google Trends → researched post → WordPress publish

This n8n workflow runs on a schedule and goes hunting for emerging topics using Google Trends data (via SerpAPI). Once it finds a strong trend, it filters for higher-volume terms, then uses an AI “topic chooser” to pick the best SEO angle based on intent and competitiveness. Next, it pulls credible sources through the Perplexity API so the content has real grounding instead of vibes. From there, AI agents draft the post, insert internal links using your existing post database in Google Sheets, build semantic HTML, generate the slug, write the title and meta description, fetch a cover image, and finally publish directly to WordPress through the REST API. Last step: it logs the published URL, keyword, slug, and other details back into Google Sheets, so you have a clean record you can actually use.

The workflow starts with a scheduled run. Then it moves through trend discovery and research, followed by writing and on-site SEO (internal links, slug, metadata). Finally, WordPress gets a ready-to-go post and Google Sheets gets the paper trail.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you publish 3 posts a week. Manually, a typical cycle looks like: 45 minutes of trend/topic digging, about 2 hours writing, about 1 hour formatting in WordPress, 20 minutes adding internal links, and 10 minutes logging details in a sheet. Call it roughly 4 hours per post, or about 12 hours a week. With this workflow, you spend maybe 20 minutes upfront dialing in prompts and the Sheets template, then each run is hands-off while n8n researches, writes, publishes, and logs automatically.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • WordPress for publishing via REST API.
  • Google Sheets to store links and publishing logs.
  • SerpAPI key (get it from your SerpAPI dashboard).
  • Perplexity API key (get it from your Perplexity account settings).
  • OpenRouter API key (get it from the OpenRouter keys page).

Skill level: Intermediate. You’ll connect a few APIs, map some fields, and test one full run end-to-end.

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

How It Works

A scheduled trigger kicks things off. You set the cadence (daily, weekly, whatever fits), and n8n starts the run automatically without someone needing to remember “content time.”

Trend data is collected and narrowed down. The workflow queries Google Trends through SerpAPI, picks a strong trend pair, then filters for higher-volume terms so you’re not writing for keywords with no demand.

Research and writing happen with guardrails. Perplexity gathers credible sources and fact context, then AI agents draft the article and weave in internal links by looking up your past posts stored in Google Sheets.

Publishing and tracking are automatic. The workflow generates a slug, title, and meta description, fetches a cover image, posts to WordPress, then records the WordPress URL and target keyword back into Sheets.

You can easily modify the publishing frequency to add a human review checkpoint based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Scheduled Run Trigger

This workflow starts on a schedule and pulls trending topics automatically, so the trigger must be set first.

  1. Add and open Scheduled Run Trigger.
  2. Set the Rule interval to your preferred schedule (this workflow uses the default schedule settings as a placeholder).
  3. Ensure Scheduled Run Trigger is connected to Retrieve Google Trends.

Step 2: Connect Trend Data Sources and Filters

These nodes pull trend data and narrow it down to high-volume candidates.

  1. Open Retrieve Google Trends and set URL to https://serpapi.com/search?engine=google_trends.
  2. In Retrieve Google Trends, set Query Parameters: q to ai agent, geo to US, hl to en, date to {{ $now.minus({ days: 3 }).format('yyyy-MM-dd') }} {{ $now.format('yyyy-MM-dd') }}, and data_type to RELATED_QUERIES.
  3. Credential Required: Connect your httpQueryAuth credentials in Retrieve Google Trends (required by genericCredentialType).
  4. Open Pick Top Trend Pair and set Mode to raw with JSON Output set to the provided expression in the node.
  5. Open Filter High-Volume Terms and confirm JavaScript Code uses $('Retrieve Google Trends') to filter extracted_value > 30.

⚠️ Common Pitfall: If Retrieve Google Trends fails authentication, confirm your SerpAPI key is included in the httpQueryAuth credential.

Step 3: Set Up AI Topic Selection and Research

This stage uses AI to select the best trending topic and gather research sources.

  1. Open Choose Best SEO Topic and ensure it references the trend pair via {{ $('Pick Top Trend Pair').item.json['most-trending']['#1'].toJsonString() }} and {{ $('Pick Top Trend Pair').item.json['most-trending']['#2'].toJsonString() }}.
  2. Credential Required: Connect your openAiApi credentials in Choose Best SEO Topic.
  3. Open Gather Credible Sources and set URL to https://api.perplexity.ai/chat/completions with Method set to POST and JSON Body set to the provided expression.
  4. Credential Required: Connect your httpHeaderAuth credentials in Gather Credible Sources.
  5. Open Format Research Output and confirm the research field is set 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]) }}.

Tip: If you adjust the Perplexity model or response format in Gather Credible Sources, update the replacement logic in Format Research Output to keep citations aligned.

Step 4: Compose the Blog Draft and Internal Linking

These nodes draft the post and enrich it with internal links from your existing posts.

  1. Open Compose Blog Draft and verify it references {{ $('Choose Best SEO Topic').item.json.message.content }} and {{ $json.research }} in the message content.
  2. Credential Required: Connect your openAiApi credentials in Compose Blog Draft.
  3. Open Retrieve Past Posts and set Document ID to [YOUR_ID] and Sheet Name to gid=0.
  4. Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Past Posts.
  5. Open Compile Internal Link Data and set Aggregate to aggregateAllItemData with Destination Field Name as previous-posts.
  6. Open Inject Internal SEO Links and verify it uses {{ $('Compose Blog Draft').item.json.message.content }} and {{ $json['previous-posts'].toJsonString().split() }}.
  7. Credential Required: Connect your openAiApi credentials in Inject Internal SEO Links.

Step 5: Build HTML, SEO Metadata, and Cover Image

This stage formats the post, creates SEO metadata, and retrieves a cover image.

  1. Open Build Semantic HTML and ensure it uses {{ $json.message.content }} to generate HTML.
  2. Credential Required: Connect your openAiApi credentials in Build Semantic HTML.
  3. Open Generate SEO Slug and confirm it references {{ $('Inject Internal SEO Links').item.json.message.content }} and {{ $('Choose Best SEO Topic').item.json.message.content }}.
  4. Credential Required: Connect your openAiApi credentials in Generate SEO Slug.
  5. Open Craft Blog Title and confirm it references {{ $('Inject Internal SEO Links').item.json.message.content }} and the primary keyword expression.
  6. Credential Required: Connect your openAiApi credentials in Craft Blog Title.
  7. Open Write Meta Description and confirm it references {{ $('Inject Internal SEO Links').item.json.message.content }} and {{ $('Choose Best SEO Topic').item.json.message.content }}.
  8. Credential Required: Connect your openAiApi credentials in Write Meta Description.
  9. Open Retrieve Cover Image and set URL to https://serpapi.com/search?engine=google_images with q set to {{ $('Choose Best SEO Topic').item.json.message.content }} and gl set to us.
  10. Credential Required: Connect your httpQueryAuth credentials in Retrieve Cover Image (required by genericCredentialType).
  11. Open Save Cover Image Link and set image-url to {{ $json.images_results[1].original }}.

⚠️ Common Pitfall: If Retrieve Cover Image returns no results, adjust the query or image index used in Save Cover Image Link.

Step 6: Configure Publishing and Tracking Outputs

These final nodes publish the post to WordPress and log the result in Google Sheets.

  1. Open Post to WordPress and set Title to {{ $('Craft Blog Title').item.json.message.content }}.
  2. In Post to WordPress, set Slug to {{ $('Generate SEO Slug').item.json.message.content }} and Content to <img src="{{ $json['image-url'] }}" alt="Cover Image"> {{ $('Build Semantic HTML').item.json.message.content }}}.
  3. Confirm Status is set to draft, Author ID to 5, and Categories to 43 in Post to WordPress.
  4. Credential Required: Connect your WordPress credentials in Post to WordPress (this node has no credentials configured).
  5. Open Record Published Entry and set Operation to append.
  6. In Record Published Entry, map Link to {{ $json.link }} and Título to {{ $json.title.raw }}.
  7. Credential Required: Connect your googleSheetsOAuth2Api credentials in Record Published Entry.

Step 7: Test and Activate Your Workflow

Run a full test to confirm content generation, posting, and logging all work end-to-end.

  1. Click Execute Workflow and monitor each node from Scheduled Run Trigger through Record Published Entry.
  2. Verify a draft is created in WordPress with the generated title, slug, cover image, and HTML content from Post to WordPress.
  3. Confirm a new row appears in your Google Sheet from Record Published Entry with valid Link and Título values.
  4. If results are correct, toggle the workflow to Active to enable scheduled publishing.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • SerpAPI credentials can expire or hit plan limits. If trend pulls fail, check your SerpAPI usage dashboard and the key stored in n8n 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 Google Trends automation automation?

About 20 minutes once your API accounts are ready.

Do I need coding skills to automate Google Trends automation?

No. You’ll mostly connect accounts and paste API keys. You might tweak a filter or prompt, but you won’t be writing an app.

Is n8n free to use for this Google Trends 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 SerpAPI, Perplexity, and OpenRouter usage, which usually comes out to a few dollars for a batch of posts depending on length and model choice.

Where can I host n8n to run this 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 Google Trends automation automation for adding a human review before publishing?

Yes, and it’s a smart tweak for most brands. Route the “Build Semantic HTML” output into a WordPress draft instead of publishing, then add an approval checkpoint before the “Post to WordPress” node runs. Common customizations include changing the writing prompts for tone, adjusting the Google Trends filters for your niche, and tightening the internal-link rules so it only links to cornerstone pages.

Why is my WordPress connection failing in this workflow?

Usually it’s permissions or the REST API being blocked. Confirm the WordPress user you connected has rights to publish posts, then check if a security plugin or host firewall is denying REST requests. Also verify the site URL in the WordPress node matches your canonical domain (http vs https matters). If it was working and suddenly stopped, regenerate the application password (or credentials) and update it in n8n.

How many posts can this Google Trends automation automation handle?

A lot, as long as your API limits and WordPress hosting can keep up.

Is this Google Trends automation automation better than using Zapier or Make?

For an end-to-end content pipeline, n8n is usually a better fit because it handles branching logic, AI steps, and multi-stage formatting without turning into an expensive spiderweb of zaps. You can also self-host, which is a big deal once you publish frequently. Zapier or Make can be fine for lightweight “draft → publish” flows, but they get clunky when you add research, internal linking, and structured HTML output. Honestly, the best tool is the one you’ll maintain. Talk to an automation expert if you want a quick recommendation based on your volume and stack.

Set it up once and you stop babysitting your content calendar. The workflow handles the repetitive publishing work so your team can spend time on strategy, offers, and distribution.

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