AI News Automation WorkflowAI News Automation Workflow
Build an AI News Auto-Publisher with n8n & Claude
📰 Automation Tutorial · n8n + Claude AI

Build an AI News Auto-Publisher that writes Arabic SEO articles from RSS feeds

⏱ 30 min build 🔧 n8n Workflow 🤖 Claude AI 🌐 WordPress

🎁 Free workflow included — import it into n8n in one click

⬇ Download Workflow JSON
This tutorial walks you through building a fully automated pipeline that monitors 6 top AI news sources, scores and filters the most relevant stories from the last 24 hours, then uses Claude to write complete Arabic SEO articles — automatically saved as WordPress drafts. Zero manual writing required.
n8n Claude API RSS Arabic SEO WordPress Automation
Manual Trigger
📡
📡
📡
6× RSS Sources
Merge All RSS
🔍
Dedup Filter
📊
Score & Filter 24H
🏆
Top 3
🤖
Claude AI Write
{ }
Parse JSON
🌐
WordPress Draft

0 Prerequisites

Before you start, make sure you have:

🔧
n8n Instance
Self-hosted or n8n Cloud
🤖
Anthropic API Key
claude.ai → API section
🌐
WordPress Site
With REST API enabled
🔑
WP App Password
Users → Application Passwords

1 Import the Workflow

The fastest way to get started is to download and import the pre-built workflow:

  1. Download the workflow JSON from Google Drive ↗ or use the green button at the top of this page
  2. Open your n8n instance and go to Workflows → Import from File
  3. Select the downloaded JSON file and click Import
  4. The full workflow will appear — ready to configure
💡 Tip: If you prefer to build it manually step by step, follow sections 2–6 below. Each step corresponds to a node group in the workflow.

2 Set Up RSS Feed Sources

The workflow pulls from 6 high-quality AI & tech news sources. Each is an RSS Feed Read node.

SourceRSS URLTypical Items
TechCrunch AIhttps://techcrunch.com/feed/~1/day
VentureBeat AIhttps://venturebeat.com/feed/~20/day
The Verge AIhttps://www.theverge.com/rss/index.xml~7/day
Wired AIhttps://www.wired.com/feed/rss~10/day
MIT Tech Reviewhttps://www.technologyreview.com/feed/~10/day
Hugging Face Bloghttps://huggingface.co/blog/feed.xml~757 total

All 6 RSS nodes connect to a single Merge (Append) node which combines everything into one stream of ~814 items.

3 Filter & Score Articles

3a — Deduplicate (“Never Seen Before”)

This Code node removes duplicate articles by checking the link field:

const seen = new Set();
return $input.all().filter(item => {
  const link = item.json.link;
  if (!link || seen.has(link)) return false;
  seen.add(link);
  return true;
});

3b — Filter Last 24H and Score

Only articles published within the last 24 hours are kept. Each article is then scored by counting how many AI-related keywords appear in the title and summary:

const AI_KEYWORDS = [
  'ai', 'artificial intelligence', 'machine learning',
  'llm', 'gpt', 'claude', 'gemini', 'openai', 'deepmind',
  'neural', 'model', 'chatbot', 'automation'
];

const now = Date.now();
const MS_24H = 24 * 60 * 60 * 1000;

return $input.all()
  .filter(item => {
    const pub = new Date(item.json.pubDate).getTime();
    return (now - pub) < MS_24H;
  })
  .map(item => {
    const text = (item.json.title + ' ' + item.json.contentSnippet).toLowerCase();
    const score = AI_KEYWORDS.reduce((acc, kw) =>
      acc + (text.includes(kw) ? 1 : 0), 0
    );
    return { ...item, json: { ...item.json, aiScore: score } };
  })
  .filter(item => item.json.aiScore > 0)
  .sort((a, b) => b.json.aiScore - a.json.aiScore);

3c — Top 3 Trending

A simple slice to take the 3 highest-scoring articles:

return $input.all().slice(0, 3);

4 Write Arabic SEO Articles with Claude

The Anthropic node sends each of the top 3 articles to Claude with a detailed system prompt. Configure it as follows:

Node Type

Use the Anthropic Chat Model node (LangChain integration) with model claude-opus-4-5.

The Prompt

You are an expert Arabic SEO content writer.
Given this AI news article:

Title: {{ $json.title }}
Source: {{ $json.link }}
Summary: {{ $json.contentSnippet }}

Write a comprehensive, SEO-optimized Arabic blog article.
Include:
1. An engaging Arabic title with the primary keyword
2. A meta description (160 chars max)
3. Full article body (600-900 words) in Modern Standard Arabic
4. 5 relevant Arabic SEO tags
5. A concluding call-to-action

Respond ONLY in JSON format:
{
  "title": "...",
  "meta_description": "...",
  "content": "...",
  "tags": ["..."],
  "slug": "..."
}
📌 Credential Setup: In the Anthropic node, select Create New Credential and paste your API key from console.anthropic.com. Name it something like “Claude API”.

5 Parse the Article Data

Claude returns JSON wrapped in a text block. This Code node cleanly parses it:

const raw = $input.first().json.text || '';
try {
  const clean = raw.replace(/```json|```/g, '').trim();
  const parsed = JSON.parse(clean);
  return [{ json: parsed }];
} catch(e) {
  // Fallback if Claude's response isn't perfect JSON
  return [{ json: {
    title: 'Draft Article',
    content: raw,
    tags: [],
    slug: 'draft-' + Date.now()
  }}];
}

6 Save as WordPress Draft

The final node posts to your WordPress site via the REST API using Basic Auth with an Application Password.

HTTP Request Node Configuration

FieldValue
MethodPOST
URLhttps://yoursite.com/wp-json/wp/v2/posts
AuthenticationBasic Auth (username + app password)
BodyJSON (see below)

Request Body

{
  "title": "{{ $json.title }}",
  "content": "{{ $json.content }}",
  "status": "draft",
  "tags": {{ JSON.stringify($json.tags) }},
  "slug": "{{ $json.slug }}",
  "excerpt": "{{ $json.meta_description }}"
}

Getting a WordPress Application Password

  1. Go to WordPress Admin → Users → Your Profile
  2. Scroll to Application Passwords
  3. Enter a name (e.g. “n8n”) and click Add New Application Password
  4. Copy the generated password — you won’t see it again

7 Test & Schedule

Test Run

Click the Manual Trigger node, then click Execute Workflow. Watch data flow through each node. After ~30 seconds you should see 3 new draft posts in your WordPress dashboard, each with a full Arabic article.

Automate with a Schedule

Replace the Manual Trigger with a Schedule Trigger node to run automatically. Recommended settings:

// Run every day at 7:00 AM
Cron: 0 7 * * *
⚡ Pro Tip: Run it twice per day (7 AM and 2 PM) to catch breaking news from different time zones. Just set the Schedule Trigger to run at both times.

8 What You Get

OutputDetails
📝 Arabic titleSEO-optimized with primary keyword
📋 Meta descriptionUnder 160 characters for Google snippets
📄 Full article600–900 words in Modern Standard Arabic
🏷 Tags5 Arabic SEO tags per article
🔗 URL slugArabic transliterated slug
💾 StatusSaved as Draft — you review before publishing

💡 Customization Ideas

Add more sources

Add more RSS Feed Read nodes for sources like ArXiv AI papers, Google AI Blog, or any niche publications relevant to your audience.

Change the target language

Modify the Claude prompt to write in French, Spanish, or any language. Just replace “Modern Standard Arabic” with your target language.

Auto-publish instead of draft

Change "status": "draft" to "status": "publish" in the WordPress body — though reviewing first is always recommended.

Add featured images

Extend the workflow with an image generation node (DALL-E, Stability AI) to auto-create featured images for each article.

Add to Google Sheets log

Append each published article’s title, URL, and date to a Google Sheet for easy tracking.

اترك تعليقاً

لن يتم نشر عنوان بريدك الإلكتروني. الحقول الإلزامية مشار إليها بـ *