Skip to main content

Publish Google News–based SEO blog posts to WordPress with Claude, Gemini and RankMath

Workflow preview

Workflow preview
100%
Publish Google News–based SEO blog posts to WordPress with Claude, Gemini and RankMath preview
Open on n8n.io

1. Workflow Overview

Stop writing blog posts manually. This workflow monitors Google News every 12 hours on any topic you choose, automatically selects the most relevant article, scrapes the source content, generates a...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.merge, n8n-nodes-base.limit, @n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-serpapi.serpapi, n8n-nodes-base.splitout, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Salman Mehboob.

Original n8n.io source

1.1 Workflow description

Title
Publish Google News–based SEO blog posts to WordPress with Claude, Gemini and RankMath
Workflow name
Publish Google News–based SEO blog posts to WordPress with Claude, Gemini and RankMath

Stop writing blog posts manually. This workflow monitors Google News every 12 hours on any topic you choose, automatically selects the most relevant article, scrapes the source content, generates a 100% original SEO-optimized blog post using Claude AI, creates a featured image with Google Gemini, and publishes the complete post to WordPress with RankMath meta title and meta description fully automated, zero manual work.

Perfect for bloggers, content marketers, digital agencies, WordPress site owners, and anyone who wants to keep their website updated with fresh, AI-written content without spending hours writing or publishing.


What problem does this solve?

Publishing fresh, well-written blog content consistently is one of the hardest parts of running a website. Finding relevant news, writing original articles, creating images, and publishing everything to WordPress takes hours every single time.

This workflow eliminates all of that. It runs on a schedule, picks the best news story on your topic, writes a completely original article from scratch, and publishes it to your WordPress site, including featured image, meta title, and meta description while you focus on everything else.


How it works

Scheduled trigger runs every 12 hours automatically No manual action required. The workflow runs on its own twice a day.

Fetch latest news via SerpAPI Google News SerpAPI fetches the freshest articles from Google News based on your search query. The default query is seo but you can change it to any topic - tech, finance, health, marketing, AI, real estate, or anything your blog covers. One parameter change is all it takes.

Check already-published articles via Google Sheets A Google Sheets node reads all previously published news links from your tracking sheet. This ensures the same article is never processed twice - even if it keeps appearing in Google News days later.

Remove duplicates with Merge node The Merge node compares incoming articles against your published history and removes any matches. Only genuinely new, unprocessed articles move forward.

Sort by date and limit to top 10 Remaining articles are sorted by publish date, newest first. A Limit node keeps only the top 10 most recent items for evaluation.

AI agent selects the single best article All 10 article titles and links are combined into one item and sent to an AI Agent powered by Claude (via OpenRouter). The agent reads every title and picks the one most relevant and valuable for your website's audience - filtering out off-topic, low-quality, or irrelevant results. It returns the winning article's title and link.

Scrape the full source article An HTTP Request node fetches the complete HTML of the selected article. An HTML Extract node pulls only the meaningful content - headings (h1, h2, h3) and paragraphs (p) - stripping out ads, navigation menus, and everything else. An Aggregate node joins all extracted text into one clean block ready for the AI.

Claude generates a 100% original article A second AI Agent (Claude via OpenRouter) receives the scraped content as research material only. It does not rewrite or paraphrase the source. It writes a completely new, original, SEO-optimized article based on the topic and ideas - with its own structure, wording, and insights. The output includes:

  • Article title
  • Meta title (under 60 characters)
  • Meta description (under 160 characters)
  • Full article body in Markdown format
  • A featured image generation prompt

Google Gemini generates the featured image The image prompt produced by Claude is sent to Google Gemini's image generation model. The image is created in 16:9 ratio, suitable as a WordPress featured image.

Upload image to WordPress Media Library An HTTP Request node uploads the generated image binary directly to your WordPress site via the REST API. WordPress returns an image ID which is stored for the next step.

Convert Markdown to HTML The article content is in Markdown format. A Markdown node converts it to clean HTML before publishing.

Arrange all data in one place A Set node collects all required fields - title, HTML content, image ID, meta title, meta description, and original news source link - into one organised item.

Create the WordPress post The WordPress node creates the post with title, content, author, and category. You can set the post to draft for review or publish directly. The category ID is configurable to match your site structure.

Attach featured image and RankMath SEO meta An HTTP PUT request updates the post to attach the featured image using the stored image ID, and writes the RankMath SEO title and meta description using registered REST API meta fields.

Log to Google Sheets The original news link and the published WordPress post URL are saved back to your Google Sheets tracking file. This is what prevents the same article from ever being processed again on future runs.


What you need

  • SerpAPI — for Google News fetching
  • OpenRouter — to access Claude (anthropic/claude-sonnet-4.5)
  • Google Gemini (PaLM API) — for featured image generation
  • WordPress — with Application Password authentication
  • Google Sheets — with two columns: news_link and wp_post_link
  • RankMath SEO plugin on WordPress (or adapt for Yoast — see note below)

One-time WordPress setup for RankMath meta fields

Add this PHP snippet via the Code Snippets plugin or your theme's functions.php to enable writing RankMath SEO title and description through the REST API:

add_action('rest_api_init', function () {
 register_post_meta('post', 'rank_math_title', [
 'show_in_rest' => true, 'single' => true, 'type' => 'string',
 'auth_callback' => fn() => current_user_can('edit_posts'),
 ]);
 register_post_meta('post', 'rank_math_description', [
 'show_in_rest' => true, 'single' => true, 'type' => 'string',
 'auth_callback' => fn() => current_user_can('edit_posts'),
 ]);
});

Using Yoast SEO instead? Replace the meta keys with _yoast_wpseo_title and _yoast_wpseo_metadesc in the last HTTP node.


How to customise it for your topic

Change the q parameter in the SerpAPI node to any keyword -digital marketing, cryptocurrency, AI tools, content marketing, web design, or anything else. The entire workflow adapts automatically. The AI agent will select the most relevant article for your niche and write accordingly.

For assistance and support: [email protected] Linkedin: https://www.linkedin.com/in/salman-mehboob-pro/

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - ⏰ Run Every 12 Hours

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - Remove Already Used News

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 3 - Limit

Type / Role
n8n-nodes-base.limit - limit
Config choices
Version 1

Block 4 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 5 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 6 - Structured Output Parser1

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 7 - Google_news search

Type / Role
n8n-nodes-serpapi.serpApi - serpApi
Config choices
Version 1

Block 8 - Split into Items

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 9 - Merge into One Output

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Slect one worthy article

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 11 - Scrape Source Page

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 12 - Extract Article Content

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 13 - AI Content Generator

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 14 - Generate Featured Image

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1.1

Block 15 - Uploading Image to WP

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Data Arrange

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Markdown to Html

Type / Role
n8n-nodes-base.markdown - markdown
Config choices
Version 1

Block 18 - Create Post in WP

Type / Role
n8n-nodes-base.wordpress - wordpress
Config choices
Version 1

Block 19 - Add Image, Meta Title, Description to Post

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Get Previous Published News

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 21 - Sort By Time

Type / Role
n8n-nodes-base.sort - sort
Config choices
Version 1

Block 22 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Publish Google News–based SEO blog posts to WordPress with Claude, Gemini and RankMath
Complexity advanced
Nodes 31
Categories Content Creation, Multimodal AI
Author Salman Mehboob
Published 01 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14576/14576.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Publish Google News–based SEO blog posts to WordPress with Claude, Gemini and RankMath do?

Stop writing blog posts manually. This workflow monitors Google News every 12 hours on any topic you choose, automatically selects the most relevant article, scrapes the source content, generates a...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.